The documentation from version 39.5.17 of PLANTA project can be found in the new PLANTA Online Help.

Interface Workflow Import New from S 39.5.4

Information

  • The following workflow provides basic knowledge of interface creation in PLANTA project by means of the functions delivered.
  • As an example, an interface is customized for the import of cost centers.

Requirements

  • Basic customizing knowledge (creating modules)

Create CSV File

Objective
  • To create a CSV file

Procedure

  • Create a CSV file to be imported and store it in the required directory.
  • A file from which, e.g., the cost center name and the person responsible can be imported, can, e.g., be structured as follows:
ou_cctr_name;ou_cctr_respons
New cost center;R41
Other cost center;R41
Third cost center;R43

Create Source Module

Objective

  • To create a module that can read a CSV file.

Procedure

  • Create a new module.
  • Assign the ppms.interface.CSVModule Python module subclass to the module.
  • Create a dummy data area.

Tip

  • Alternatively, the 009C7H standard module can be used as a source module.

Create Target Module

Objective
  • To create a module that contains the data fields of DT808 Cost center that are to be imported.

Procedure

Create Configuration

Objective

  • To create an interface configuration

From DB 39.5.7

Procedure
  • Open the Configuration module.
  • Create a new configuration.
  • Enter an appropriate title, e.g. Cost center import.
  • Enter the ID of the created source module in the Source module.
  • Enter the ID of the created target module in the Target module field.
  • Click on the Edit parameters button.
    • The NEW Interface Parameters module is opened.
      • The da_name source module parameter receives the Python ID of the previously created data area of the target module as a value.
      • The parameter of the target module are preset with reasonable values. The file name of the CSV file to be imported must be entered under filepath. If there are headings in the CSV file, you additionally have to set readheader = 1.

Up to DB 39.5.7

Procedure
  • Open the Configuration module.
  • Create a new configuration.
  • Enter an appropriate title, e.g. Cost center import.
  • Enter the ID of the created source module in the Source module.
  • Enter the ID of the created target module in the Target module field.
  • Click on the Edit parameters button.
    • The Interface Parameters module is opened.
      • The da_name source module parameter receives the Python ID of the previously created data area of the target module as a value.
      • The parameter of the target module are preset with reasonable values. The file name of the CSV file to be imported must be entered under filepath. If there are headings in the CSV file, you additionally have to set readheader = 1.

Create Mapping

Objective

  • To create a mapping for the current configuration

Procedure

  • Click on the Generate mapping button in the record of the current configuration.
  • Select the Import option from the listbox.
  • Click on the Generate button.
    • An import mapping is automatically created and the dialog module is closed.
  • If the headings in the CSV file do not match with the Python IDs of the corresponding fields in the target module, the values have to be adapted accordingly.
    • Examples:
      • Change the name in the Object field in the mapping element of the SOURCE type,
      • e.g. Project instead of pr_id

Process Transfer

Objective

  • To perform the import

From DB 39.5.9

Procedure
  • Right-click on the record of the current configuration and select the Go to entry from the context menu.
    • The Execution module is opened with the current record.
  • Select the Load data from source to target value from the Transaction type listbox.
  • Click on the Run button.
    • A dialog message is displayed, that informs that templates could not be run and offers to run a copy instead. Confirm the message.
  • A copy of the configuration is created and the data is imported accordingly.
  • After successful import run, the NEW Done checkbox is activated.

From DB 39.5.7

Procedure
  • Right-click on the record of the current configuration and select the NEW Go to entry from the context menu.
    • The NEW Execution module is opened with the current record.
  • Select the Load data from source to target value from the Transaction type listbox.
  • Click on the NEW Run button.
    • A dialog message is displayed, that informs that templates could not be run and offers to run a copy instead. Confirm the message.
  • A copy of the configuration is created and the data is imported accordingly.
  • After successful import run, the NEW Transferred checkbox is activated.

Up to DB 39.5.7

Procedure
  • Right-click on the record of the current configuration and select the Go to transaction entry from the context menu.
    • The Transaction module with the current record opens.
    • Select the Load data from source to target value from the Transaction type listbox and click on the Start transaction button.
    • A dialog message is displayed, that informs on templates that could not be run and offers to run a copy instead. Confirm the message.
    • A copy is created and the data is transferred.
    • After successful run, the Transferred checkbox is activated.

Note

From S 39.5.5

  • After a file was imported successfully, the UUID of the interface configuration is written in the file name and copied into the directory configured via archive_dir.

Up to S 39.5.5

  • By default, the source file is not renamed or locked in any way after import, so that it is technically possible to import the same file again. If you want to avoid that, you have to adapt the Python module subclass of the source module.

  • See also: Here you can find an overview of all PLANTA link contents

             PLANTA project









     
    • Suche in Topic-Namen

    • Suche in Topic-Inhalten
    This site is powered by the TWiki collaboration platform Powered by Perl