Information

  • The following workflow provides basic knowledge of interface creation in PLANTA project by means of the functions delivered.
  • In this example, 2 export interfaces are created:
    • without pool: all active projects
    • with pool: loads

Requirements

  • Basic customizing knowledge (creating modules)

Export without Pool

Create Source Module

Objective

  • To create a module that provides project data

Procedure

  • Login as customizer.
  • Open Customizer → Module Customizer → Modules in the user menu
  • Create a new module.
  • Assign the ppms.interface.CSVModule Python module subclass to the module.
  • Create a data area and fill it with fields from DT461. In this example, the following fields are used:
    • DI001001 Project ID
    • DI000690 Project name
    • DI001062 Manager
    • DI001019 Requested start
    • DI001020 Requested end
    • DI001042 Status
  • Adjust the fields as follows:
    • For the Status field, set the Filter from and Filter to parameters to 1 (active) and Window = 9.
  • Enter a DA Python ID for the data area.

Create Target Module

Objective

  • To create a module that can write a CSV file

Procedure

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

Tip

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

Create Configuration

Objective

  • To create an interface configuration

Procedure

  • Open the Configuration module.
  • Create a new configuration.
  • Enter an appropriate description, e.g. Project export.
  • Enter the ID of the previously created source module in the Source module field.
  • Enter the respective target module in the Target module field.
  • Click on the Edit parameters button.
  • Adjust the following parameters:
    • da_name = Python ID of the project data area that has previously been created
    • filepath = file name (e.g. projects.csv)
  • The parameters of the target module are already preset with values and do not have to be adjusted.

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 Export option from the listbox.
  • Click on the Generate button.
    • An export mapping is automatically created and the dialog module is closed.

Carry Out Transfer

Objective

  • To carry out an export

Procedure

  • Right-click on the header area of the current configuration and select the Execute entry from the context menu.
    • The Execution module is opened with the current record.
  • Select the Load data from source to target transaction type and click on the Start transaction button.
    • A dialog message is displayed, informing you that templates could not be run and offering to run a copy instead. Confirm the message.
  • A copy of the configuration is created and the data is transferred accordingly.
  • After successful completion, the Completed checkbox is activated.
  • The CSV file can now be found in the configured path.

Export with Pool

Create Source Module

Objective

  • To create a module which makes loads from DT472 Load available

Procedure

  • Login as customizer.
  • Open Customizer → Module Customizer → Modules in the user menu
  • Create a new module.
  • Assign the ppms.interface.MtsLoadModule Python module subclass to the module.
  • Create a data area and fill it with fields from DT472. In this example, the following fields are used:
    • DI001395 Project ID
    • DI001516 Task ID
    • DI001658 Task name
    • DI001517 Resource
    • DI001518 Cost type
    • DI001519 Load date
    • DI001510 Actual load
    • DI007783 Cost center resource
    • DI001400 Position
    • DI060750 SAP status
  • Make the following settings for the data fields:
    • SAP status
      • Filter from = 0 (not transferred)
      • Filter to = 0 (not transferred)
      • Window = 9.
    • Load date
      • Filter from = required period
      • Filter to = required period
      • Note: If no data is entered in the Filter from and Filter to parameters, all load records are displayed.
  • Enter a DA Python ID for the data area.

Create Pool Module

Objective

  • To create a pool module to which the data from the load table is copied

Procedure

  • Create a new module.
  • Assign the ppms.interface.MtsExportPoolLoadModule Python module subclass to the module.
    • This module class is important for the load export, as the data is stamped in DT472 in the pool after the transfer.
    • The pool module can also be used to make further adjustments to data before the export, e.g. to group data.
  • Create a data area and fill it with fields from DT563 Load data pool. In this example, the following fields are used:
    • DI062711 Project ID
    • DI062714 Task ID
    • DI062751 Task name
    • DI062713 Resource
    • DI062712 Cost type
    • DI062710 Load date
    • DI062709 Actual load
    • DI062703 Cost center resource
    • DI062715 Position
    • DI062733 UUID
    • DI062691 Interface configuration
    • DI062731 Completed on
    • DI062730 Status
    • Note: The Interface configuration, Completed on, and Status fields must necessarily be contained in the data area.
  • Make the following settings:
    • Interface configuration field
      • Filter from = @L4
      • Filter to = @L4
      • Window = 9.
    • Completed on, Status, and UUID fields:
      • Window = 9.
  • Enter a DA Python ID for the data area.

Create Target Module

Objective

  • To create a module that can write 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 target module.

Create Configuration

Objective

  • To create a configuration that configures the interface

Procedure

  • Open the Configuration module.
  • Create a new configuration.
  • Enter an appropriate description, e.g. Load data export with stamps.
  • Enter the ID of the created source module in the Source module field.
  • Enter the ID of the created pool module in the Pool module field.
  • Enter the ID of the created target module in Target module field.
  • Enter the number of the Load data pool table (here 563) in the Pool table field.
  • Click on the Edit parameters button.
  • da_name source module parameter = Python ID of the load data area which has previously been created
  • da_name pool module parameter = Python ID of the load data pool data area which has previously been created
  • l_var = 4 (since in the module it is filtered with @L4)
  • filepath = file name (e.g. Export_Hours.csv)
  • writeheader = 1 (so that there are headings in the CSV file)
  • The parameters of the target module are already preset with values.

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 Export option from the listbox.
  • Click on the Generate button.
    • An export mapping is automatically created and the dialog module is closed.
    • Since here an export to a file is carried out and the columns receive headings, they can still be adjusted in the mapping if required.
      • E.g. change the name in the Object field in the mapping element of the SOURCE type, e.g. Project instead of pr_id

Note

  • For the Load data from source to pool transaction type, the Position (item) field is required for stamping the SAP status. When exporting from the pool to a CSV file, the field is not required and can be removed from the mapping. It is not written in the file then.

Carry Out Transfer

Objective

  • To carry out an export

Procedure

  • Right-click on the record of the current configuration and select the Execute entry from the context menu.
    • The Execution module is opened with the current record.
  • Select the Reload data from source to pool value from the Transaction type listbox, and click on the Start transaction button.
    • A dialog message is displayed, informing you that templates could not be run and offering to run a copy instead. Confirm the message.
    • A copy is created and the configuration is run.
    • After the first run, the data is now available in the pool table.
    • In the next step, select the Load data from pool to target value from the Transaction type listbox and click on the Start transaction button.
    • After successful completion, the Completed checkbox is activated. The CSV file can now be found in the configured path.