Professional Documents
Culture Documents
Applies to:
This article applies to SAP BI 7.0 and SAP BW 3.X. For more information visit EDW Homepage.
Summary
This article explains the steps to create ALE Delta for Custom Datasource which is created using a ZTABLE. And also explains steps to create change document for created ZTABLE. Author: Venu Gopal. K
th
Author Bio
Venu Gopal K is working for YASH Technologies Pvt Ltd, India as SAP BI ABAP consultant.
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
Table of Contents
Introduction ......................................................................................................................................................... 3 Prerequisites to use delta ................................................................................................................................... 3 Steps to create ZTable ....................................................................................................................................... 3 Steps to create Change Document .................................................................................................................... 5 Steps to create Data Source............................................................................................................................... 8 Data Reconciliation ............................................................................................................................................. 9 Sample Code: ................................................................................................................................................... 11 Related Content ................................................................................................................................................ 12 Disclaimer and Liability Notice .......................................................................................................................... 13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
Introduction
There are different ways to extract data for R3 to BI system. The following update modes are available in BI: Full Update A full update requests all data that meets the selection criteria you set in the scheduler. Delta Update A delta update only requests data that has appeared in the source system since the last load. Initializing the delta process
We need to initialize a delta process before it can work. The initialization selections are copied to load the delta records. Among the above the updates depending upon the business we choose the proper UPDATE mode. With the large amounts of data created everyday in the business process, data to extract from source system will increase. We can have to ensure for a performance optimized extraction from source system if we use Delta Process. If it is transaction datasource we set GENERIC DELTA for the datasource using a delta relevant field with monotonically increasing value. In case of Master Datasource we have to set up ALE DELTA.
Give the description and add the fields in the fields column. Save, check and activate the datasource.
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
Note: To maintain ALE Delta the data element should be a Change Document Object that has to be declared as such at Data Element level itself by checking the check box beside Change Document.
The below screen shot shows where to make a data element as a change document object.
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
Enter the change document name and click on Continue. A popup window will be opened asking for change document is not in name space, just click YES as shown below.
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
Give the description for change document and enter the ZTable name for which change document has to be created. Also check the check box copy as internal table and click on Insert Entries.
Note: The check box copy as internal table has to be checked when more than one change document is present in the ZTable and if there is only one change document no need to check it.
The below screen will be displayed and click on save button and then back button.
Place the cursor on created (MAKTX) object and click on G enerate update program as shown below.
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
Soon after clicking on Generate update program a popup window is opened asking for change document is not in your namespace, just click on Yes.
After clicking on yes a popup window is appeared here mention the Function Group and choose the processing type as immediate update and click on Generate.
Note: To create function group go to tcode SE37 and form menu bar choose Goto -> Function Group -> Create Group. Activate the function group in tcode SE80.
Note: After clicking on Generate some crucial Data is generated and which has three types of Includes and One Function Module. The three types of includes are F<Object ID>CDT, F<Object ID>CDF and F<Object ID>CDV. The Function Module created is <Object ID>_WRITE_DOCUMENT.
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
Enter the application component name, description and view/table name as show below.
To set ALE Delta choose DataSource ALE Delta form the menu bar as shown below.
Enter the table name; change document created above and click on apply.
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
Data Reconciliation
Now the master datasource with ALE delta is generated successfully in R3 system. Replicate it to BI system and create Init InfoPackage to initialize delta process.
After executing init InfoPackage we can the same data present in R3 and BI systems as shown in fig1 and fig 2 respectively.
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
Fig 2: Records in PSA of BI system. Now Create the Delta InfoPackage and Execute it.
Now we see the changed and created records after execution of delta infopackage which can be seen in fig 3 and fig 4.
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
Sample Code:
Call the function module which is generated at creation of change document, while youre creating and changing the entries into the ZTable.
Note: If you create or change entries into the ZTable manually the changes will not be captured. For the changes to capture we need to create a Transaction program which creates or modifies the existing records.
Here the sample code for calling the function module while you are creating records into ZTable.
CALL FUNCTION 'MAKTX_WRITE_DOCUMENT' EXPORTING objectid tcode utime udate username * PLANNED_CHANGE_NUMBER = ' * OBJECT_CHANGE_INDICATOR = ' * PLANNED_OR_REAL_CHANGES = ' * NO_CHANGE_POINTERS = ' upd_icdtxt_maktx upd_zchg_doc TABLES icdtxt_maktx xzchg_doc yzchg_doc .
Give the object id and tcode which you have created and fill the it_new and it_old tables with the new records values which you are going to insert in the custom database table.
CALL FUNCTION 'MAKTX_WRITE_DOCUMENT' EXPORTING objectid = 'MAKTX' tcode = 'Z100' utime = sy-uzeit udate = sy-datum username = sy-uname * PLANNED_CHANGE_NUMBER = ' ' object_change_indicator = 'U' * PLANNED_OR_REAL_CHANGES = ' ' * NO_CHANGE_POINTERS = ' ' upd_icdtxt_maktx = 'U' upd_zchg_doc = 'U' TABLES icdtxt_maktx = it_cdtxt xzchg_doc = it_new yzchg_doc = it_old .
It_new and it_old should be filled with new and old values respectively while you are updating the existing record in ZTable.
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
Related Content
Change Document ALE Delta for Master Data Link to sample code to change records Steps to create transparent table For more information visit EDW Homepage
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable