7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
1/13
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 1
Steps to Activate ALE Delta forCustom Master DatasourceCreated on ZTable
Applies to:
This article applies to SAP BI 7.0 and SAP BW 3.X. For more information visitEDW 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
Company: YASH Technologies Pvt Ltd
Created on: 15th
Sep 2011
Author Bio
Venu Gopal K is working for YASH Technologies Pvt Ltd, India as SAP BI ABAP consultant.
http://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edw7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
2/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 2
Table of Contents
Introduction ......................................................................................................................................................... 3Prerequisites to use delta ................................................................................................................................... 3Steps to create ZTable ....................................................................................................................................... 3Steps to create Change Document .................................................................................................................... 5Steps to create Data Source............................................................................................................................... 8Data Reconciliation ............................................................................................................................................. 9Sample Code: ................................................................................................................................................... 11Related Content ................................................................................................................................................ 12Disclaimer and Liability Notice .......................................................................................................................... 13
7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
3/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 3
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 toload the delta records.
Among the above the updates depending upon the business we choose the proper UPDATE mode. With thelarge amounts of data created everyday in the business process, data to extract from source system willincrease. We can have to ensure for a performance optimized extraction from source system if we use DeltaProcess. If it is transaction datasource we set GENERIC DELTA for the datasource using a delta relevantfield with monotonically increasing value. In case of Master Datasource we have to set up ALE DELTA.
Prerequisites to use delta
Master data attributes or texts for which you want to use a delta transfer have to fulfill two prerequisites
1. Data must be extracted generically using a transparent table or a database view.2. A change document object must be available that can update the complete key of the table
(or view) used for data extraction in combination with one of the tables on which the changedocument object is based.
Below are the steps to create ZTable and Change document
Steps to create ZTable
Navigate to Data dictionary using Tcode SE11 and enter the table name and click on create buttonas shown below.
Give the description and add the fields in the fields column. Save, check and activate thedatasource.
7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
4/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 4
Note: To maintain ALE Delta the data element should be a Change Document Object that has to be declared as such atData 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.
7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
5/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 5
Steps to create Change Document
Goto Change Document Object Overview using tcode SCDO. Click on Createbutton as shownbelow.
Enter the change document name and click on Continue. A popup window will be opened asking forchange document is not in name space, just click YES as shown below.
7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
6/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 6
Give the description for change document and enter the ZTable name for which change documenthas 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 backbutton.
Place the cursor on created (MAKTX) object and click on G enerate update program as shown below.
7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
7/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 7
Soon after clicking on Generate update program a popup window is opened asking for changedocument 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 theprocessing 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 OneFunction Module. The three types of includes are FCDT, FCDF and FCDV.The Function Module created is _WRITE_DOCUMENT.
Below are the INCLUDES and FM generated.
7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
8/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 8
Steps to create Data Source
Goto RSO2 transaction and give the data source name and click on create.
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 documentcreated above and click on apply.
7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
9/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 9
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 infig1 and fig 2 respectively.
Fig 1: Records in R3 Table.
7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
10/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 10
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 beseen in fig 3 and fig 4.
Fig 3: New and Modified records in R3 system.
Fig 4: Same new and modified records in BI System.
7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
11/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 11
Sample Code:
Call the function module which is generated at creation of change document, while youre creating andchanging 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 tocapture 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'
EXPORTINGobjectid = 'MAKTX'
tcode = 'Z100'
utime = sy-uzeitudate = sy-datum
username = sy-uname
* PLANNED_CHANGE_NUMBER = ' '
* OBJECT_CHANGE_INDICATOR = ' '
* PLANNED_OR_REAL_CHANGES = ' '
* NO_CHANGE_POINTERS = ' '
upd_icdtxt_maktx = 'I'upd_zchg_doc = 'I'
TABLES
icdtxt_maktx = it_cdtxtxzchg_doc = it_new
yzchg_doc = it_old.
Below is the sample code of calling FM while changing existing record.
CALL FUNCTION 'MAKTX_WRITE_DOCUMENT'EXPORTING
objectid = 'MAKTX'tcode = 'Z100'utime = sy-uzeit
udate = sy-datumusername = 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_cdtxtxzchg_doc = it_new "New Valuesyzchg_doc = it_old "Old Values
.
It_new and it_old should be filled with
new and old values respectively whileyou are updating the existing record inZTable.
Give the object idand t codewhichyou have created and fill the i t_newand i t_oldtables with the new recordvalues which you are going to insert ithe custom database table.
7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
12/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
2011 SAP AG 12
Related Content
Change Document
ALE Delta for Master Data
Link to sample code to change records
Steps to create transparent tableFor more information visitEDW Homepage
http://wiki.sdn.sap.com/wiki/display/ABAP/Change+Documenthttp://wiki.sdn.sap.com/wiki/display/ABAP/Change+Documenthttp://help.sap.com/saphelp_nw70ehp1/helpdata/en/37/4f3ca8b672a34082ab3085d3c22145/frameset.htmhttp://help.sap.com/saphelp_nw70ehp1/helpdata/en/37/4f3ca8b672a34082ab3085d3c22145/frameset.htmhttp://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1499ec90-0201-0010-769f-860989655f7e?QuickLink=index&overridelayout=truehttp://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1499ec90-0201-0010-769f-860989655f7e?QuickLink=index&overridelayout=truehttp://www.saptechnical.com/Tutorials/ABAP/TableCreate/page1.htmhttp://www.saptechnical.com/Tutorials/ABAP/TableCreate/page1.htmhttp://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edwhttp://www.sdn.sap.com/irj/sdn/edwhttp://www.saptechnical.com/Tutorials/ABAP/TableCreate/page1.htmhttp://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1499ec90-0201-0010-769f-860989655f7e?QuickLink=index&overridelayout=truehttp://help.sap.com/saphelp_nw70ehp1/helpdata/en/37/4f3ca8b672a34082ab3085d3c22145/frameset.htmhttp://wiki.sdn.sap.com/wiki/display/ABAP/Change+Document7/30/2019 Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
13/13
Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is notsupported 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 orcode sample, including any liability resulting from incompatibility between the content within this document and the materials andservices offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of thisdocument.