db connect delta

Upload: katepalliuk

Post on 07-Apr-2018

234 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 DB Connect Delta

    1/12

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

    2011 SAP AG

    DB Connect with Delta Mechanism

    Applies to:

    SAP BI/BW. For more information, visit theEDW homepage

    Summary

    This Article demonstrates the steps for handling Delta mechanism with Relational Database ManagementSystem (RDBMS) like SQL, ORACLE, etc.

    Author: Obaidullah Shaikh

    Company: AG Technologies

    Created on: 02 September 2011

    Author Bio

    Obaidullah shaikh is a SAP BI Consultant with AG Technologies. He has good skill in technical areas(ABAP) and he has experience of multiple custome reports development and has experience ofMigration/upgradation/Audit projects as wel.

    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/edw
  • 8/3/2019 DB Connect Delta

    2/12

    DB Connect with Delta Mechanism

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

    2011 SAP AG

    Table of Contents

    Delta Mechanism in DB Connect ........................................................................................................................ 3SQL Table ....................................................................................................................................................... 3SQL Delta Table .............................................................................................................................................. 4Trigger ............................................................................................................................................................. 5Database Connection with SAP BI ................................................................................................................. 6Data source ..................................................................................................................................................... 6Info Package ................................................................................................................................................... 6Data Transfer Process (DTP) ......................................................................................................................... 7Records in BI ................................................................................................................................................... 7Update Records in SQL .................................................................................................................................. 8Extract Delta to BW ......................................................................................................................................... 8Clear Delta from SQL .................................................................................................................................... 10

    Related Content ................................................................................................................................................ 11Disclaimer and Liability Notice .......................................................................................................................... 12

  • 8/3/2019 DB Connect Delta

    3/12

    DB Connect with Delta Mechanism

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

    2011 SAP AG

    Delta Mechanism in DB Connect

    SQL Table

    Create Table Named (MAT_DESC) as a Base Table

    Inserted some Records in that.

  • 8/3/2019 DB Connect Delta

    4/12

    DB Connect with Delta Mechanism

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

    2011 SAP AG

    SQL Delta Table

    Create another Table (Like Delta Queue in SAP R/3) that will be filled with only delta Records,

    This table has same columns except the DDate, which will be used to provide Delta functionality

    Initially, MAT_DESC_DELTA will be blank

  • 8/3/2019 DB Connect Delta

    5/12

    DB Connect with Delta Mechanism

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

    2011 SAP AG

    Trigger

    Create Trigger on MAT_DESC table (whenever any new record will be inserted, this trigger will execute andwill fill the Delta table (MAT_DESC_DELTA))

    Example: one record is inserted in MAT_DESC

    That Record is updated in MAT_DESC_DELTA by Trigger

    Similarly create another trigger for Update/Delete Command

  • 8/3/2019 DB Connect Delta

    6/12

    DB Connect with Delta Mechanism

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

    2011 SAP AG

    Database Connection with SAP BI

    Refer the following Link

    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/503c4394-cfb6-2e10-349e-85052e8e957d

    Data source

    In BI, Create Data source that will be based on base table (MAT_DESC)

    Info Package

    Create Info Package and load it to PSA

    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/503c4394-cfb6-2e10-349e-85052e8e957dhttp://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/503c4394-cfb6-2e10-349e-85052e8e957dhttp://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/503c4394-cfb6-2e10-349e-85052e8e957d
  • 8/3/2019 DB Connect Delta

    7/12

    DB Connect with Delta Mechanism

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

    2011 SAP AG

    Data Transfer Process (DTP)

    Create Transformation / DTP and Trigger it

    Records in BI

    Finally Records in Targets

  • 8/3/2019 DB Connect Delta

    8/12

    DB Connect with Delta Mechanism

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

    2011 SAP AG

    Update Records in SQL

    Enter some New records in MAT_DESC

    It will be reflected in MAT_DESC_DELTA

    Extract Delta to BW

    Go to BW, Change the table of Data source, ( MAT_DESC changed with MAT_DESC_DELTA)

  • 8/3/2019 DB Connect Delta

    9/12

    DB Connect with Delta Mechanism

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

    2011 SAP AG

    Create other Info Package of that Data source

    Will extract only Three new records

    Then move it to target via DTP

  • 8/3/2019 DB Connect Delta

    10/12

    DB Connect with Delta Mechanism

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

    2011 SAP AG

    Clear Delta from SQL

    Create another trigger that will clear the previous day records from MAT_DESC_DELTA at every Log on thatalready has been fetched in BI

    Here we can create user specific trigger

    The Remaining part of Duplication of records can be handled easily in BI, either by ABAP code or passingrecords through DSO in overwrite mode.

  • 8/3/2019 DB Connect Delta

    11/12

    DB Connect with Delta Mechanism

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

    2011 SAP AG

    Related Content

    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/503c4394-cfb6-2e10-349e-85052e8e957d

    http://help.sap.com/saphelp_nw04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htm

    http://www.saptechnical.com/Tutorials/BI/DBConnect/Index.htm

    For more information, visit theEDW homepage

    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/503c4394-cfb6-2e10-349e-85052e8e957dhttp://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/503c4394-cfb6-2e10-349e-85052e8e957dhttp://help.sap.com/saphelp_nw04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htmhttp://www.saptechnical.com/Tutorials/BI/DBConnect/Index.htmhttp://www.saptechnical.com/Tutorials/BI/DBConnect/Index.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/BI/DBConnect/Index.htmhttp://help.sap.com/saphelp_nw04/helpdata/en/58/54f9c1562d104c9465dabd816f3f24/content.htmhttp://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/503c4394-cfb6-2e10-349e-85052e8e957d
  • 8/3/2019 DB Connect Delta

    12/12

    DB Connect with Delta Mechanism

    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 not supportedby 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 codesample, including any liability resulting from incompatibility between the content within this document and the materials and services offeredby SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.