SAP Data Services offers various options for extracting data from an SAP system; examples include direct table reads (with or without an ABAP dataflow) or IDocs (for data transfers of business transactions). However, it is also possible to use a standard ODP extractor available in SAP. Extractors feature a delta mechanism. This makes them suitable, for example, for quickly reloading very large tables on a daily basis, or eliminates the need for you to manually determine which source fields are suitable for delta calculation.
Using an extractor in Data Services isn't very complicated. First, you need an ‘SAP Applications’ data store. Extractors can then be defined under ODP (Operational Data Provisioning) objects; in this case, two have been added:
The newly created extractor—for example, 2LIS_11_VAHDR for sales document header data—can be used as a source in a data flow:
The data provided by the extractor comes primarily from the VBAK table; this is why the target table is named after it. On the SAP Help Portal You can see exactly which source data the 2LIS_11_VAHDR extractor accesses.
By adjusting the extractor's configuration, you can specify that only the deltas (i.e., changed records) be retrieved:
With the settings outlined in red above, the extractor only transfers the changes, since ‘Initial Load’ is set to “No.” Only records that have changed since the datetime value specified under “Extract from datetime” are retrieved. The value $p_Delta_Datum refers to a user-defined parameter and contains the date and time of the previous delta processing, based on a control table containing the history of previous runs of the job. All other settings are populated with default values.
In the output fields shown in the screenshot above, two are outlined in green; these provide crucial information for using the extractor as a delta mechanism. The DI_SEQUENCE_NUMBER field indicates the order in which changes occurred; DI_OPERATION_TYPE contains the value ‘I’ or ‘D’ to indicate whether a record is an insertion or a deletion. An update does not have a separate status; it is simply a deletion of the old record followed by an insertion of the new one.
It is also possible to request a complete VBAK export simply by adjusting the configuration:
To be clear, this time no date and time were entered in the ‘Extract datetime from’ setting. These fields could be filled in, but they have no effect when “Initial Load” is set to “Yes.”.
Standard extractors in SAP can work very well in certain situations, thanks to their built-in delta mechanism combined with good performance. However, an extractor may not contain all the fields you need (now or in the future), so it is preferable to use direct table reads.