Posted: Sat Nov 17, 2007 10:27 pm Post subject: Detect object conflicts before importing a transport
Code:
REPORT ZTRCONFL NO STANDARD PAGE HEADING.
************************************************************************
* This program subtracts the different objects from a transport data
* file and compares them to the existing objects of the SAP system. The
* result is a list of objects that might conflict with each-other when
* importing the transport.
************************************************************************
PARAMETERS: TRP_FILE(10) DEFAULT 'DEVK900001'.
TABLES: TADIR.
DATA: TP(80) VALUE 'cd /usr/sap/trans/bin;tp GETOBJLIST ', FLAG TYPE I,
OPCODE TYPE X VALUE 2,
BEGIN OF TABL OCCURS 0,
LINE(200),
END OF TABL,
BEGIN OF STRUCC,
PGMID(4), OBJECT(4), OBJ_NAME(30),
END OF STRUCC.
*
TP+37(10) = TRP_FILE.
CALL 'SYSTEM' ID 'COMMAND' FIELD TP
ID 'TAB' FIELD TABL-*SYS*.
WRITE: / 'COLOR CODE:'.
SKIP.
WRITE: / 'RED: OBJECT FROM THE TRANSPORT THAT MIGHT CONFLICTS WITH AN
OBJECT IN A TARGET SYSTEM ' color 6.
WRITE: / 'YELLOW: OBJECT OF THE TARGET SYSTEM THAT MIGHT CONFLICT WITH
AN OBJECT FROM THE TRANSPORT' color 3.
WRITE: / 'BLUE: OBJETC IN A TRANSPORT THAT ARE SAFE TO IMPORT'.
SKIP. ULINE. SKIP.
*
LOOP AT TABL.
IF TABL CP 'R3TR*' OR TABL CP 'LIMU*'.
CONDENSE TABL NO-GAPS.
STRUCC = TABL.
FLAG = 0.
SELECT * FROM TADIR WHERE
OBJ_NAME = STRUCC-OBJ_NAME.
IF FLAG = 0.
WRITE: / STRUCC-PGMID COLOR 6, STRUCC-OBJECT COLOR 6,
STRUCC-OBJ_NAME COLOR 6.
FLAG = 1.
ENDIF.
WRITE: / ' ', TADIR-PGMID COLOR 3, TADIR-OBJECT COLOR 3,
TADIR-OBJ_NAME COLOR 3.
ENDSELECT.
IF FLAG = 0.
WRITE: / STRUCC-PGMID, STRUCC-OBJECT, STRUCC-OBJ_NAME.
ENDIF.
ENDIF.
ENDLOOP.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.