lookup



Comments



Description

Finding BW Lookups by using Database Tables (or) ABAP ProgramApplies to: SAP BW 3.5 & BI 7.0. For more information, visit the EDW homepage Summary This document describes how to find the Transformations (or) Update Rules (or) Transfer Rules where the Lookup Info Providers are used for getting data into an Internal Table. Author: Mohammed Abdul Mubeen rd Company: Tata Consultancy Services Ltd. Created on: 23 January, 2011 Author Bio Mohammed Abdul Mubeen is a Certified Business Warehouse Solution Consultant and currently working in Tata Consultancy Services Ltd. His skills set includes BI, ABAP, MDM and Business Objects. SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 1 Finding BW Lookups by using Database Tables (or) ABAP Program Table of Contents Introduction ......................................................................................................................................................... 3 Business Scenario .............................................................................................................................................. 4 Solution ............................................................................................................................................................... 4 Finding BW Lookups by using Database Tables ................................................................................................ 4 Finding BW Lookups by using ABAP Program................................................................................................. 10 ABAP Program ................................................................................................................................................. 11 Summary........................................................................................................................................................... 13 Related Content ................................................................................................................................................ 14 Disclaimer and Liability Notice .......................................................................................................................... 15 SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 2 Finding BW Lookups by using Database Tables (or) ABAP Program Introduction In any BW Project Implementation, we normally use the LOOKUP concept for getting some fields data from some other (not source) Data Store Object in the Transformations/ Transfer Rules/ Update Rules of a model. For example, one Data Store Object (ZDSO1) contains the Delivery Header data from 2LIS_12_VCHDR data source and another Data Store Object (ZDSO2) contains the Delivery Item data from 2LIS_12_VCITM data source in Business Warehouse System. While Delivery Item Data Store data (ZDSO2) is updating to the final data target (ZDSO3), the corresponding delivery header field’s data will be read from the Delivery Header Data Store Objects (ZDSO1) data in the transformation. Therefore the extraction of delivery header and item data should be bundled and serialized (delivery header data before item data extraction) in one Process Chain. This above scenario is appropriate if we need to consolidate two separate Data Sources (i.e., two different Data Sources which extract data from different application areas, for example, sales order and deliveries, delivery and billings, production and controlling) where these two Data Sources don’t have many common characteristics. SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 3 Finding BW Lookups by using Database Tables (or) ABAP Program Business Scenario For example in the above model If the data loading into the Lookup Data Store Object(Delivery Header) is failed due to many reasons like Invalid Characters, Time Conversion Problem, huge number of records from the source system, user locked (or) not completed in Business Intelligence system then the target Data Store Object (Delivery Header & Item data) records doesn’t have the some Info Objects (Company Code, Plat) data from Delivery Header(ZDSO1) object. So as a Business Warehouse consultant we are going to indentify in which data flow models, the Delivery Header DSO Data is reading by using the LOOKUP Concept. Because once we figure it out which data flows are having the Impact if the data loading for Delivery Header DSO is failed then we will take necessary steps for data loading into those impacted data flows. Solution We can able to figure it out which BI data flow models has the Impact (missing data) from the Lookup DSO Object) by using one of below options .   Finding BW Lookups by using Database Tables Finding BW Lookups by using ABAP Program Finding BW Lookups by using Database Tables By using this method, we can able to find in which Transfer Rules/Update Rules/Transformations of a model, the Lookup Data Store Object (Header Data) is used for getting data in to an Internal Table. Because once we find out the models then we will take necessary steps for data loading again (repeat delta load or full load) if the data loading in LOOKUP Data Store Object is failed Go to Se11 -> Enter RSAABAP table > Contents. SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 4 Finding BW Lookups by using Database Tables (or) ABAP Program Enter the LOOKUP Info Provider in ‘EDIC: Program editor line’ column line below screen. Here I entered our Lookup Data Store Object(ZDSO1) to find where it is using in the Update Rules/Transfer Rules/Transformation. Then we will get the ABAP Code ID and piece of code where the Lookup Data Store Object ZDSO1 is used like below. SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 5 Finding BW Lookups by using Database Tables (or) ABAP Program Now we are going to find out the ABAP Code Type for the above ABAP Code ID values by using the table RSAROUT. So enter the RSAROUT table in SE11 -> enter the ABAP Code ID values in the contents like below Here In the above, UR means Update Rules and TF means Transformations SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 6 Finding BW Lookups by using Database Tables (or) ABAP Program Now we are going to figure it out the BI Transformation for the above ABAP Code ID values by using the table RSTRAN. So enter the RSTRAN table in SE11 -> enter the ABAP Code ID values in the contents like below. So in the above screen, the Lookup Data Store Object(ZDSO1) is used in the below Transformation and it’s source & target Info Providers . Source Info Provider : Target Info Provider : Transformation : ZSDD02 ZDSO1 03BAXZ87XRT0HG1QLTJ4NZQD30EL445M SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 7 Finding BW Lookups by using Database Tables (or) ABAP Program Now we will figure out for any BW Update Rules/Transfer Rukes for the above ABAP Code ID values by using the below tables.    RSUPDROUT RSUPDINFO RSTSRULES Update rules - ABAP routine - check table Update info (status and program) Transfer structure transfer rules Enter the RSUPDROUT table in SE11 -> enter the ABAP Code ID values in the contents like below. SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 8 Finding BW Lookups by using Database Tables (or) ABAP Program Copy the BW Update Rules ID (UPDID) from the above table and enter in to the RSUPDINFO table. So in the above screen, the Lookup Data Store Object(ZDSO1) is used in the below BW Update Rules and it’s source & target Info Providers . Source Info Provider : Target Info Provider : Update Rule : ZSDV, Z11V, ZRIM ZSD_O, Z11V_, ZSDDO 3ZKTGRK98O0QIP26VT99T 3ZS4RFTJNR3J6PI2MW09T 40AFWETO36JKHPGFHTRJ9 40CN6D62WLK1LV7RLCH81 42W63200TBQNO3MX5LUR4 Note: We can able to find out the BW Transfer Rules by using the RSTSRULES table in a similar way. SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 9 Finding BW Lookups by using Database Tables (or) ABAP Program Finding BW Lookups by using ABAP Program By using this method, we can able to find in which BI7.0 Transformations of a model the Lookup Data Store Object (Header Data) is used for getting data in an Internal Table. Because once we find out the models then we will take necessary steps for data loading again (repeat delta load or full load) if the data loading in LOOKUP Data Store Object is failed Here we created one Transaction Code ZBILOOKUP to find out the BI Transformations only in which the Lookup Data Store Object is used Enter ZBILOOKUP t-code in BW system -> Enter the Lookup Info Provider name (ZDSO1) Press ‘F8’ -> we will get the BI Transformations in which the Lookup Info Provider(ZDSO1) is used for getting data into an Internal Table. SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 10 Finding BW Lookups by using Database Tables (or) ABAP Program ABAP Program REPORT TYPES: BEGIN OF TYP_CODEID, CODEID TYPE RSAABAP-CODEID, END OF TYP_CODEID. TYPES: BEGIN OF TYP_TRANID, TRANID TYPE RSTRANSTEPROUT-TRANID, END OF TYP_TRANID. TYPES: BEGIN OF TYP_TARGETNAME, TARGETNAME TYPE RSTRAN-TARGETNAME, TRANID TYPE RSTRAN-TRANID, END OF TYP_TARGETNAME. DATA: GT_CODEID TYPE STANDARD TABLE OF TYP_CODEID WITH HEADER LINE, GR_CODEID TYPE TYP_CODEID, GT_TRANID TYPE STANDARD TABLE OF TYP_TRANID WITH HEADER LINE, GR_TRANID TYPE TYP_TRANID, GT_TARGETNAME TYPE STANDARD TABLE OF TYP_TARGETNAME WITH HEADER LINE, GT_TARGETNAME1 TYPE STANDARD TABLE OF TYP_TARGETNAME WITH HEADER LINE, GR_INFOPROV TYPE C LENGTH 12, lin1 type i, lin2 type i. SELECTION-SCREEN BEGIN OF BLOCK b120 WITH FRAME TITLE TEXT-001. PARAMETERS: INFOPROV TYPE C LENGTH 10. SELECTION-SCREEN END OF BLOCK b120. CONCATENATE '%' INFOPROV '%' INTO GR_INFOPROV. SELECT CODEID INTO TABLE GT_CODEID FROM RSAABAP WHERE LINE LIKE GR_INFOPROV AND OBJVERS EQ 'A'. ZBI_LOOKUP. TRANSLATE GR_INFOPROV TO LOWER CASE. SELECT CODEID INTO TABLE GT_CODEID FROM RSAABAP WHERE LINE LIKE GR_INFOPROV AND OBJVERS EQ 'A'. LOOP AT GT_CODEID INTO GR_CODEID. SELECT TRANID INTO TABLE GT_TRANID FROM RSTRANSTEPROUT WHERE CODEID EQ GR_CODEID-CODEID AND OBJVERS EQ 'A'. SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 11 Finding BW Lookups by using Database Tables (or) ABAP Program ENDLOOP. DESCRIBE TABLE GT_TRANID LINES lin1. IF lin1 NE 0. CLEAR: GT_TARGETNAME. REFRESH: GT_TARGETNAME. LOOP AT GT_TRANID INTO GR_TRANID. SELECT TARGETNAME TRANID INTO TABLE GT_TARGETNAME FROM RSTRAN WHERE TRANID EQ GR_TRANID-TRANID AND OBJVERS EQ 'A'. IF sy-subrc EQ 0. INSERT LINES OF GT_TARGETNAME INTO TABLE GT_TARGETNAME1. ENDIF. ENDLOOP. CLEAR: GT_TARGETNAME. REFRESH: GT_TARGETNAME. LOOP AT GT_CODEID INTO GR_CODEID. SELECT TARGETNAME TRANID INTO TABLE GT_TARGETNAME FROM RSTRAN WHERE OBJVERS EQ 'A' AND ( STARTROUTINE EQ GR_CODEID-CODEID OR ENDROUTINE EQ GR_CODEID-CODEID OR EXPERT EQ GR_CODEID-CODEID ). IF sy-subrc EQ 0. INSERT LINES OF GT_TARGETNAME INTO TABLE GT_TARGETNAME1. ENDIF. ENDLOOP. ELSE. CLEAR: GR_CODEID. CLEAR: GT_TARGETNAME. REFRESH: GT_TARGETNAME. LOOP AT GT_CODEID INTO GR_CODEID. SELECT TARGETNAME TRANID INTO TABLE GT_TARGETNAME FROM RSTRAN WHERE OBJVERS EQ 'A' AND ( STARTROUTINE EQ GR_CODEID-CODEID OR ENDROUTINE EQ GR_CODEID-CODEID OR EXPERT EQ GR_CODEID-CODEID ). IF sy-subrc EQ 0. INSERT LINES OF GT_TARGETNAME INTO TABLE GT_TARGETNAME1. ENDIF. SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 12 Finding BW Lookups by using Database Tables (or) ABAP Program ENDLOOP. SORT GT_TARGETNAME1 BY TARGETNAME TRANID ASCENDING. DELETE ADJACENT DUPLICATES FROM GT_TARGETNAME1 COMPARING TARGETNAME TRANID. ENDIF. DESCRIBE TABLE GT_TARGETNAME1 LINES lin2. IF lin2 NE 0. WRITE:/ '------------------------------------------------------------------------'. WRITE:/ 'InfoProvider' COLOR 3. WRITE: ' '. WRITE: '|Transformation ID' COLOR 3. WRITE:/ '------------------------------------------------------------------------'. LOOP AT GT_TARGETNAME1. WRITE:/ GT_TARGETNAME1. ENDLOOP. ELSE. WRITE:/ 'No InfoProviders are doing WRITE: INFOPROV COLOR 4. ENDIF. a look-up on' COLOR 4. Summary In a nutshell, by using some BW database tables(RSAABAP, RSAROUT, RSTRAN, RSTRANSTEPROUT, RSUPDROUT, RSUPDINFO, RSTSRULES) we can able to find out the BI Transformations/ BW Update Rules/ BW Transfer Rules where the Lookup Info Providers are used for getting the data in an Internal Table. Similarly, by using the ABAP Program we can only find out the BI Transformations where the Lookup Info Providers are used for getting the data in an Internal Table. So Finding BI Lookups by using Database Tables is proper method for getting correct transformations, update rules, transfer rules for Lookup Info Providers SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 13 Finding BW Lookups by using Database Tables (or) ABAP Program Related Content SAP Compliance Management Performing Lookup from Application Client FAQ - Running the Enterprise Data Warehousing For more information, visit the EDW homepage SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 14 Finding BW Lookups by using Database Tables (or) ABAP Program Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported 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 or code 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 content of this document. SAP COMMUNITY NETWORK © 2011 SAP AG SDN - sdn.sap.com | BPX - bpx.sap.com | BA - boc.sap.com | UAC - uac.sap.com 15
Copyright © 2024 DOKUMEN.SITE Inc.