Docstoc

generic delta explainde

Document Sample
generic delta explainde Powered By Docstoc
					 SAP BW - Generic Datasource
 Function Module (Multiple Delta
 Fields)




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
Company: Capgemini Consulting
Created on: 20 April 2011

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.




SAP COMMUNITY NETWORK                  SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG                                                                                                      1
                                                                                        SAP BW - Generic Datasource Function Module (Multiple Delta Fields)




Table of Contents
Scenario .............................................................................................................................................................. 3
   Generic Datasource (Multiple Delta Fields) .................................................................................................... 3
       Generic Datasource ..................................................................................................................................................... 4
       Function Module .......................................................................................................................................................... 4
       Execution ..................................................................................................................................................................... 5
       Understanding.............................................................................................................................................................. 7
Related Content .................................................................................................................................................. 8
Disclaimer and Liability Notice ............................................................................................................................ 9




SAP COMMUNITY NETWORK                                           SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG                                                                                                                               2
                                                     SAP BW - Generic Datasource Function Module (Multiple Delta Fields)




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)




                                                                                                    BI
                                            YBIDELIV




                                                                                                    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.




SAP COMMUNITY NETWORK                 SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG                                                                                                     3
                                                    SAP BW - Generic Datasource Function Module (Multiple Delta Fields)


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.



SAP COMMUNITY NETWORK                SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG                                                                                                    4
                                                       SAP BW - Generic Datasource Function Module (Multiple Delta Fields)


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’:




Entries in internal table i_t_select:




Check the entries in range r_delta_date




SAP COMMUNITY NETWORK                   SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG                                                                                                       5
                                                       SAP BW - Generic Datasource Function Module (Multiple Delta Fields)




Check the entries in the internal table e_t_data:




Extraction Result:




SAP COMMUNITY NETWORK                   SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG                                                                                                       6
                                                       SAP BW - Generic Datasource Function Module (Multiple Delta Fields)


Understanding
         DATE(EXTRACTION)         OPT    SIGN   LOW              HIGH                START DATE            END DATE


 Init    20.04.2011               BT     I                       20.04.2011                                20.04.2011

 Delta   20.04.2011               BT     I      16.04.2011       20.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.


Data loaded (DSO):




Validation:
Datasource Extract:




DSO:




SAP COMMUNITY NETWORK                   SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG                                                                                                       7
                                                  SAP BW - Generic Datasource Function Module (Multiple Delta Fields)




Related Content
For more information visit EDW HomePage.




SAP COMMUNITY NETWORK              SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG                                                                                                  8
                                                                   SAP BW - Generic Datasource Function Module (Multiple Delta Fields)




Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.




SAP COMMUNITY NETWORK                            SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG                                                                                                                9

				
DOCUMENT INFO
Shared By:
Stats:
views:46
posted:1/3/2012
language:English
pages:9