Skip Headers
Oracle® Fusion Middleware Getting Started with SAP ABAP BW Adapter for Oracle Data Integrator
11g Release 1 (11.1.1)

Part Number E16597-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

7 Creating a Package for Delta Extraction

This chapter describes how to create a package for delta extraction.

So far we have seen examples of extracting data from BW data targets. The instructions in this chapter explain how the interfaces introduced in the previous chapters can be turned into delta extraction interfaces.

In delta extraction interfaces only the data, which was changed after last extraction, is extracted. Delta extraction interfaces are only supported for InfoCubes, ODS/DSO and Open Hub objects, but not for InfoObjects.

This chapter includes the following topics:

Modify the Interface Flow

The first step is to modify the interface:

  1. Select the desired Interfaces.

  2. Double click the interface.

  3. Select the Flow tab.

  4. Click the ODI source set.

  5. Set KM option values for FIRST_REQ_ID and LAST_REQ_ID KM as shown below.

    Description of image126.jpg follows
    Description of the illustration image126.jpg

  6. Click OK to save and close your interface.

Creating the MIN_REQUEST_ID Variable

The second step consists of creating an ODI variable that stores the last extracted request ID. This request ID serves as the starting point for the next extraction run:

  1. Create a MIN_REQUEST_ID variable to hold the last request id. The MIN_REQUEST_ID variable has to be a numeric variable with a Historize or Last-value Action as shown below.

    Description of image128.jpg follows
    Description of the illustration image128.jpg

  2. The value of this variable is updated at the end of the delta extraction package described in the third step. It happens once delta extraction is finished and the MAX REQUEST ID will be fetched from SAP BW system and will be stored into the ODI Variable (MIN_REQUEST_ID). The refresh expression shown here is used to update the variable:

    Description of image130.jpg follows
    Description of the illustration image130.jpg

Creating a Package for Delta Extraction

In the third step the building blocks created in the previous steps are put together: Variable and Interfaces are arranged into a Package:

  1. Open the SAP Demo Project.

  2. Create a new Package named SAP Demo.

  3. Insert a Declare Variable step to this Package:

    Drag and Drop the MIN_REQUEST_ID variable and select the "Declare Variable" step type.

  4. Insert a Flow step to this Package:

    Drag and drop the Interface created in the previous sections for InfoCube/ ODS or OpenHub-Extraction in the Package.

  5. Insert a Refresh Variable step to this Package.

    Drag and Drop the MIN_REQUEST_ID variable and select the "Refresh Variable" step type.

  6. Definine the step sequence.

    1. Define the Refresh Variable step as the First Step.

    2. Link it to the Flow step that is the next step upon success.

    3. Link the the Flow step to the Refresh Variable step that is the next step upon success and the last step in the Package. Add arrows between the variables.

    Your Package should look as shown on this screenshot.

    Description of image132.jpg follows
    Description of the illustration image132.jpg

Running the Package

To run the integration Package:

What happens when you execute the delta extraction Package?

First, Oracle Data Integrator initializes the variable MIN_REQUEST_ID with the last historized value (declare variable step). This value is then passed into ABAP extraction program to specify where to start the data extraction. The KM queries the SAP system for the highest assigned request ID. All data between min and max request ID will be extracted (interface).

After the execution of the interface the refresh variable step stores the highest request ID into MIN_REQUEST_ID for next extraction run.