Transport Validation.pdf

30
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2010 SAP AG 1 SAP BW BEx Query Transport Validation Applies to: This article is applicable to all the SAP BI 7.0 consultants who are novice with SAP ABAP skills. For more information, visit the EDW Home Page . Summary Explains method to validate the Objects of BEx Query transport requests with the Query Components and highlight the discrepancies while collecting the Query Components to the Transport. Author: Suraj Tigga Company: Capgemini Consulting India Pvt. Ltd. Created on: 13 September 2010 Author Bio Suraj Tigga is a Senior SAP BI / ABAP consultant at Capgemini Consulting, India. Suraj joined Capgemini Consulting in 2008 and has worked on multiple SAP BI implementation and support Projects.

Transcript of Transport Validation.pdf

Page 1: Transport Validation.pdf

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

© 2010 SAP AG 1

SAP BW – BEx Query Transport

Validation

Applies to:

This article is applicable to all the SAP BI 7.0 consultants who are novice with SAP ABAP skills. For more information, visit the EDW Home Page .

Summary

Explains method to validate the Objects of BEx Query transport requests with the Query Components and highlight the discrepancies while collecting the Query Components to the Transport.

Author: Suraj Tigga

Company: Capgemini Consulting India Pvt. Ltd.

Created on: 13 September 2010

Author Bio

Suraj Tigga is a Senior SAP BI / ABAP consultant at Capgemini Consulting, India. Suraj joined Capgemini Consulting in 2008 and has worked on multiple SAP BI implementation and support Projects.

Page 2: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

Scenario .............................................................................................................................................................. 3

Validation - (Query Components and Transport Request Objects) .................................................................... 3

ABAP Code Logic (Compare Query Components and Transport Objects) .................................................... 3 Step 1: Make the selection screen which takes ‘Transport Request’ and ‘Query Name’ as input: ............................... 3

Step 2: Fetch the Objects (UUID) present in the Transport Request: .......................................................................... 4

Step 3: Fetch the Query Components (UUID): ............................................................................................................. 5

Step 4: Compare the Query Components with the Objects present in transport: ......................................................... 6

Transport Validation - Matches with Query Components ............................................................................... 7 Step 1: Create a Query ‘ZSD_O03_Q001’: .................................................................................................................. 7

Step 2: Collect the Query to transport (Transaction RSOR):........................................................................................ 7

Step 3: Execute the ABAP Code with entries as following: .......................................................................................... 8

Transport Validation – Missing Query Component in Transport ................................................................... 10 Step 1: Create a Query ‘ZSD_O03_Q004’ as mentioned below: ............................................................................... 10

Step 2: Collect the Query Components to Transport Request ................................................................................... 10

Step 3: Execute the ABAP Code with the below selection: ........................................................................................ 11

Transport Validation – Extra Objects Present in Transport apart from Query Components ........................ 13 Step 1: Create a Query ‘ZSD_O03_Q003’ as mentioned below: ............................................................................... 13

Step 2: Collect the Query Components and few other objects to the Transport Request: ......................................... 13

Step 3: Execute the ABAP Code with the below selection: ........................................................................................ 14

Complete ABAP Code ................................................................................................................................... 16

Database Tables (Important) ........................................................................................................................ 27

Query Tables: ................................................................................................................................................... 28

Related Content ................................................................................................................................................ 29

Disclaimer and Liability Notice .......................................................................................................................... 30

Page 3: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 3

Scenario

To transport the BEx Query from development to Quality and then to production, we always have to validate and check whether all the Query Components are properly assigned to the transport request(Workbench Requests). Transport request for BEx Query is created using transaction RSOR, where all the desired query components are assigned to the transport requests. Validation of the query components in the assigned transport request is quiet a tough job because of the reason, all the query components as assigned a UUID which are visible in transports requests which cannot be deciphered easily. Below are the three scenarios where the validation of the query components is done:

Transport Validation – Transports Objects matches with Query Components

Transport Validation – Missing Query Component in Transport

Transport Validation – Extra Objects present in Transport apart from Query Components

Validation - (Query Components and Transport Request Objects)

For validating the Query Components and Transport Request Objects, first all the UUID corresponding to concerned Query would be fetch [Using RSZELTDIR (Directory of the reporting component elements) and RSZELTXREF (Directory of query element references)] and compared with the UUID related to the objects present in the transport request [Using database tables E070 (Change & Transport System: Header of Requests/Tasks), E071 (Change & Transport System: Object Entries of Requests/Tasks)].

ABAP Code Logic (Compare Query Components and Transport Objects)

Step 1: Make the selection screen which takes ‘Transport Request’ and ‘Query Name’ as input:

For getting the BW Query Name as F4 help, we have to create a Elementary Search Help ‘Z_QUERY_LIST’ which takes the data from table ‘RSZCOMPDIR’ (Directory of reporting components).

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_query.

w_tabname = 'RSZCOMPDIR'.

w_fieldname = 'COMPID'.

w_searchhelp = 'Z_QUERY_LIST'.

* Get the values from the Elementary Search Help

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = w_tabname

Page 4: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 4

fieldname = w_fieldname

searchhelp = w_searchhelp

TABLES

return_tab = t_return

EXCEPTIONS

field_not_found = 1

no_help_for_field = 2

inconsistent_help = 3

no_values_found = 4

OTHERS = 5.

IF sy-subrc EQ 0.

LOOP AT t_return INTO wa_return.

p_query = wa_return-fieldval.

ENDLOOP.

ENDIF.

After using the Elementary Search Help, values would be displayed in the F4:

Select the Concerned value for BW Query Name.

Step 2: Fetch the Objects (UUID) present in the Transport Request:

Get the TRKORR (Request/Task) and STRKORR (Higher-Level Request) from E070.

Get the TRKORR (Request/Task) and OBJ_NAME (Object Name in Object List) from E071.

* Get all the tasks for the transport request

SELECT trkorr

strkorr

INTO TABLE t_e070

FROM e070

WHERE strkorr EQ p_req

AND trstatus EQ 'D'.

IF sy-subrc EQ 0.

SELECT trkorr

obj_name

FROM e071

INTO TABLE t_e071

FOR ALL ENTRIES IN t_e070

WHERE trkorr EQ t_e070-trkorr.

ENDIF.

Page 5: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 5

Step 3: Fetch the Query Components (UUID):

Get the COMPUID (UUID in compressed form) from table RSZCOMPDIR for the Selected Query.

Get the ELTUID (UUID in compressed form) from table RSZELTDIR with reference to the above COMPUID.

Get the SELTUID (UUID in compressed form) and TELTUID (UUID in compressed form) from table RSZELTXREF (Directory of query element references) for all the ELTUID fetched in the earlier step.

Keep on fetching the SELTUID (UUID in compressed form) and TELTUID (UUID in compressed form) from table RSZELTXREF (Directory of query element references) by comparing the values from TELTUID with SELTUID.Fetch data till SY-SUBRC NE 0.

Store all the Query Components in internal table t_rszeltxref.

* Get the UUID from table for Directory of reporting components

SELECT compuid

FROM rszcompdir

INTO TABLE t_rszcompdir

WHERE compid EQ p_query

AND objvers EQ 'A'.

IF sy-subrc EQ 0.

* Validate the UUID of the QUery

SELECT eltuid

FROM rszeltdir

INTO TABLE t_rszeltdir

FOR ALL ENTRIES IN t_rszcompdir

WHERE eltuid EQ t_rszcompdir-compuid.

IF sy-subrc EQ 0.

LOOP AT t_rszeltdir INTO wa_rszeltdir.

wa_rszeltxref-seltuid = wa_rszeltdir-eltuid.

APPEND wa_rszeltxref TO t_rszeltxref.

CLEAR wa_rszeltxref.

ENDLOOP.

* Get the values of UUID from Directory of query element references

SELECT seltuid

teltuid

INTO TABLE tl_teltuid

FROM rszeltxref

FOR ALL ENTRIES IN t_rszeltdir

WHERE seltuid EQ t_rszeltdir-eltuid

AND objvers EQ 'A'.

IF sy-subrc EQ 0.

LOOP AT tl_teltuid INTO wl_teltuid.

wa_rszeltxref-seltuid = wl_teltuid-teltuid.

APPEND wa_rszeltxref TO t_rszeltxref.

CLEAR: wa_rszeltxref , wl_teltuid.

ENDLOOP.

RSZELTXREF

Internal Table

Seltuid = Internal table - Teltuid

Page 6: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 6

tl_teltuid1[] = tl_teltuid[].

REFRESH tl_teltuid.

* Keep on fetching the values , while comparing the TELTUID and SELTUID (Stop

* fetching values when no values are present corresponding to TELTUID)

WHILE w_flag NE 'X'.

SELECT seltuid

teltuid

INTO TABLE tl_teltuid

FROM rszeltxref

FOR ALL ENTRIES IN tl_teltuid1

WHERE seltuid EQ tl_teltuid1-teltuid

AND objvers EQ 'A'.

IF sy-subrc EQ 0.

LOOP AT tl_teltuid INTO wl_teltuid.

wa_rszeltxref-seltuid = wl_teltuid-teltuid.

APPEND wa_rszeltxref TO t_rszeltxref.

CLEAR: wa_rszeltxref , wl_teltuid.

ENDLOOP.

tl_teltuid1[] = tl_teltuid[].

REFRESH tl_teltuid.

ELSE.

w_flag = 'X'.

ENDIF.

ENDWHILE.

ENDIF.

ENDIF.

* Sort by UUID

SORT t_rszeltxref BY seltuid ASCENDING.

* Delete ADJACENT Dupicates with same UUID

DELETE ADJACENT DUPLICATES FROM t_rszeltxref COMPARING ALL FIELDS.

ENDIF.

Step 4: Compare the Query Components with the Objects present in transport:

Missing Query Components in the transport request:

Loop in internal table containing the Query Components. Read internal table containing the objects present in transport comparing the UUID.If the values are not found then the Query Components are not collected in the transport request.

* Query Components matches or absent in Transports

LOOP AT t_rszeltxref INTO wa_rszeltxref.

* Read the transport internal table

READ TABLE tl_e071 INTO wl_e071 WITH KEY eltuid = wa_rszeltxref-

seltuid BINARY SEARCH.

IF sy-subrc EQ 0.

wl_same-eltuid = wa_rszeltxref-seltuid .

APPEND wl_same TO tl_same.

ELSE.

wl_diff-eltuid = wa_rszeltxref-seltuid .

APPEND wl_diff TO tl_diff.

ENDIF.

CLEAR: wl_diff , wl_same , wa_rszeltxref , wl_e071.

ENDLOOP.

Extra Components present in transport apart from Query Components:

Page 7: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 7

Loop in internal table containing the Objects for transport request .Read the Query Component internal table comparing UUID. If read fails, which refers to the Objects which are not a part of Query.

* Extra objects present tranpsort request apart from Query Componets

LOOP AT tl_e071 INTO wl_e071.

READ TABLE t_rszeltxref INTO wa_rszeltxref WITH KEY seltuid = wl_e071-

eltuid BINARY SEARCH.

IF sy-subrc NE 0.

wl_extra-eltuid = wl_e071-eltuid .

APPEND wl_extra TO tl_extra.

CLEAR : wl_extra , wl_e071 , wa_rszeltxref.

ENDIF.

ENDLOOP.

After all the values are collected for extra components apart from Query, missing Query Components and matched values in the transport request , display the ALV Output report.

Transport Validation - Matches with Query Components

For the below mentioned example the query would be collected properly to a transport and while validation all the query components would match with the transport request objects:

Step 1: Create a Query ‘ZSD_O03_Q001’:

Step 2: Collect the Query to transport (Transaction RSOR):

Page 8: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 8

Total Number of Entries: 15

Step 3: Execute the ABAP Code with entries as following:

Selection Screen Entries

Report Output

Explanation:

RSZCOMPDIR RSZELTXREF TRANSPORT

COMPUID SELTUID TELTUID LAYTP BWIK901161 (Task - BWIK901162)

4J1IZO2MEZ2C3OU90LDRROW9J 4J1IZO2MEZ2C3OU90LDRROW9J 4J1IZ8HVYT1LBZEH6MMVDPHZR VAR 4J1IZ8HVYT1LBZEH6MMVDPHZR

4J1IZO2MEZ2C3OU90LDRROW9J 4J1IZOAAXXO1MBDP6FG41QUZB SOB 4J1J2E80P4GE3PCRKRAO8SHNB

4J1IZO2MEZ2C3OU90LDRROW9J 4J1IZPZR5MHPRBPAH3YUA6KPJ SHT 4J1J2E0C65UOL2TBEX8BYQIXJ

4J1J2DSNN78Z2G9V935ZOOK7R

4J1IZOAAXXO1MBDP6FG41QUZB 4J1IZOHZGW9R4XX5C9IGBSTP3 AGG 4J1J17RFVUGC53UFBKCSNXL5J

4J1IZOAAXXO1MBDP6FG41QUZB 4J1IZP511S2VOTJHTRPH5YPUF AGG 4J1J17JRCVUMMHAZ5QAGDVMFR

4J1IZOAAXXO1MBDP6FG41QUZB 4J1IZPCPKQOL7G2XZLRTG0OK7 COL 4J1J17C2TX8X3URIZW843TNPZ

4J1IZOAAXXO1MBDP6FG41QUZB 4J1J2DSNN78Z2G9V935ZOOK7R ROW 4J1J174EAYN7L882U25RTRP07

4J1IZPZR5MHPRBPAH3YUA6KPJ 4J1IZPCPKQOL7G2XZLRTG0OK7 COL 4J1IZPZR5MHPRBPAH3YUA6KPJ

4J1IZPZR5MHPRBPAH3YUA6KPJ 4J1J2DSNN78Z2G9V935ZOOK7R ROW 4J1IZPKE3PAAQ2ME5FU5Q2N9Z

4J1IZP511S2VOTJHTRPH5YPUF

4J1IZOHZGW9R4XX5C9IGBSTP3 4J1IZ8HVYT1LBZEH6MMVDPHZR NIL 4J1IZOHZGW9R4XX5C9IGBSTP3

Page 9: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 9

4J1IZPCPKQOL7G2XZLRTG0OK7 4J1IZPKE3PAAQ2ME5FU5Q2N9Z NIL 4J1IZOAAXXO1MBDP6FG41QUZB

4J1IZPCPKQOL7G2XZLRTG0OK7 4J1J174EAYN7L882U25RTRP07 NIL 4J1IZO2MEZ2C3OU90LDRROW9J

4J1IZPCPKQOL7G2XZLRTG0OK7 4J1J17JRCVUMMHAZ5QAGDVMFR NIL

4J1J2DSNN78Z2G9V935ZOOK7R 4J1J2E0C65UOL2TBEX8BYQIXJ NIL

4J1J2DSNN78Z2G9V935ZOOK7R 4J1J2E80P4GE3PCRKRAO8SHNB NIL

4J1J174EAYN7L882U25RTRP07 4J1J17C2TX8X3URIZW843TNPZ NIL

4J1J17JRCVUMMHAZ5QAGDVMFR 4J1J17RFVUGC53UFBKCSNXL5J NIL

Page 10: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 10

Transport Validation – Missing Query Component in Transport

For the below mentioned query, since some of the components are already used in the previous query so those components wouldn’t be collected here for this query transport. So this difference would be displayed when we execute the ABAP Code with relevant input.

Step 1: Create a Query ‘ZSD_O03_Q004’ as mentioned below:

Step 2: Collect the Query Components to Transport Request

Total Number of Objects in Transport: 13

Query Components assigned to different transports: 4

Page 11: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 11

Step 3: Execute the ABAP Code with the below selection:

Selection Screen Entries

Report Output

Explanation

RSZCOMPDIR RSZELTXREF TRANSPORT

COMPUID SELTUID TELTUID LAYTP BWIK901175 (Task - BWIK901179)

Page 12: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 12

4IYV80CSU1UBCE1SH48PRX3RR 4IYV80CSU1UBCE1SH48PRX3RR 4IYKFNBSTQS4809JPL4P2K2MV SHT 4IYV82HM3NVEINGA3GW4KGQXJ

4IYV80CSU1UBCE1SH48PRX3RR 4IYV80KHD0G0V0L8MYB21Z2HJ SOB 4IYV829XKP9P00WTXMTSAES7R

4IYV80CSU1UBCE1SH48PRX3RR 4J1IZ8HVYT1LBZEH6MMVDPHZR VAR 4IYV82291QNZHEDDRSRG0CTHZ

4IYV80CSU1UBCE1SH48PRX3RR 4J27SP33J4IW7LE0PQW0C9UTZ VAR 4IYV81MVZTGKG5AHG4MRG8W2F

4IYV80CSU1UBCE1SH48PRX3RR 4J33FZ8XEJSUL1YJSTIO8WPCN VAR 4IYV81F7GUUUXIR1AAKF66XCN

4IYV817IXW95EW7L4GI2W4YMV

4IYKFNBSTQS4809JPL4P2K2MV 4IYV817IXW95EW7L4GI2W4YMV COL 4IYV80ZUEXNFW9O4YMFQM2ZX3

4IYKFNBSTQS4809JPL4P2K2MV 4IYV82291QNZHEDDRSRG0CTHZ ROW 4IYV80S5VZ1QDN4OSSDEC117B

4IYV80KHD0G0V0L8MYB21Z2HJ 4IYKFW2QF5I6FOEYCTSOISLZR AGG 4IYV80KHD0G0V0L8MYB21Z2HJ

4IYV80KHD0G0V0L8MYB21Z2HJ 4IYKFWAEY43VYAYEINV0SUKPJ AGG 4IYKFWAEY43VYAYEINV0SUKPJ

4IYV80KHD0G0V0L8MYB21Z2HJ 4IYV80S5VZ1QDN4OSSDEC117B AGG 4IYKFW2QF5I6FOEYCTSOISLZR

4IYV80KHD0G0V0L8MYB21Z2HJ 4IYV80ZUEXNFW9O4YMFQM2ZX3 AGG 4IYKFNBSTQS4809JPL4P2K2MV

4IYV80KHD0G0V0L8MYB21Z2HJ 4IYV817IXW95EW7L4GI2W4YMV COL 4IYV80CSU1UBCE1SH48PRX3RR

4IYV80KHD0G0V0L8MYB21Z2HJ 4IYV82291QNZHEDDRSRG0CTHZ ROW

4IYKFW2QF5I6FOEYCTSOISLZR 4J27SP33J4IW7LE0PQW0C9UTZ NIL

4IYKFWAEY43VYAYEINV0SUKPJ 4J33FZ8XEJSUL1YJSTIO8WPCN NIL

4IYV80ZUEXNFW9O4YMFQM2ZX3 4J1IZ8HVYT1LBZEH6MMVDPHZR NIL

4IYV817IXW95EW7L4GI2W4YMV 4IYV81F7GUUUXIR1AAKF66XCN NIL

4IYV817IXW95EW7L4GI2W4YMV 4IYV81MVZTGKG5AHG4MRG8W2F NIL

4IYV82291QNZHEDDRSRG0CTHZ 4IYV829XKP9P00WTXMTSAES7R NIL

4IYV82291QNZHEDDRSRG0CTHZ 4IYV82HM3NVEINGA3GW4KGQXJ NIL

4IYV81MVZTGKG5AHG4MRG8W2F 4J1J17C2TX8X3URIZW843TNPZ NIL

Page 13: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 13

UUID Component Type

1. 4J1IZ8HVYT1LBZEH6MMVDPHZR ZSOLD - Variable

2. 4J1J17C2TX8X3URIZW843TNPZ ZDELIVERY - Restricted Key Figure

3. 4J27SP33J4IW7LE0PQW0C9UTZ ZCOMP - Variable

4. 4J33FZ8XEJSUL1YJSTIO8WPCN ZDISTR – Variable

Transport Validation – Extra Objects Present in Transport apart from Query Components

For the below Query while collecting it to transport request few extra objects apart from Query are also collected .Code would highlight all those Components which are not a part of Query.

Step 1: Create a Query ‘ZSD_O03_Q003’ as mentioned below:

Step 2: Collect the Query Components and few other objects to the Transport Request:

Total Number of Query Components: 17

Objects apart from Query Components: 3

Page 14: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 14

Step 3: Execute the ABAP Code with the below selection:

Selection Screen Entries

Page 15: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 15

Report Output

Explanation

RSZCOMPDIR RSZELTXREF TRANSPORT

COMPUID SELTUID TELTUID LAYTP BWIK901177 (Task - BWIK901178)

4J27TJ65SNJU5VKBKI23PYTSN 4J27TJ65SNJU5VKBKI23PYTSN 4J27SP33J4IW7LE0PQW0C9UTZ VAR 4J27SP33J4IW7LE0PQW0C9UTZ

4J27TJ65SNJU5VKBKI23PYTSN 4J27SQSJQTCKCLPM0FEQKPKK7 VAR 4J33FZ8XEJSUL1YJSTIO8WPCN

4J27TJ65SNJU5VKBKI23PYTSN 4J27TJDUBM5JOI3RQC4G00SIF SOB 4J27TLY0N5E1W0L5OCWJCOD3R

4J27TJ65SNJU5VKBKI23PYTSN 4J27TLY0N5E1W0L5OCWJCOD3R SHT 4J27TLQC46SCDE1PIIU72MEDZ

4J27TJ65SNJU5VKBKI23PYTSN 4J33FZ8XEJSUL1YJSTIO8WPCN VAR 4J27TLINL86MURI9CORUSKFO7

4J27TLAZ29KXC4YT6UPIIIGYF

4J27TJDUBM5JOI3RQC4G00SIF 4J27TJLIUKR974N7W66SA2R87 AGG 4J27TL3AJAZ7TIFD10N68GI8N

4J27TJDUBM5JOI3RQC4G00SIF 4J27TJT7DJCYPR6O2094K4PXZ AGG 4J27TKVM0CDIAVVWV6KTYEJIV

4J27TJDUBM5JOI3RQC4G00SIF 4J27TK0VWHYO8DQ47UBGU6ONR AGG 4J27TKNXHDRSS9CGPCIHOCKT3

4J27TJDUBM5JOI3RQC4G00SIF 4J27TK8KFGKDR09KDODT48NDJ COL 4J27TKG8YF639MT0JIG5EAM3B

4J27TJDUBM5JOI3RQC4G00SIF 4J27TLAZ29KXC4YT6UPIIIGYF AGG 4J27TK8KFGKDR09KDODT48NDJ

4J27TJDUBM5JOI3RQC4G00SIF 4J27TLINL86MURI9CORUSKFO7 AGG 4J27TK0VWHYO8DQ47UBGU6ONR

4J27TJDUBM5JOI3RQC4G00SIF 4J27TLQC46SCDE1PIIU72MEDZ AGG 4J27TJT7DJCYPR6O2094K4PXZ

4J27TLY0N5E1W0L5OCWJCOD3R 4J27TK8KFGKDR09KDODT48NDJ COL 4J27TJLIUKR974N7W66SA2R87

4J27TLY0N5E1W0L5OCWJCOD3R 4J27TKG8YF639MT0JIG5EAM3B FLT 4J27TJDUBM5JOI3RQC4G00SIF

4J27TLY0N5E1W0L5OCWJCOD3R 4J27TKNXHDRSS9CGPCIHOCKT3 FLT 4J27TJ65SNJU5VKBKI23PYTSN

4J27TLY0N5E1W0L5OCWJCOD3R 4J27TKVM0CDIAVVWV6KTYEJIV FLT 4J27SQSJQTCKCLPM0FEQKPKK7

4J27TLY0N5E1W0L5OCWJCOD3R 4J27TL3AJAZ7TIFD10N68GI8N FLT

4J27TLY0N5E1W0L5OCWJCOD3R 4J27TLAZ29KXC4YT6UPIIIGYF ROW

4J27TLY0N5E1W0L5OCWJCOD3R 4J27TLINL86MURI9CORUSKFO7 ROW

4J27TLY0N5E1W0L5OCWJCOD3R 4J27TLQC46SCDE1PIIU72MEDZ ROW

4J27TJLIUKR974N7W66SA2R87 4J27SQSJQTCKCLPM0FEQKPKK7 NIL

4J27TJT7DJCYPR6O2094K4PXZ 4J27SP33J4IW7LE0PQW0C9UTZ NIL

Page 16: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 16

4J27TK0VWHYO8DQ47UBGU6ONR 4J33FZ8XEJSUL1YJSTIO8WPCN NIL

4J27TK8KFGKDR09KDODT48NDJ 4J27TKG8YF639MT0JIG5EAM3B NIL

4J27TK8KFGKDR09KDODT48NDJ 4J27TKNXHDRSS9CGPCIHOCKT3 NIL

4J27TK8KFGKDR09KDODT48NDJ 4J27TKVM0CDIAVVWV6KTYEJIV NIL

4J27TK8KFGKDR09KDODT48NDJ 4J27TL3AJAZ7TIFD10N68GI8N NIL

4J27TKNXHDRSS9CGPCIHOCKT3 4J27TKG8YF639MT0JIG5EAM3B NIL

4J27TKNXHDRSS9CGPCIHOCKT3 4J27TKG8YF639MT0JIG5EAM3B NIL

COMPUID SELTUID TELTUID LAYTP BWIK901177 (Task - BWIK901179)

0SD_O03

0DLVIEYCR

0CUML_TME

Extra Objects (Transport):

Info objects: 0CUML_TME

0DLVIEYCR

Infoarea:0SD_O03

Complete ABAP Code

ABAP Code: ZQUERY_TRANSPORT_VALIDATION

*&---------------------------------------------------------------------*

*& Report ZQUERY_TRANSPORT_VALIDATION

*&

*&---------------------------------------------------------------------*

*& Validate the components in transport request :

*& a) All the Query Components matches with the Objects present in

* Transport

* b) Extra Components present in transport apart from Query Components

* c) Missing Query Component in Transport

*&---------------------------------------------------------------------*

REPORT zquery_transport_validation NO STANDARD PAGE HEADING

LINE-SIZE 190

LINE-COUNT 80.

TYPE-POOLS: slis.

*********** DATA DECLARATION ********************

* Types Declaration

TYPES: BEGIN OF ty_e071 ,

trkorr TYPE trkorr ,

obj_name TYPE trobj_name ,

Page 17: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 17

END OF ty_e071 ,

BEGIN OF ty_e070 ,

trkorr TYPE trkorr ,

strkorr TYPE strkorr ,

END OF ty_e070 ,

BEGIN OF ty_rszeltxref ,

seltuid TYPE sysuuid_25 ,

END OF ty_rszeltxref ,

BEGIN OF ty_rsrrepdir ,

compuid TYPE sysuuid_25,

END OF ty_rsrrepdir ,

BEGIN OF ty_rszeltdir ,

eltuid TYPE sysuuid_25,

END OF ty_rszeltdir ,

BEGIN OF ty_rszcompdir ,

compuid TYPE sysuuid_25 ,

END OF ty_rszcompdir ,

BEGIN OF ty_same ,

eltuid TYPE sysuuid_25 ,

deftp TYPE rszdeftp ,

END OF ty_same ,

BEGIN OF ty_diff ,

eltuid TYPE sysuuid_25 ,

deftp TYPE rszdeftp ,

mapname TYPE rszcompid ,

END OF ty_diff ,

BEGIN OF ty_extra ,

eltuid TYPE sysuuid_25 ,

END OF ty_extra ,

BEGIN OF ty_alv ,

eltuid TYPE sysuuid_25 ,

desc(60) TYPE c ,

END OF ty_alv.

* Work Area

DATA: wa_e071 TYPE ty_e071 ,

wa_return TYPE ddshretval ,

wa_e070 TYPE ty_e070 ,

wa_rszeltxref TYPE ty_rszeltxref ,

wa_rszcompdir TYPE ty_rszcompdir ,

wa_rsrrepdir TYPE ty_rsrrepdir ,

wa_rszeltdir TYPE ty_rszeltdir ,

wa_same TYPE ty_same ,

wa_same1 TYPE ty_alv ,

wa_diff TYPE ty_diff ,

wa_diff1 TYPE ty_alv ,

wa_extra TYPE ty_extra ,

wa_extra1 TYPE ty_alv .

* Internal Table

DATA: t_e071 TYPE STANDARD TABLE OF ty_e071 ,

t_return TYPE STANDARD TABLE OF ddshretval ,

t_e070 TYPE STANDARD TABLE OF ty_e070 ,

t_rszeltxref TYPE STANDARD TABLE OF ty_rszeltxref ,

t_rszcompdir TYPE STANDARD TABLE OF ty_rszcompdir ,

t_rsrrepdir TYPE STANDARD TABLE OF ty_rsrrepdir ,

Page 18: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 18

t_rszeltdir TYPE STANDARD TABLE OF ty_rszeltdir ,

t_same TYPE STANDARD TABLE OF ty_same ,

t_same1 TYPE STANDARD TABLE OF ty_alv ,

t_diff TYPE STANDARD TABLE OF ty_diff ,

t_diff1 TYPE STANDARD TABLE OF ty_alv ,

t_extra TYPE STANDARD TABLE OF ty_extra ,

t_extra1 TYPE STANDARD TABLE OF ty_alv .

* Variables

DATA: w_tabname TYPE dfies-tabname ,

w_fieldname TYPE dfies-fieldname ,

w_searchhelp TYPE shlpname ,

w_flag TYPE c ,

w_genuniid TYPE rsgenuniid.

** ALV Declaration ****

DATA: wa_layout TYPE slis_layout_alv ,

t_fieldcat TYPE slis_t_fieldcat_alv ,

t_event TYPE slis_t_event ,

wa_fieldcat TYPE slis_fieldcat_alv ,

wa_event LIKE LINE OF t_event.

******** SELECTION SCREEN **********************

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .

PARAMETERS: p_req TYPE trkorr ,

p_query TYPE rszcompid .

SELECTION-SCREEN END OF BLOCK b1.

***** AT SELECTION SCREEN ON VALUE REQUEST ********

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_query.

w_tabname = 'RSZCOMPDIR'.

w_fieldname = 'COMPID'.

w_searchhelp = 'Z_QUERY_LIST'.

* Get the values from the Elementary Search Help

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = w_tabname

fieldname = w_fieldname

searchhelp = w_searchhelp

TABLES

return_tab = t_return

EXCEPTIONS

field_not_found = 1

no_help_for_field = 2

inconsistent_help = 3

no_values_found = 4

OTHERS = 5.

IF sy-subrc EQ 0.

LOOP AT t_return INTO wa_return.

p_query = wa_return-fieldval.

ENDLOOP.

Page 19: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 19

ENDIF.

********* STAT-OF-SELECTION ********************

START-OF-SELECTION.

* Fetch the transport request object entries

PERFORM sub_transport_list.

* Get the Query component details

PERFORM sub_query_list.

* Compare Values

PERFORM sub_compare.

* Components matched and unmatched

****** END-OF-SELECTION ****************

END-OF-SELECTION.

* Display the report Output

PERFORM sub_display.

*&---------------------------------------------------------------------*

*& Form SUB_TRANSPORT_LIST

*&---------------------------------------------------------------------*

* Fetch the transport List Object entries

*----------------------------------------------------------------------*

FORM sub_transport_list .

* Get all the tasks for the transport request

SELECT trkorr

strkorr

INTO TABLE t_e070

FROM e070

WHERE strkorr EQ p_req

AND trstatus EQ 'D'.

IF sy-subrc EQ 0.

SELECT trkorr

obj_name

FROM e071

INTO TABLE t_e071

FOR ALL ENTRIES IN t_e070

WHERE trkorr EQ t_e070-trkorr.

ENDIF.

ENDFORM. " SUB_TRANSPORT_LIST

*&---------------------------------------------------------------------*

*& Form SUB_QUERY_LIST

*&---------------------------------------------------------------------*

* Get the Query Component List Detials

*----------------------------------------------------------------------*

FORM sub_query_list .

TYPES : BEGIN OF ty_rszeltxref ,

seltuid TYPE sysuuid_25 ,

teltuid TYPE sysuuid_25,

END OF ty_rszeltxref.

DATA: wl_teltuid TYPE ty_rszeltxref ,

Page 20: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 20

tl_teltuid TYPE STANDARD TABLE OF ty_rszeltxref ,

tl_teltuid1 TYPE STANDARD TABLE OF ty_rszeltxref .

* Get the UUID from table for Directory of reporting components

SELECT compuid

FROM rszcompdir

INTO TABLE t_rszcompdir

WHERE compid EQ p_query

AND objvers EQ 'A'.

IF sy-subrc EQ 0.

* Validate the UUID of the QUery

SELECT eltuid

FROM rszeltdir

INTO TABLE t_rszeltdir

FOR ALL ENTRIES IN t_rszcompdir

WHERE eltuid EQ t_rszcompdir-compuid.

IF sy-subrc EQ 0.

LOOP AT t_rszeltdir INTO wa_rszeltdir.

wa_rszeltxref-seltuid = wa_rszeltdir-eltuid.

APPEND wa_rszeltxref TO t_rszeltxref.

CLEAR wa_rszeltxref.

ENDLOOP.

* Get the values of UUID from Directory of query element references

SELECT seltuid

teltuid

INTO TABLE tl_teltuid

FROM rszeltxref

FOR ALL ENTRIES IN t_rszeltdir

WHERE seltuid EQ t_rszeltdir-eltuid

AND objvers EQ 'A'.

IF sy-subrc EQ 0.

LOOP AT tl_teltuid INTO wl_teltuid.

wa_rszeltxref-seltuid = wl_teltuid-teltuid.

APPEND wa_rszeltxref TO t_rszeltxref.

CLEAR: wa_rszeltxref , wl_teltuid.

ENDLOOP.

tl_teltuid1[] = tl_teltuid[].

REFRESH tl_teltuid.

* Keep on fetching the values , while comparing the TELTUID and SELTUID (Stop

* fetching values when no values are present corresponding to TELTUID)

WHILE w_flag NE 'X'.

SELECT seltuid

teltuid

INTO TABLE tl_teltuid

FROM rszeltxref

FOR ALL ENTRIES IN tl_teltuid1

WHERE seltuid EQ tl_teltuid1-teltuid

AND objvers EQ 'A'.

IF sy-subrc EQ 0.

LOOP AT tl_teltuid INTO wl_teltuid.

wa_rszeltxref-seltuid = wl_teltuid-teltuid.

APPEND wa_rszeltxref TO t_rszeltxref.

CLEAR: wa_rszeltxref , wl_teltuid.

ENDLOOP.

tl_teltuid1[] = tl_teltuid[].

Page 21: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 21

REFRESH tl_teltuid.

ELSE.

w_flag = 'X'.

ENDIF.

ENDWHILE.

ENDIF.

ENDIF.

* Sort by UUID

SORT t_rszeltxref BY seltuid ASCENDING.

* Delete ADJACENT Dupicates with same UUID

DELETE ADJACENT DUPLICATES FROM t_rszeltxref COMPARING ALL FIELDS.

ENDIF.

ENDFORM. " SUB_QUERY_LIST

*&---------------------------------------------------------------------*

*& Form SUB_COMPARE

*&---------------------------------------------------------------------*

* Compare values

*----------------------------------------------------------------------*

FORM sub_compare .

DATA: wl_obj_name TYPE sysuuid_25 .

TYPES : BEGIN OF ty_eltuid ,

eltuid TYPE sysuuid_25 ,

END OF ty_eltuid.

DATA : wl_same TYPE ty_eltuid ,

wl_diff TYPE ty_eltuid ,

wl_extra TYPE ty_eltuid ,

tl_same TYPE STANDARD TABLE OF ty_eltuid ,

tl_diff TYPE STANDARD TABLE OF ty_eltuid ,

tl_extra TYPE STANDARD TABLE OF ty_eltuid ,

tl_e071 TYPE STANDARD TABLE OF ty_eltuid ,

wl_e071 TYPE ty_eltuid.

SORT t_rszeltxref BY seltuid ASCENDING.

SORT t_e071 BY obj_name ASCENDING.

LOOP AT t_e071 INTO wa_e071.

wl_obj_name = wa_e071-obj_name.

wl_e071-eltuid = wl_obj_name.

APPEND wl_e071 TO tl_e071.

CLEAR wl_e071.

ENDLOOP.

* Sort the UUID table ASCENDING

SORT tl_e071 BY eltuid ASCENDING.

* Query Components matches or absent in Transports

LOOP AT t_rszeltxref INTO wa_rszeltxref.

* Read the transport internal table

READ TABLE tl_e071 INTO wl_e071 WITH KEY eltuid = wa_rszeltxref-

seltuid BINARY SEARCH.

IF sy-subrc EQ 0.

wl_same-eltuid = wa_rszeltxref-seltuid .

APPEND wl_same TO tl_same.

ELSE.

wl_diff-eltuid = wa_rszeltxref-seltuid .

APPEND wl_diff TO tl_diff.

Page 22: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 22

ENDIF.

CLEAR: wl_diff , wl_same , wa_rszeltxref , wl_e071.

ENDLOOP.

* Extra objects present tranpsort request apart from Query Componets

LOOP AT tl_e071 INTO wl_e071.

READ TABLE t_rszeltxref INTO wa_rszeltxref WITH KEY seltuid = wl_e071-

eltuid BINARY SEARCH.

IF sy-subrc NE 0.

wl_extra-eltuid = wl_e071-eltuid .

APPEND wl_extra TO tl_extra.

CLEAR : wl_extra , wl_e071 , wa_rszeltxref.

ENDIF.

ENDLOOP.

DELETE ADJACENT DUPLICATES FROM tl_extra COMPARING ALL FIELDS.

t_extra[] = tl_extra[].

* Entries validation is perfect

IF tl_same IS NOT INITIAL.

SELECT eltuid

deftp

FROM rszeltdir

INTO TABLE t_same

FOR ALL ENTRIES IN tl_same

WHERE eltuid EQ tl_same-eltuid

AND objvers EQ 'A'.

ENDIF.

* Disprepencies entries

IF tl_diff IS NOT INITIAL.

SELECT eltuid

deftp

MAPNAME

FROM rszeltdir

INTO TABLE t_diff

FOR ALL ENTRIES IN tl_diff

WHERE eltuid EQ tl_diff-eltuid

AND objvers EQ 'A'.

ENDIF.

ENDFORM. " SUB_COMPARE

*&---------------------------------------------------------------------*

*& Form SUB_DISPLAY

*&---------------------------------------------------------------------*

* ALV Output Display

*----------------------------------------------------------------------*

FORM sub_display .

* values matched

LOOP AT t_same INTO wa_same.

wa_same1-eltuid = wa_same-eltuid .

CASE wa_same-deftp .

WHEN 'NIL'.

wa_same1-desc = 'No definition'.

Page 23: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 23

WHEN 'REP'.

wa_same1-desc = 'Query'.

WHEN 'SOB'.

wa_same1-desc = 'Filter'.

WHEN 'VAR'.

wa_same1-desc = 'Variable'.

WHEN 'STR'.

wa_same1-desc = 'Structure'.

WHEN 'SEL'.

wa_same1-desc = 'Restricted Key Figure'.

WHEN 'CKF'.

wa_same1-desc = 'Calculated key figure'.

WHEN 'FML'.

wa_same1-desc = 'Formula'.

ENDCASE.

APPEND wa_same1 TO t_same1.

ENDLOOP.

* Values Unmatched

LOOP AT t_diff INTO wa_diff.

wa_diff1-eltuid = wa_diff-eltuid .

IF wa_diff-mapname IS INITIAL.

CASE wa_diff-deftp .

WHEN 'NIL'.

wa_diff1-desc = 'No definition'.

WHEN 'REP'.

wa_diff1-desc = 'Query'.

WHEN 'SOB'.

wa_diff1-desc = 'Filter'.

WHEN 'VAR'.

wa_diff1-desc = 'Variable'.

WHEN 'STR'.

wa_diff1-desc = 'Structure'.

WHEN 'SEL'.

wa_diff1-desc = 'Restricted Key Figure'.

WHEN 'CKF'.

wa_diff1-desc = 'Calculated key figure'.

WHEN 'FML'.

wa_diff1-desc = 'Formula'.

ENDCASE.

ELSE.

CASE wa_diff-deftp .

WHEN 'NIL'.

CONCATENATE wa_diff-mapname '-' 'No definition' INTO wa_diff1-desc

SEPARATED BY space.

WHEN 'REP'.

CONCATENATE wa_diff-mapname '-' 'Query' INTO wa_diff1-desc

SEPARATED BY space.

WHEN 'SOB'.

CONCATENATE wa_diff-mapname '-' 'Filter' INTO wa_diff1-desc

SEPARATED BY space.

WHEN 'VAR'.

CONCATENATE wa_diff-mapname '-' 'Variable' INTO wa_diff1-desc

SEPARATED BY space.

WHEN 'STR'.

CONCATENATE wa_diff-mapname '-' 'Structure' INTO wa_diff1-desc

Page 24: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 24

SEPARATED BY space.

WHEN 'SEL'.

CONCATENATE wa_diff-mapname '-' 'Restricted Key Figure' INTO wa_diff1-desc

SEPARATED BY space.

WHEN 'CKF'.

CONCATENATE wa_diff-mapname '-' 'Calculated key figure' INTO wa_diff1-desc

SEPARATED BY space.

WHEN 'FML'.

CONCATENATE wa_diff-mapname '-' 'Formula' INTO wa_diff1-desc

SEPARATED BY space.

ENDCASE.

ENDIF.

APPEND wa_diff1 TO t_diff1.

ENDLOOP.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

EXPORTING

i_callback_program = sy-repid.

IF t_same1 IS NOT INITIAL.

wa_layout-box_tabname = 'T_SAME1'.

CLEAR: wa_fieldcat .

wa_fieldcat-col_pos = '1'.

wa_fieldcat-fieldname = 'ELTUID'.

wa_fieldcat-reptext_ddic = text-002.

wa_fieldcat-outputlen = '30'.

APPEND wa_fieldcat TO t_fieldcat.

wa_fieldcat-col_pos = '2'.

wa_fieldcat-fieldname = 'DESC'.

wa_fieldcat-reptext_ddic = text-003.

wa_fieldcat-outputlen = '60'.

APPEND wa_fieldcat TO t_fieldcat.

wa_event-form = 'TOP_OF_PAGE2'.

wa_event-name = 'TOP_OF_PAGE'.

APPEND wa_event TO t_event.

* Matched Query Components with transport objects

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = wa_layout

it_fieldcat = t_fieldcat

i_tabname = 'T_SAME1'

it_events = t_event

TABLES

t_outtab = t_same1

EXCEPTIONS

program_error = 1

maximum_of_appends_reached = 2

OTHERS = 3.

ENDIF.

* Missing Query components in transport

IF t_diff IS NOT INITIAL.

Page 25: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 25

CLEAR : wa_layout , wa_event .

REFRESH : t_event.

wa_layout-box_tabname = 'T_DIFF1'.

wa_event-form = 'TOP_OF_PAGE3'.

wa_event-name = 'TOP_OF_PAGE'.

APPEND wa_event TO t_event.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = wa_layout

it_fieldcat = t_fieldcat

i_tabname = 'T_DIFF1'

it_events = t_event

TABLES

t_outtab = t_diff1

EXCEPTIONS

program_error = 1

maximum_of_appends_reached = 2

OTHERS = 3.

ENDIF.

* Display of the extra components apart from query

IF t_extra IS NOT INITIAL.

CLEAR : wa_layout , wa_fieldcat , wa_event .

REFRESH : t_fieldcat , t_event.

wa_layout-box_tabname = 'T_EXTRA'.

CLEAR: wa_fieldcat .

wa_fieldcat-col_pos = '1'.

wa_fieldcat-fieldname = 'ELTUID'.

wa_fieldcat-reptext_ddic = text-002.

wa_fieldcat-outputlen = '30'.

APPEND wa_fieldcat TO t_fieldcat.

wa_event-form = 'TOP_OF_PAGE4'.

wa_event-name = 'TOP_OF_PAGE'.

APPEND wa_event TO t_event.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = wa_layout

it_fieldcat = t_fieldcat

i_tabname = 'T_EXTRA'

it_events = t_event

TABLES

t_outtab = t_extra

EXCEPTIONS

program_error = 1

maximum_of_appends_reached = 2

OTHERS = 3.

ENDIF.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.

Page 26: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 26

ENDFORM. " SUB_DISPLAY

*&---------------------------------------------------------------------*

*& Form TOP_OF_PAGE2

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

FORM top_of_page2.

DATA: l_same(4) TYPE c.

DESCRIBE TABLE t_same1 LINES l_same.

WRITE: 'Query Components matched with Transport Objects' COLOR 5.

WRITE: / 'Total Number of Objects: ' , l_same.

ENDFORM. "TOP_OF_PAGE2

*&---------------------------------------------------------------------*

*& Form TOP_OF_PAGE3

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

FORM top_of_page3.

DATA : v_count(4) TYPE c.

DESCRIBE TABLE t_diff LINES v_count.

WRITE : ' ***********************************************' COLOR 7.

WRITE: / 'Query Components absent in Transport' COLOR 6.

WRITE: / ' ------------------------------------------------'.

WRITE: / 'Either of the possibilities might have happened : '.

WRITE: / 'a) Component is already assigned a transport' .

WRITE: / 'b) Component has not assigned any transport'.

WRITE: / 'c) Component has already been transported to quality (And no'.

WRITE: / ' modification has been done for that component in development'.

WRITE: / 'Total Number of Objects : ' , v_count.

ENDFORM. "top_of_page3

*&---------------------------------------------------------------------*

*& Form TOP_OF_PAGE4

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

FORM top_of_page4.

DATA: l_extra(4) TYPE c.

DESCRIBE TABLE t_extra LINES l_extra.

WRITE : ' ***********************************************' COLOR 7.

WRITE: 'Extra Objects in Transport apart from Query Components' COLOR 4.

WRITE: / 'Total No of Objects: ' , l_extra.

WRITE: / ' ------------------------------------------------'.

ENDFORM. "top_of_page3

Page 27: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 27

Database Tables (Important)

Transport Request Tables:

Database Table Purpose

E070 Change & Transport System: Header of Requests/Tasks

E070A Change & Transport System: Attributes of a Request

E070C CTS: Source/Target Client of Requests/Tasks

E070CREATE Change & Transport System: Creation Date of Request

E070DEP Change & Transport System: Dependencies of Requests

E070CTV Shared access to e070, e07t, and e070c

E070DEP Change & Transport System: Dependencies of

E070L CTS: Index for Assigning Numbers to Reques

E070M CTS: Target Package/Layer for Requests

E070TAG Tagged Requests for Check-In of Non-ABAP O

E070TC Help Table for E070 for Client-Specific Im

E070USE Use of Current Requests by Users

E070V TMS WBO: E070 with Texts (E07T) and Source

E071K Change & Transport System: Key Entries of Requests/Tasks

E071KC Change & Transport System: Key Entries of Requests/Tasks

E071KF Change & Transport System: Nametab Info. on (CHAR)Key Fields

E071KFINI Change & Transport System: Nametab Info. on (CHAR)Key Fields

E071K_30 Change & Transport System: Key Entries of Requests/Tasks

E071K_KEY E071K Key Fields

E071S System-Specific Import Status of Objects

E071V Generated Table for View E071V

E07T Change & Transport System: Short Texts for Requests/Tasks

Page 28: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 28

E07T_OLD E07T Before TRKORR Extension

Query Tables:

Query Tables Purpose

RSZELTDIR Directory of the reporting component elements

RSZELTTXT Texts of reporting component elements

RSZELTXREF Directory of query element references

RSRREPDIR Directory of all reports (Query GENUNIID)

RSZCOMPDIR Directory of reporting components

RSZRANGE Selection specification for an element

RSZSELECT Selection properties of an element

RSZELTDIR Directory of the reporting component elements

RSZCOMPIC Assignment reuseable component <-> InfoCube

RSZELTPRIO Priorities with element collisions

RSZELTPROP Element properties (settings)

RSZELTATTR Attribute selection per dimension element

RSZCALC Definition of a formula element

RSZCEL Query Designer: Directory of Cells

RSZGLOBV Global Variables in Reporting

Page 29: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 29

Related Content

For more information, visit the EDW Home Page .

Page 30: Transport Validation.pdf

SAP BW – BEx Query Transport Validation

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

© 2010 SAP AG 30

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.