Professional Documents
Culture Documents
70806d62-1c59-2e10-7597-91c114600d32
70806d62-1c59-2e10-7597-91c114600d32
Applies to:
SAP BW 3.5 / SAP 7.0 Consultants. For more information, visit the EDW HomePage .
Summary
Fetch the delta on multiple fields for Generic Datasource (Transaction Data) based on Function Module Extraction.
Author:
Suraj Tigga
Author Bio
Suraj Tigga is a Senior SAP BI / ABAP consultant at Capgemini Consulting, India. Suraj joined Capgemini Consulting in 2008 and has worked on multiple SAP BI implementation and support projects.
Table of Contents
Scenario .............................................................................................................................................................. 3 Generic Datasource (Multiple Delta Fields) .................................................................................................... 3
Generic Datasource ..................................................................................................................................................... 4 Function Module .......................................................................................................................................................... 4 Execution ..................................................................................................................................................................... 5 Understanding.............................................................................................................................................................. 7
Scenario
SAP BI provides Generic Delta option while creating Generic Datasource to fetch data based on a particular field (present in the extract structure) either with timestamp or date whose values increased monotonously over time. System determines the data volume transferred in the delta method by comparing the maximum value transferred with the last load with the amount of data that has since entered the system. Only the newly arrived data is transferred. Document describes method to create an extractor based on multiple delta fields using Function Module Extraction. Data for SD Document: Delivery (From tables LIKP and LIPS) would be fetched based on two delta fields (AEDAT: Changed On) and (ERDAT: Date on Which Record Was Created). Generic Datasource (Multiple Delta Fields)
YBIDELIV
BI
ECC Generic Datasource (YBI_DELIVERY) Function Module: YBI_DELIVERY_DATA (Delta Fields: AEDAT and ERDAT)
Generic Datasource would fetch the data from LIKP (SD Document: Delivery Header Data) and LIPS (SD document: Delivery: Item data) based on delta fields AEDAT (Changed On) and ERDAT (Date on Which Record Was Created). a) Generic Datasource: Define the Function Module based Generic Datasource with AEDAT as a Generic Delta Field. b) Function Module: Function Module to fetch the data from LIKP and LIPS tables based on delta fields AEDAT and ERDAT. c) Execution: Explains the delta based on two fields while debugging.
Generic Datasource Step1: Create Generic Datasource YBI_DELIVERY based on Function Module YBI_DELIVERY_DATA and Generic Delta Field AEDAT.
YBIS_DELOVERY is the extract structure similar to the Database View YV_DELIVERY. Function Module Step1: Make a range based on the Generic Delta Field AEDAT and use the range while selecting data from Database View YV_DELIVERY.
Retrieve data from Database View (YV_DELIVERY) based on the range r_delta_date fed to the erdat and aedat in where clause:
Above statement would pick the values from database view YV_DELIVERY based on the range for ERDAT and AEDAT.
Execution After the Initialization is executed, check the entries in table ROOSGENDLM (Generic Delta Management for DataSources)
Step1: Go to transaction RSA3 and execute the datasource YBI_DELIVERY with update mode D:
Extraction Result:
Understanding
DATE(EXTRACTION) OPT SIGN LOW HIGH START DATE END DATE
Init Delta
20.04.2011 20.04.2011
BT BT
I I 16.04.2011
20.04.2011 20.04.2011
a) During Initialization the lower limit value of selection would be blank. The higher limit would be filled with current date. b) During delta request, the lower limit value would be 5 days less than the current date and the higher limit would be the previous delta request. This is due to the fact we had given a safety lower interval as 5 days. As a result, the lower interval was taken as the previous higher interval limit minus 5 days. c) The enhanced code takes the limit range in the delta load and then prepares a range out of it. And then this range would be used while selecting data from the concerned Database View.
DSO:
Related Content
For more information visit EDW HomePage.