5 Reverse-Engineering Data Models

This chapter describes how to reverse-engineer the Oracle target and SAP source data models.

This chapter includes the following sections:

Reverse-Engineering the Oracle Target

To reverse-engineer the Oracle data model:

  1. Connect to Designer.

  2. In the Models tree view, click New Model.

  3. In the Definition tab, enter the model parameters as shown below:

    Description of image018.jpg follows
    Description of the illustration image018.jpg

  4. In the Reverse Engineer tab, select the Global context.

    Description of image020.jpg follows
    Description of the illustration image020.jpg

  5. Click Reverse Engineer, then from the File menu, click Save.

  6. The W_PURCH_DS, W_ACCNT_VENDR_DS, W_GL_ACCOUNT_HIER_DS, W_VENDR_BAL_DS, W_VENDER_CUBE_OBJ_DS, W_OPENHUB_SALES_DS, W_DELTA_DS datastore appear in your Oracle_Target model, as shown below.

    Description of image022.jpg follows
    Description of the illustration image022.jpg

Reverse-Engineering the SAP BW Source Datastores

To reverse-engineer the SAP BW Source data targets you need to perform the following tasks:

  1. Creating the Data Model

  2. Validating the SAP Connection

  3. Starting the Reverse-Engineering Process

This section also includes the following topics:

Creating the Data Model

  1. In the Models tree view, click New Model.

  2. In the Definition tab, select SAP ABAP technology and the Logical Schema previously created (in our example it is the LOGICAL_SAP_BW Logical Schema ).

  3. In the Reverse Engineer tab:

    1. Select Customized option.

    2. Select the Global context.

    3. Select the RKM SAP Connection Test you have imported in the SAP BW Demo project.

Validating the SAP Connection

  1. In the Models tree view, open the SAP BW Source Model.

  2. Click Reverse Engineer and confirm the start of the reverse-engineering process. This process runs two tests:

    • Establish a test connection to the SAP BW system and

    • Validate the proper setup of SAP JCo by displaying the About dialog.

  3. In a few seconds, you should see the SAP JCo-About dialog as shown here:

    Description of image025.jpg follows
    Description of the illustration image025.jpg

    Please verify the JCo version number (see "System Requirements and Certification" for more details) and verify that a path for the JCo Library is given (.dll for Windows). If this is not the case or you see any error message in this about dialog, please review the SAP JCo installation, as described in your SAP JCo package, and run this test again.

    Note:

    Closing the JCo-About-Dialog will also close ODI.

  4. Once you have validated SAP JCo installation, open ODI Operator.

  5. In the Operator, expand the Reverse-Engineering session down to the task level.

  6. Verify whether the task "Test SAP Connection" has been executed successfully. If not, view the task details to identify the connection problem. The output of this task must contain Successfully connected to SAP System. If not, the connection test has failed and the connection problem must be analyzed before you continue.

    Do not continue until you have successfully validated the SAP connection!

Note:

If you want to validate the SAP connectivity independent of ODI, please see Appendix B, "SAP Stand-Alone Connection Test."

Starting the Reverse-Engineering Process

To start the reverse-engineering process of the SAP BW datastores:

  1. In the Models tree view, open the SAP BW Source Model.

  2. In the Reverse Engineer tab:

    1. Select the Customized option.

    2. Select the Global context.

    3. Select the RKM SAP BW you have imported in the SAP BW Demo project.

    4. Set the USE_GUI KM option to Yes.

    5. For first time RKM use only: Set SAP_TRANSPORT_LAYER_NAME to the name of the transport layer your SAP basis admin has provided you with.

      Caution:

      • Pay particular attention to provide the correct value for the SAP_TRANSPORT_LAYER_NAME option. If an invalid value is used during the first time installation, a significant delay in the connector installation may be caused.

      • For first time RKM use only: If you are using a custom value for KM options SAP_FUNCTION_GROUP_ODI_DEV and SAP_FUNCTION_GROUP_ODI_PROD, these function groups must not exist prior the first execution of the UPLOAD_ABAP_CODE and UPLOAD_ABAP_BASE set to true.

      • For first time RKM use only: If you are using a custom value for KM options SAP_PACKAGE_NAME_ODI_DEV and SAP_PACKAGE_NAME_ODI_PROD, these packages must not exist prior the first execution of the UPLOAD_ABAP_CODE and UPLOAD_ABAP_BASE set to true.

    6. For first time RKM use only: Set UPLOAD_ABAP_CODE and UPLOAD_ABAP_BASE to true. After the first execution these values must be set back to False.

    7. Set other parameters according to your SAP configuration. See the Application Adapters Guide for Oracle Data Integrator for more information on the RKM options.

  3. From the File menu, click Save to save your changes.

  4. Click Reverse Engineer to start the reverse-engineering process.

  5. Click OK.

  6. The Sessions Started Dialog is displayed.

  7. Click OK.

  8. Set UPLOAD_ABAP_CODE and UPLOAD_ABAP_BASE back to No.

  9. For first time RKM use only: Validate in Operator that the session is now in status running. If session has failed, please validate settings. Do not move on until all installation steps have been completed successfully.

Using the SAP Metadata Browser

As you have set the USE_GUI option to Yes, the RKM displays in the SAP BW Metadata Browser the SAP objects organized in the tree view as shown below.

Note:

In case that the below dialog does not show up, see ODI Operator and ODI Logs for details.

Refer to Section 7.7.4, "Log Files," in Application Adapters Guide for Oracle Data Integrator for more details.

Description of image030.jpg follows
Description of the illustration image030.jpg

The Tree View

The SAP BW Data targets are organized into a tree view. Only the SAP BW Data targets available in the SAP BW system are displayed. By expanding the tree view, you can see Info Cubes, Info Objects, ODS/DSO, Open Hub, and select those that you want to reverse-engineer.

Note that only the data targets selected in the tree view are reverse-engineered.

Description of image032.jpg follows
Description of the illustration image032.jpg

The Search Panel

The Search option group allows you search specific objects in the browser, based on:

  • Info Cube Name

  • Info Object Name

  • ODS/DSO

  • Open Hub

For the example project for Info Cube, the data target 0FIAP_C20 is used:

  1. Enter 0FIAP_C20 in the Name field.

  2. Select the InfoCube data target.

  3. Click Search to find the object to reverse-engineer. The results are highlighted in the tree view.

  4. Click Reverse.

  5. Oracle Data Integrator starts the reverse-engineering process on the selected data target. The reverse-engineered data targets appear under the Model.

  6. Perform steps 1 to 5 to reverse-engineer the following objects:

    1. InfoCube 0SD_C04

    2. InfoObject 0SOLD_TO

    3. InfoObject 0CREDITOR

    4. InfoObject 0GL_ACCOUNT

    5. ODS/DSO 0BBP_PO

    6. Open Hub destination ZOHD_SALE (/BIC/OHZOHD_SALE)

Reverse-Engineering Without GUI

If you want to perform a reverse-engineering without using the SAP BW Metadata Browser, you set the corresponding parameters in the SAP BW KM . For example, for Info Cube, enter the following parameters in the SAP BW KM options:

  • USE_GUI: No

  • INFOCUBE_NAME : 0FIAP_C20

With this configuration, the Info Cube data target will be reverse-engineered without displaying the SAP BW Metadata Browser.

By using the appropriate KM options, you can also select a filter for the reversed data targets based on for example an Info object, or a ODS/DSO, or an Open Hub table.

Refer to the Application Adapters Guide for Oracle Data Integrator for more information on the RKM options.

Note:

It is not possible to view the data in the SAP BW data targets from Oracle Data Integrator.

What happens when you reverse-engineer SAP BW data targets?

First, Oracle Data Integrator uploads ABAP code in the SAP BW system allowing for retrieving the SAP BW data targets metadata. This RFC is uploaded only if the UPLOAD_ABAP_CODE and UPLOAD_ABAP_BASE options are selected (this option is typically activated only once). The ABAP programs are generated in the SAP function group given in the SAP_FUNCTION_GROUP_ODI_DEV and SAP_FUNCTION_GROUP_ODI_PROD RKM options.

Once this code is set up on SAP BW, Oracle Data Integrator is able to retrieve the SAP BW metadata and to display it in the SAP BW Metadata Browser. Selected metadata is then reverse-engineered from SAP BW into the Oracle Data Integrator repository. The repository only contains the description of the SAP BW metadata, and no data at all.

In addition to the data targets definitions organized and enriched with user-friendly information, the keys definitions are also retrieved. The model appearing in Oracle Data Integrator shows all the information required for performing integration tasks on the SAP BW Model.