BI Delta Update Extractor for Changeable Documents.pdf

download BI Delta Update Extractor for Changeable Documents.pdf

of 21

Transcript of BI Delta Update Extractor for Changeable Documents.pdf

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    1/21

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

    2010 SAP AG 1

    BI Delta Update Extractor forChangeable Documents

    Applies to:

    SAP BI 7.0. For more information, visit theEDW homepage.

    Summary

    The article presents how to create extractors for delta update of documents that are changeable aftercreation, such document as sales order, sales delivery, and purchasing orders and other.

    Author: Sergiu Iatco

    Company: ALRO

    Created on: 01 June 2010

    Author Bio

    Sergiu Iatco works with SAP since 1999. He has experience in SAP ERP Logistics in Oilindustry and in Metal Industry. Knowledge gained from ERP experience helped him toextend successfully to SAP BI. He is a hands on manager and likes simplified, butvaluable approaches to issues.

    https://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bi
  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    2/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 2

    Table of Contents

    Introduction ................................................................................................................................................... 3Updating of created documents ..................................................................................................................... 3Updating of changed documents ................................................................................................................... 7Updating of deleted sales documents .......................................................................................................... 11DataSources ............................................................................................................................................... 15

    DataSources in ERP ................................................................................................................................ 15DataSources in BI.................................................................................................................................... 18

    Weaknesses ............................................................................................................................................... 19Related Content .......................................................................................................................................... 20Disclaimer and Liability Notice ..................................................................................................................... 21

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    3/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 3

    Introduction

    The article describes how to provide delta update for documents without special developed delta programand also how to ensure update for documents that can be changed. For instance, material documentscan not be changed, excepting some descriptive fields in header and item. Therefore once the materialdocument has been updated all data are final and do not need any further update. On the contrary salesorder, sales billing document, purchase order and a lot of other documents can be changed, thereforechanges 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 standardtransaction is used. Additionally to changes a document can be deleted, consequently deletion also hasto 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 Keyfields is created with technical name ZSD_O01. The data source is based on InfoSet(Logical DatabaseVAV), because InfoSet is accessible as a standard tool, programming is used only for some additionalcalculations.

    Updating of created documents

    Selection of created sale documents can be done using field ERDAT, because it is always filled by ERPand is never changed after document creation.

    Process chain is scheduled to run daily and to update all documents that have been created at least last2 days from current date.

    Sales Orders ODS: ZSD_O01

    Data flow that updates created sale documents

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    4/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 4

    Transformation

    Routine ZORD_CL01 aggregated characteristic for document and item

    Data Transfer Process is Full

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    5/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 5

    InfoPackage with calculated selection on ERDAT

    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 occurssometimes. However that means more time for data update.

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    6/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 6

    Routine ERDAT

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    7/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 7

    Updating of changed documents

    To update changed documents same method can be used as for Updating of created documents,however as has been described at the beginning there are cases when field [Changed on] is notupdated. The method described uses track changes from cross functionality Documents changes.Documents changes are stored in tables CDHDR and CDPOS. Most of documents provide changes log,though not all documents have these functionality, but it can be custom developed in ERP when required,reference transaction SCDO, report SE38/RSSCD200. The method requires:

    To collect in an ODS (ZSD_O07) changes of last 2 days. Last 2 days are calculatedautomatically based on current day.

    To select for update in sales orders ODS (ZSD_O01) documents that has been changed.

    Changed sale documents ODS: ZSD_O07

    Data flow ZSD_O07

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    8/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 8

    Transformation

    Routine in transformation for aggregated characteristic of document number and item

    Routine transformation for document number

    Routing transformation for item

    Data transfer process is Full

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    9/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 9

    InfoPackage for changed documents

    Routine UDATE

    Data flow Delta Changed

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    10/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 10

    InfoPackage Delta Change

    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 updatedwith all items.

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    11/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 11

    Updating of deleted sales documents

    To track deletion of sales orders in analytical systems is enough to mark the data as deleted, and notmandatory to delete them physically. In presented below method when a sales order item is deletedquantity is changed to 0.

    Process chain for deleted sales orders

    Data flow: collection of deleted sales orders

    Transformation

    Is the same as in chapterUpdating of changed documents.

    Data Transfer Process

    Is the same as in chapterUpdating of changed documents.

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    12/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 12

    InfoPackage deleted documents

    Routine for Creation date of change logs

    Data flow to update ZSD_O01

    Note: DataSource 8ZSD_O01 extracts data from BI, not from ERP.

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    13/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 13

    Data Transfer Process

    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 inanalytical system document quantity is filled with 0 and then is updated with all characteristics becauseZSD_O01 has unique keys document and item.

    InfoPackage

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    14/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 14

    Routine for Sales Order aggregated characteristic ZORD_CL01. ZORD_CL01 is used to update only thedeleted item of a sales order.

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    15/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 15

    DataSources

    DataSources in ERP

    DataSource for ZSD_O01

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    16/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 16

    DataSource for ZSD_O07

    Join of CDPOS table

    Calculation of items status deleted or not deleted (only changed)

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    17/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 17

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    18/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 18

    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.

    Generation of Export DataSource from ZSD_O01:

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    19/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 19

    Weaknesses

    The overwritten of last 2 days (7 days) works successfully with daily RSPC that is monitored properly withalerts. However if is necessary to calculate exact period to be updated, beginning date of the period hasto be read from ODS by adding a field timestamp. That will provide a dynamic period calculation, insteadof a fixed period of 2 days (7days). With fixed period of overwriting, the constant value from routine couldbe replaced with selection from a customer maintenance table (transaction SM30) in order to avoidmodification of routines.

    There is a limit of rows that can be filled into fields of DataSelection of InfoPackage. I monitored dailyupdates with less then 20000 rows and it works fine. Limitation can be overcome by developing oftracking of change log on ERP side, but that means more ABAP programming. If you want to developupdates 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.

  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    20/21

    BI Delta Update Extractor for Changeable Documents

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

    2010 SAP AG 20

    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-13b5-b062adbb3e33

    For more information, visit theEDW homepage.

    http://help.sap.com/saphelp_nw04/helpdata/en/f9/45503c242b4a67e10000000a114084/frameset.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/f9/45503c242b4a67e10000000a114084/frameset.htmhttp://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8134http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8134https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33https://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8134http://help.sap.com/saphelp_nw04/helpdata/en/f9/45503c242b4a67e10000000a114084/frameset.htm
  • 7/29/2019 BI Delta Update Extractor for Changeable Documents.pdf

    21/21

    BI Delta Update Extractor for Changeable Documents

    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 thisdocument, 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 and

    services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the conte nt ofthis document.