New SAP BW Wizard Example: Uploading External File Data to SAP Using InfoPackage Metadata

Overview

This example describes how to use the New SAP BW wizard to complete a type of roundtrip process for data by taking source data from SAP BW, manipulating it in SAS, and returning it to SAP. The following steps provided a high-level view:
  1. Extract SAP BW metadata to SAS data sets, as described in Extract SAP BW Metadata Using the Extract from BW Wizard.
  2. Use the SAP BW Register Tables wizard to select which data sources you want to use in SAS Data Integration Studio and write metadata about those data sources to your metadata repository.
  3. Return the data to SAP BW using InfoPackage metadata, as described in this procedure.

Preparation

Assume the following for this example:
  • The New SAP BW wizard is being used.
  • You want to add metadata for a target table that will be created when a SAS Data Integration Studio job is executed.
  • The new job will have the descriptive name of Order Data 1.
  • The target table created in the Order Data 1 job will have the same columns as a table that has been extracted from the SAP System and registered in a current metadata repository: an ODS source table called /BIC/AZ_OR_ODS_00-Z_OR_ODS. This table contains factual information about customer orders.
  • Order Data 1 will be stored in a SAS library called ORD Orders. The metadata for this library is available in a current metadata repository.
  • ODS Orders Target Lib has been assigned to the configured SAP server SAP BW SIB. (SAP BW SIB is used to execute the LIBNAME statement for the library.)
  • You log in using a user ID that gives you access to SAP BW SIB.
  • The InfoSource ZEMEA_APPLICATION_COMPONENT is available on SAP BW SIB. ZEMEA_APPLICATION_COMPONENT contains the ZPACK_3XG2B1OG4CKX0EJ4LHJ23CLZ4 InfoPackage.
  • You can access a specific external file, which is orion_orders.csv in this example. The external file destination in the InfoPackage data is the SAP application server. The scheduling data in the InfoPackage data is Immediate Update.

New SAP BW Selection Wizard

To select the wizard that enables you to enter metadata for a SAS target, from the menu bar on the SAS Data Integration Studio desktop, select Newthen selectSAP BW. The New SAP BW wizard opens to the SAP Server page.

SAP Server Page

Use the SAP Server page to review and configure settings for the SAP server and SAS library used in the wizard.
SAP Server Page
SAP Server Page
Follow these steps to configure SAP server settings:
  1. Select a server from the Configured SAP Server drop-down list box.
  2. Select a library from the SAP Metadata Location drop-down list box.
  3. Select Next. The InfoPackage Browser page displays, as shown in the following figure.

InfoPackage Browser Page

Use the InfoPackage Browser page to find and select the InfoPackage that will be used in the wizard.
InfoPackage Browser Page
 InfoPackage Browser Page
Follow these steps to select the InfoPackage:
  1. Enter a search term for the InfoPackage in the Find Text field and click Find Text.
  2. Drill down in the InfoPackage tree until you find the desired InfoPackage. Select the InfoPackage.
    You can select the Display InfoPackage Details button or right-click and select Display InfoPackage Details to review detailed information about the InfoPackage.
  3. Select Next. The External File Location page displays, as shown in the following figure.

General Information - External File Page

Use the General Information - External File page to specify a name and folder for storing metadata about the external file.
General Information - External File Page
General Information - External File Page
Follow these steps:
  1. Specify a metadata name for the external file in the Name field.
  2. Select Next.
    The External File Location page displays, as shown in the following figure.

External File Location Page

Use the External File Location page to specify the location for the external file created with the wizard. For more information, see External File Location Page.
External File Location Page
External File Location Page
Follow these steps to specify the external file location:
  1. Enter the path to the storage location for the external file that is provided by the InfoPackage metadata in the File name field. The value entered in the File name field should match the value defined in the InfoPackage.
  2. Select Next.
    The General Information - Job page displays, as shown in the following figure.

General Information - Job Page

Use the General Information - Job page to specify the name and metadata folder location for the job created with the wizard.
General Information - Job Page
General Information - Job Page
Follow these steps to specify job settings:
  1. Enter a name for the job in the Job Name field. Click Browse to change the default metadata folder location.
  2. Select Next.
    The Wizard Finish page displays, as shown in the following figure.

Wizard Finish Page

Use the last page to review the metadata that you have entered.
Wizard Finish Page
Wizard Finish Page
Review the text in the metadata pane on the Wizard Finish page. When you are satisfied that the metadata is correct, click Finish.

Review the Job

Navigate to the job and open it to review it in the Job Editor:
Initial Job Diagram
Initial Job Diagram
The process flow diagram for the job that was created in the New SAP BW wizard displays. The Schedule SAP InfoPackage transformation is part of the job because the external file destination in the InfoPackage is the SAP Application Server and the scheduling data in the InfoPackage is Immediate Update.
Navigate to the ODS order data source table, and place it on the diagram and connect it to the SAP BW File Writer transform, as shown in the following display.
Populated Job Diagram
Populated Job Diagram
The source table has been added to the process flow diagram. You now need to create and verify mappings (notice the red and white warning icon in the bottom right of the SAP BW File Writer transformation) and settings before you run the job.

Verify Mappings and Settings

Verify the mappings between the source and target tables by right-clicking the SAP BW File Writer transformation and selecting Properties. Then, select the Mappings tab in the Properties window, as shown in the following figure.
SAP BW File Writer Transformation Mapping Tab
SAP BW File Writer Transformation Mapping Tab
Be sure that each column in the source table is mapped to the corresponding column in the target table. When you have finished, click OK. The icon in the bottom-right of the SAP BW File Writer transformation icon becomes a green check mark. Then right-click the Schedule SAP InfoPackage transformation and select Properties. Last, select the Options tab in the Properties window, as shown in the following figure:
Schedule SAP InfoPackage Transformation Options Tab
Schedule SAP InfoPackage Transformation Options Tab
Be sure that the appropriate values for the job are populated into the InfoPackage Name field and the SAP Library fields. When you are satisfied with these values, click OK. Now you are ready to run the job.

Run the Job

From the SAS Data Integration Studio toolbar, click Run button. SAS Data Integration Studio generates code for the job and submits it to the SAS Application Server for execution. Once the job runs successfully, check the data and examine the log.

Examine the Data and the Log

It is a good practice to right-click the .csv target table and select Open to review the output of the job. Also, examine the log generated by the job. If you were to schedule a job like this with the Schedule SAP InfoPackage transformation, the next to last entry in the log should confirm that a REQUESTID has been generated for the load. In addition, the final entry in the log will suggest that you check the status of the data load by passing the REQUESTID to an SAP administrator. Of course, other scenarios generate different log messages.