| Oracle9i Warehouse Builder User's Guide Release 9.2 Part Number B10996-01 |
|
The Warehouse Builder SAP Integrator enables you to import metadata object definitions from SAP Application data sources into the Warehouse Builder repository. This chapter describes how to use SAP objects in a mapping, generate PL/SQL and ABAP code for the mappings, and deploy them to a target. This chapter also describes how to extract and load SAP data into your target.
This chapter contains the following topics:
The Warehouse Builder SAP Integrator enables you to connect to SAP application source systems and import the SAP source definitions into a project in the Warehouse Builder repository.
You can then generate ABAP or PL/SQL code to extract, transform, and load data from SAP R/3 3.x and R/3 4.x systems to your target system.
SAP application systems logically group database and metadata objects under different business areas. In SAP, a business area is an organizational unit in an enterprise that groups product and market areas. For example, the Financial Accounting (FI) business area represents data describing financial accounting transactions. These transactions might include General Ledger Accounting, Accounts Payable, Accounts Receivable, and Closing and Reporting.
When you import SAP definitions into Warehouse Builder, you can use a graphical navigation tree in the Business Component Hierarchy dialog to search the business area structure in the SAP source application. This navigation tree enables you to select SAP metadata objects from the SAP application server.
The SAP integrator enables you to import metadata for SAP Business Areas or any of their related ABAP Dictionary objects.
With the SAP integrator, you can import definitions and generate deployment code for the following SAP table types:
The Warehouse Builder SAP Integrator requires a dynamic link library file named librfc32.dll in order to use remote function calls on the client machine. This file is available on the SAP Application Installation CD. You need to copy this file to the following Warehouse Builder directory on your client system:
X:\ORACLE_HOME\bin\admin
where "X:" is the drive containing the Warehouse Builder client and "\ORACLE_HOME" is the Oracle Home path name for Warehouse Builder.
If you create an SAP source module and import SAP tables but cannot see the columns in the tables, then you have an incompatible librfc32.dll file. Check the version or build number of your .dll file from your NT Explorer window.
The following version is currently supported in Warehouse Builder:
File Version: 4640,5,123,2956
Build: Wednesday, August 09 23:46:33 2000
File Size: 1,945,138 bytes
Product Version: 46D,123
You can locate this version of the .dll file on the Installation CD.
The Warehouse Builder SAP Integrator requires a dynamic link library file named librfccm.so in order to use remote function calls on the client machine. This file is available on the SAP Application Installation CD. You need to copy this file to the following Warehouse Builder directory on your client system:
X:\ORACLE_HOME\bin\admin
where "X:" is the drive containing the Warehouse Builder client and "\ORACLE_HOME" is the Oracle Home path name for Warehouse Builder.
You also need to add X:\ORACLE_HOME\bin\admin to the Unix environment variable path: LD_LIBRARY_PATH.
The New Module Wizard enables you to define an SAP source module. Warehouse Builder uses this definition to store imported metadata from your source SAP application.
This section contains the following topics:
For related information, see:
Using the New Module Wizard, you can choose SAP R/3 version 3.x or SAP R/3 version 4.x system types as your source. After you select the application version, you need to set the connection information between the Warehouse Builder repository and the SAP application server. You can edit this information using the module property sheet.
When you set the connection information, you can choose the following connection types:
This is the default connection type. A remote function call locates a function module running in a system different from that of the caller. The remote function can also be called from within the same system (as a remote call), but usually the caller and the called are located in different systems. This method requires specific IP Address information for the SAP application server.
SAP can use its own initialization file to track the IP Address information for you. The SAPRFC.INI enables remote calls between two SAP Systems (R/3 or R/4), or between an SAP System and a non-SAP System. This method is useful when you know the SAP-specific connection information and want to automate the IP connection information.
The New Module Wizard creates the module for you based upon the metadata contained in the SAP application server.
To create an SAP source module:
Warehouse Builder displays the Welcome page for the New Module Wizard.
The wizard displays the Name page as shown in Figure 21-1.
Name of the module: Type a unique name for the module between 1 and 30 alphanumeric characters. Spaces are not allowed.
Status of the module: Select a status for the module from the drop-down list: Development, Quality Assurance, Production.
Selecting one of these options can help you document the warehouse design version.
Description: Type a description of the module you are creating (Optional).
The wizard displays the Data Source Information Page.
If the librfc32.dll file is missing, an error message displays, as shown in Figure 21-2.
You must load the librfc32.dll file before you can proceed. For more information, see "Required Files".
The wizard displays the Connection Information page for an RFC Connection, as shown in Figure 21-3.
Select one of the following connection types:
Remote Function Call (RFC) is the default connection type. For more information, see Remote Function Call (RFC).
SAP Remote Function Call (SAPRFC.INI). For more information, see SAP Remote Function Call (SAPRFC.INI).
You must obtain the connection information to your SAP Application server from your system administrator before you can complete this step.
RFC Connection type requires the following connection information, as shown in Figure 21-4:
Application Server: Type the alias name or the IP address of the SAP application server.
System Number: Type the SAP system number for SAP user interface login. This number is required in the SAP application configuration and is supplied by the SAP system administrator.
Client: Type the SAP client number. This number is required in the SAP application configuration and is supplied by the SAP system administrator.
User Name: Type the user name for the SAP user interface. This name is required in the SAP application configuration and is supplied by the SAP system administrator.
Language: EN for English or DE for German. If you select DE, the description text displays in German and all other text displays in English.
SAPRFC.INI File connection type requires the following connection information:
RFC Destination: Type the alias for the SAP connection information.
Client: Type the SAP client number.
User Name: Type the SAP user name for the SAP user interface.
Language: EN for English or DE for German. If you select DE, the description text displays in German and all other text displays in English.
The wizard displays the Logon dialog for the SAP application, as shown in Figure 21-5.
If the SAP application version number you provide on the Data Source Information page does not match the application version for the source system, an error message displays. Click Back to return to the Data Source Information page and correct the application version.
If no error message appears, the wizard logs onto the SAP application and displays the Finish page.
To proceed directly to the Import Metadata Wizard, check the box at the bottom of the page. You can also choose to import metadata at a later time and leave the box unchecked.
The wizard creates the new SAP source module and inserts its name under the Applications node in the project navigation tree.
After creating the SAP source module, you can import metadata definitions from SAP tables using the Import Metadata Wizard. This wizard enables you to filter the SAP objects you want to import, verify those objects, and re-import them. You can import metadata for transparent tables, cluster tables, or pool tables.
This section contains the following topics:
If you choose to proceed to the Import Metadata Wizard wizard directly from the New Module Wizard Finish page, then the wizard opens its welcome page. If choose to import metadata at a later time, then you must open the wizard from the SAP module that you created.
To open the Import Metadata Wizard:
Warehouse Builder displays the welcome page for the Import Metadata Wizard.
The Import Metadata Wizard includes a filter page that enables you to select the metadata. This page offers two filtering methods:
This method opens the Business Component Hierarchy tree. Browse the SAP business areas to locate the metadata you want to import. You can view a list of tables contained in the Business Area and the names of the tables in the SAP application.
Search for tables by typing text string information in fields provided in the Filter Information page. This is a more direct search method if you are familiar with the contents of your SAP application database.
It may take two to ten minutes to open this dialog depending upon the network location of the SAP application server, the type of LAN used, or the size of the SAP application database.
The Import Metadata Wizard displays the Loading business component tree dialog.
The wizard displays the Business Component Hierarchy dialog as shown in Figure 21-6.
Use this dialog to select the SAP Business Areas containing the metadata objects that you want to import.
The Import Wizard displays a list of tables in the selected business component in the Folder dialog as shown in Figure 21-7.
Review this dialog to ensure that you are selecting an appropriate number of tables.
Some Business Components can contain more than 1000 tables. Importing such a large amount of metadata can take from one to three hours or more, depending upon the network connection speed and the processing power of the source and target systems.
The wizard displays the Filter Information page with the SAP Business Area displayed in the Business Component field.
For example, if you want to search the business area named A0 for tables whose names contain the word CURRENCY, then type A0%CURRENCY%. If you want to refine the search to include only tables named CURRENCY and followed by a single digit, then type A0%CURRENCY_.
The wizard displays the Object Selection page with a description for each table, as shown in Figure 21-8.
The Import Wizard also enables you to choose whether you want to import tables with foreign key relationships for each table that you choose to import.
The SAP Integrator only imports definitions for tables. The tables appear in the Selected Objects list in the Object Selection page.
None: Import only the objects in the Selected Objects list.
One Level: Import the objects in the Selected Objects list and any tables linked to it directly through a foreign key relationship.
All Levels: Import the objects in the Selected Objects list and all tables linked to it through foreign key relationships.
The foreign key level you select is the same for all tables selected for importing.
Selecting All Levels increases the time it takes to import the metadata because you are directing the wizard to import tables that are related to each other through foreign key constraints. Select this option only if it is necessary for your situation.
If the radio button on the Object Selection page for the foreign key level is set to One Level or All Levels, the Confirm Import Selection dialog appears as shown in Figure 21-9.
The selected objects appear in the right pane of the Object Selection page.
The wizard imports definitions for the selected tables from the SAP Application Server, stores them in the SAP source module, and then displays the Summary and Import page as shown in Figure 21-10.
Review the information on the Summary and Import page.
You can edit the descriptions for each table by selecting the description field and typing a new description.
The SAP integrator reads the table definitions from the SAP application server and creates the metadata objects in the Warehouse Builder repository.
The time it takes to import the SAP metadata to the Warehouse Builder repository depends on the size and number of tables and the connection between the SAP application server and the repository. Importing 500 or more objects could take one to three hours or more, especially if you are connecting servers in separate LANs.
When the Import completes, the Import Results dialog displays as shown in Figure 21-11.
To re-import SAP objects, you follow the importing procedure using the Import Metadata Wizard. Prior to starting the import, the wizard checks the source for tables with the same name as those you are importing. Re-imported table names appear in bold in the summary and import page. The wizard then activates the Advanced Reconcile Options button so that you can control the re-import options.
You must update existing SAP source module definitions whenever you upgrade SAP application versions, migrate SAP servers, and change network connection configurations. You also need to check this information when you re-import metadata.
You can update an SAP module by editing its properties using the Module Properties dialog.
To update SAP object definition:
The Module Properties dialog displays.
Name: Use this tab to modify the unique identification of the module. Use the Name tab to:
Edit the name of the SAP object. The name assigns a unique value to an object and contains between 1 and 30 alphanumeric characters. The 30 character limit applies only to Physical Name Mode.
If necessary, change the status of the SAP object. Select Development, Quality Assurance, or Production.
Edit the description of the SAP object. This field can contain up to 4000 characters. For example, you can use this field to note the purpose of the module and how it relates to the information required by the end-users of the project.
Source: This tab is read-only. Use this page to view the following information:
Application Type: Indicates the application type corresponding to the data source. For example, SAP R/3 4.x.
System Type: Indicates the type of database system (SAP Application) used to host the source data.
Integrator used to access the data source: Displays the Warehouse Builder integrator that was used to connect to the source data.
Connection: Edit the information on this tab only if the network connection information for the SAP application server has changed.
After you define the SAP source module and import the metadata, you can define the ETL mappings to extract and load the data from your SAP source to the target. The Warehouse Builder SAP Integrator features a special mapping tool for SAP objects. Warehouse Builder enables you to configure mappings to generate ABAP or PL/SQL code to deploy your metadata.
This section contains the following topics:
You can use the Mapping Editor to define mappings for SAP sources. While SAP mappings are similar to other types of mappings, there are some important differences:
The Add Mapping Table dialog displays as shown in Figure 21-12.
The field at the bottom of the dialog displays a list of SAP tables whose definitions were previously imported into the SAP source module.
The editor places a mapping table on the mapping canvas to represent the SAP table.
You can choose to use the Copy and Map wizard to define a mapping target. Or you can define it as you would with any other type of mapping operator.
When you select an SAP operator as a source, the SAP integrator enables an option to use the Copy and Map wizard to define the target object to which you want to map from an SAP source. This wizard enables you to create a target object whose attributes are identical to those of the SAP source. The Copy and Map wizard enables you to perform three functions:
You can use the Copy and Map wizard only when you select a single table as a source. If you select more than one table, then you must define the mapping target manually.
To use the Copy and Map Wizard:
The Copy and Map Wizard welcome page displays.
The wizard displays the Target Name page.
Physical Name: A unique physical name for the target object you are creating. The name can contain 1 to 30 characters, no spaces are allowed.
Object Type: Only tables that map from SAP source tables can be created. The choice in this field is preselected and is read-only.
Application: The target application that contains the target object. The choice in this field is preselected and is read-only.
Description: Optional field used to describe the target object you are creating. This field can contain file information up to 2 MB in size.
The Source Columns page displays as shown in Figure 21-13.
By default, this page displays and selects all columns in the source table as defined in the SAP application. You can deselect columns in one of the following ways:
You must select at least one column to copy. You can select columns in one of the following ways:
The Target Columns page displays as shown in Figure 21-14.
Use this page to customize the selected columns or add new ones to your target table. The first two columns within the table display the physical and business names of the columns. You can modify the physical names of a column. The default physical names are copied from the source physical names. You can edit the following fields:
If you rename a target column, then the new name is preserved regardless of how you choose to generate the target physical name. The renamed target column supersedes the generated target column name. For example, the source physical name of a table is MANDT and its business name is MANDT_Client. If you change the default target physical name from MANDT to MANDT_Client_Name, then this name is preserved.
The Mapping Editor displays the source table mapped to the newly created target table. The bound target table displays under the TABLES node in the Warehouse Builder navigation tree.
Configuring a mapping containing an SAP source is the similar to configuring a mapping containing any other source:
The Operator properties window displays as shown in Figure 21-15.
Table 21-1 Loading Types in ABAP Code
| Loading Type | SQL* Loader Code Generated in ABAP Code |
|---|---|
|
INSERT |
APPEND |
|
CHECK/INSERT |
INSERT |
|
TRUNCATE/INSERT |
TRUNCATE |
|
DELETE/INSERT |
REPLACE |
|
All other types |
APPEND |
This parameter enables you to choose the type of code you want to generate for your SAP mappings. If your source includes clustered or pooled tables, then you must select ABAP as the generated code.
To choose the step type:
The Configuration Properties window displays as shown in Figure 21-16.
The Step Type dialog displays as shown in Figure 21-17.
The Configuration Properties window displays.
If you set the step type to ABAP, then you can expand the Runtime Parameters node on the Configuration Properties window to display settings specific to ABAP code Generation, as shown in Figure 21-18. These settings come with preset properties that optimize code generation and should not be changed. If you alter these settings, you may slow the code generation process.
The following lists the runtime parameters available for SAP mappings:
Select < > into < > from (T1 as T1 inner join T2 as T2) on <condition >
The default setting is TRUE.
Before loading SAP data into the repository, you must first check the Physical Configuration properties window to ensure that the directory parameters are set correctly.
The following list describes the parameters related to generating ABAP code to the Generation Target Directories:
abap\.
.abap
_run.ini.
abap\log\
You can generate PL/SQL code for a mapping containing an SAP transparent table just as you generated code for any other PL/SQL mapping in Warehouse Builder. However, you must generate ABAP code for pooled and cluster tables.
Warehouse Builder validates and generates the scripts required to create and populate the SAP source object.
When you generate code, a single script is generated for each physical object you want to create. For example, there is one script for each index you are creating. This is useful if you need to re-deploy a single object at a later time without re-deploying the entire warehouse.
For related information, see Chapter 13, "Deploying Target Systems"
To generate the scripts for SAP mappings:The Generation Mode dialog displays as shown in Figure 21-19.
The Generation Results dialog displays as shown in Figure 21-20.
The generated code displays in the Code Viewer as shown in Figure 21-21.
You can edit, print, or save the file using the code editor. Close the window to return to the Generation Results dialog.
The File System Deployment dialog displays as shown in Figure 21-22.
When you generate an ABAP code for an SAP mapping, Warehouse Builder creates an ABAP program that loads the data. You must run this program from the SAP user interface. The program uploads the generated code and executes it on your SAP system. You can then load the data into your Warehouse Builder staging area before using SQL*Loader to upload the data into your warehouse tables.
To upload and execute the ABAP code on your SAP system using the SAP user interface:SE38.
The default selection is set to Source Code.
Figure 21-23 shows the SAP ABAP editor.
The Import from a Local File dialog displays as shown in Figure 21-25.
The ABAP code generated in Warehouse Builder is executed in the SAP application server.
SQLLDR USERID=scott/tiger CONTROL=abap_datactlfile.dat LOG=yourlogfile.log
Deployment of PL/SQL scripts for SAP transparent tables is the same as deployment of PL/SQL scripts for Oracle database sources. The PL/SQL scripts run in your Oracle data warehouse and perform remote queries to extract table data from the SAP application.
For related information, see Chapter 13, "Deploying Target Systems"
|
|
![]() Copyright © 2001, 2003 Oracle Corporation. All Rights Reserved. |
|