Share via


Installing the Components for mySAP ERP

The ERP Connector for Microsoft Office Project Server 2003 requires that you create modules to export data from mySAP™ ERP Human Capital Management (HCM) and from the mySAP ERP Financials CO and PS subsystems for internal orders and project/task accounting. If you implement the work breakdown structure (WBS)-level integration for finance, you also need to create an import module that processes the WBS data (work actuals) from Project Server.

Important  Review the requirements with your mySAP ERP Financials business specialist before you install any components. In virtually all cases, you need to modify the actuals import module before you install it on the mySAP ERP Financials system.

To create and install the mySAP ERP components, you perform the following steps:

  • Create a development class and function group.
  • Create the project export module.
  • Create the HR export module.
  • Create the actuals import module.
  • Test the modules.

If you plan to install only the HR module for ERP Connector, you do not need the project export or actuals import modules. The solution starter download includes source code of the mySAP ERP components in the Source\SAPSystem directory.

Note  The SAPSystem directory in the download includes installation hints in the install_hints_e.txt (English) and install_hints_d.txt (German) files.

Development Class and Function Group

To create a development class and function group:

  1. Log on to mySAP ERP.

  2. To go to the Development Workbench with the Object Navigator, type the transaction se80 in the toolbar box. To open the Object Selection dialog box, click Edit object, and then click the More tab (Figure 1).

    Creating a development class

    Figure 1. Creating a development class

  3. Type the name of the development class, for example ZTPG, and then press the F5 key. In the Create Development Class dialog box, type a short description, and then select a transport layer. If no transport layer is available, press F8 to create one (Figure 2). Fill in the other fields, and save the settings.

    Creating a transport layer for the development class

    Figure 2. Creating a transport layer for the development class

  4. Create a function group. Type transaction se80 in the toolbar text box, click Edit object in the Object Navigator, and then in the Object Selection dialog box, click the Function group tab. Type a function group name, and then press F5 (Figure 3).

    Creating a function group

    Figure 3. Creating a function group

Project Export

To create the project export module:

  1. Use transaction se80. Click Edit object in the Object Navigator. To create the function module, type the module name Z_TPG_PROJECT_GETINFO_XML, as shown in Figure 4.

    Creating a function module

    Figure 4. Creating a function module

  2. On the Attributes tab of the Function module, click Remote-enabled module, and then click Start (Figure 5).

    Setting the function module processing type

    Figure 5. Setting the function module processing type

  3. On the Import tab (Figure 6), type the following import parameter names and information.

    Parameter name Type Reference type Default
    value
    Opt. Pa. Short text
    I_ORDERID LIKE BAPI2075_2-ORDER OPTIONAL   Checked Checked Instruction number
    I_PROJECT LIKE BAPIPR-PROJECT_DEFINITION OPTIONAL   Checked Checked Project definition
    I_FILENAME TYPE STRING   Unchecked Checked  

    Creating the import parameters

    Figure 6. Creating the import parameters

  4. Click the Source code tab. Copy the source code from the file z_tpg_project_getinfo_xml.txt, and then paste it in the source code editor pane.

    Note  The source code shown in Figure 7 differs slightly from the code in the file. The file is correct.

    Source code for the project export function

    Figure 7. Source code for the project export function

  5. Edit the top include ABAP script. To display the object list, press CTRL+SHIFT+F5. Expand the Includes folder in the Object name column, and then click LYTPGTOP. Copy the code from the LYTPGTOP.txt file, and then paste it in the source code editor pane (Figure 8).

    Editing the top include ABAP script

    Figure 8. Editing the top include ABAP script

  6. Double-click Function modules. Click the Goto menu, and then click Main program. Change the following line...

    * INCLUDE LYTPGF...               " Subprograms
    

    to this:

    INCLUDE LYTPGF99.
    

    In Figure 9, the entry depends on the name of the function module. Double-click the marked section, and then click Yes.

    Including the LYTPGF99 global routine

    Figure 9. Including the LYTPGF99 global routine

  7. In the Includes folder, click LYTPGF99 and edit the source code. Copy the code from the LYTPGF99.txt file, and then paste it in the source code editor pane (Figure 10).

    Editing the LYTPGF99 global routine

    Figure 10. Editing the LYTPGF99 global routine

  8. Press CTRL+F3 to generate the project export module from the ABAP code.

Human Resources Export

To create the HR export module:

  1. Use transaction se80. In the Object Navigator, click Edit object, and then click the Function group tab in the Object Selection dialog box. To create the HR function module, type the module name Z_TPG_EMPLOYEE_ORGUNIT_XML, as shown in Figure 11.

    Creating the HR function module

    Figure 11. Creating the HR function module

  2. On the Attributes tab of the Function module, click Remote-enabled module, and then click Start (Figure 12).

    Setting the HR function module processing type

    Figure 12. Setting the HR function module processing type

  3. On the Import tab, type the following import parameter names and information (see Figure 13).

    Parameter name Type Reference type Default
    value
    Opt. Pa. Short text
    I_COSTCENTER LIKE BAPIEMPLB-COSTCENTER DEFAILT '*' Unchecked Checked Cost center
    I_FILENAME TYPE STRING   Unchecked Checked  

    Creating the HR import parameters

    Figure 13. Creating the HR import parameters

  4. Click the Source code tab. Copy the source code from the z_tpg_employee_orgunit_xml.txt file , and then paste it in the source code editor pane.

    Note  The source code shown in Figure 14 differs slightly from the code in the file. The file is correct.

    Source code for the HR export function

    Figure 14. Source code for the HR import function

  5. Press CTRL+F3 to generate the HR module from the ABAP code.

Actuals Import

You need to revise the function module with your own messages, and then create a message class. ABAP code in the z_tpg_update_cat2.txt file includes comments such as the following:

*   message - Error during upload of file

Remove the comment symbol at the lines that start with "* message" and add your own message.

To create the actuals import module:

  1. Use transaction se80. In the Object Navigator, click Edit object. To create the function module, type the module name Z_TPG_UPDATE_CAT2.

  2. On the Attributes tab of the Function module, click Remote-enabled module, and then click Start

  3. On the Import tab (Figure 15), type the following import parameter name and information.

    Parameter name Type Reference type Default
    value
    Opt. Pa. Short text
    I_FILENAME TYPE RLGRAP   Unchecked Checked  

    Creating the actuals import parameters

    Figure 15. Creating the actuals import parameter

  4. Click the Source code tab. Copy the source code from the z_tpg_update_CAT2.txt file, and then paste it in the source code editor pane (Figure 16).

    Source code for the actuals import function

    Figure 16. Source code for the actuals import function

  5. Press CTRL+F3 to generate the actuals import module from the ABAP code.

Testing the mySAP ERP Components

To test the modules:

  1. Use transaction se80. In the Object Navigator, expand the Function modules, right-click the module you want to test, and then click Test in the option menu (Figure 17).

    Selecting Test in the option menu

    Figure 17. Selecting Test in the option menu

  2. If you created the human resources (HR) module, test module Z_TPG_EMPLOYEE_ORGUNIT_XML. Type a sample cost center and name of the file to export, as shown in Figure 18, and then press F8 to execute the function.

    Testing the HR module

    Figure 18. Testing the HR module

  3. If you created the project export module, test module Z_TPG_PROJECT_GETINFO_XML. Type a sample ORDER ID, PROJECT ID, and name of the file to export, as shown in Figure 19, and then press F8 to execute the function.

    Testing the project export module

    Figure 19. Testing the project export module

  4. If you created the actuals import module, test module Z_TPG_UPDATE_CAT2, as shown in Figure 20. Press F8 to execute the function.

    Testing the actuals import module

    Figure 20. Testing the actuals import module