Escolar Documentos
Profissional Documentos
Cultura Documentos
Applies to:
SAP BI 7.0. For more information, visit the EDW homepage.
Summary
The article presents how to create extractors for delta update of documents that are changeable after creation, such document as sales order, sales delivery, and purchasing orders and other. Author: Sergiu Iatco
Author Bio
Sergiu Iatco works with SAP since 1999. He has experience in SAP ERP Logistics in Oil industry and in Metal Industry. Knowledge gained from ERP experience helped him to extend successfully to SAP BI. He is a hands on manager and likes simplified, but valuable approaches to issues.
Table of Contents
Introduction ................................................................................................................................................... 3 Updating of created documents ..................................................................................................................... 3 Updating of changed documents ................................................................................................................... 7 Updating of deleted sales documents .......................................................................................................... 11 DataSources ............................................................................................................................................... 15 DataSources in ERP................................................................................................................................ 15 DataSources in BI.................................................................................................................................... 18 Weaknesses ............................................................................................................................................... 19 Related Content .......................................................................................................................................... 20 Disclaimer and Liability Notice ..................................................................................................................... 21
Introduction
The article describes how to provide delta update for documents without special developed delta program and also how to ensure update for documents that can be changed. For instance, material documents can not be changed, excepting some descriptive fields in header and item. Therefore once the material document has been updated all data are final and do not need any further update. On the contrary sales order, sales billing document, purchase order and a lot of other documents can be changed, therefore changes has to be updated. Changes can be tracked usually using field [Change on]. However there are cases when field is not changed if a BAPI is used and sometimes is not changed even when standard transaction is used. Additionally to changes a document can be deleted, consequently deletion also has to be updated. The following method describes sales order update, which could be suitable also for other documents. Data in sales order are defined uniquely by [Document] and [Item], consequently an ODS with these Key fields is created with technical name ZSD_O01. The data source is based on InfoSet(Logical Database VAV), because InfoSet is accessible as a standard tool, programming is used only for some additional calculations.
Transformation
Filling of field [ERDAT] with interval of last 7 days (at least 2 days required) More then 2 days could provide an overwriting of missing days, even when update errors occurs sometimes. However that means more time for data update.
Routine ERDAT
Transformation
Routine UDATE
Routine SELECT_DD_VBELN with data upload from ZSD_O07. Because selection is only by document number, when a changes occur the sales document is updated with all items.
Transformation Is the same as in chapter Updating of changed documents. Data Transfer Process Is the same as in chapter Updating of changed documents.
Note: DataSource 8ZSD_O01 extracts data from BI, not from ERP.
Transformation
Routine for 0ORDER_QUAN, when an item is deleted quantity is filled with 0. Notice that if one day an item is deleted and then next day is inserted in sales order in ERP, then in analytical system document quantity is filled with 0 and then is updated with all characteristics because ZSD_O01 has unique keys document and item.
InfoPackage
Routine for Sales Order aggregated characteristic ZORD_CL01. ZORD_CL01 is used to update only the deleted item of a sales order.
DataSources
DataSources in ERP DataSource for ZSD_O01
DataSources in BI Notice that DataSource 8ZSD_O01 extracts data from BI, not from ERP.
Note: DataSource 8ZSD_O01 extracts data from BI, not from ERP.
Extracted data are updated back to ZSD_O01 but with quantity changed to 0.
Weaknesses
The overwritten of last 2 days (7 days) works successfully with daily RSPC that is monitored properly with alerts. However if is necessary to calculate exact period to be updated, beginning date of the period has to be read from ODS by adding a field timestamp. That will provide a dynamic period calculation, instead of a fixed period of 2 days (7days). With fixed period of overwriting, the constant value from routine could be replaced with selection from a customer maintenance table (transaction SM30) in order to avoid modification of routines. There is a limit of rows that can be filled into fields of DataSelection of InfoPackage. I monitored daily updates with less then 20000 rows and it works fine. Limitation can be overcome by developing of tracking of change log on ERP side, but that means more ABAP programming. If you want to develop updates as in standard SAP you have to develop function modules based on provided samples: RSAX_BIW_GET_DATA_SIMPLE for full upload and RSVD_BW_GET_DELTA_DATA for delta upload.
Related Content
http://help.sap.com/saphelp_nw04/helpdata/en/f9/45503c242b4a67e10000000a114084/frameset.htm http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8134 https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5b062adbb3e33 For more information, visit the EDW homepage.