2006 Jan 17 5:00 AM
Hi,
I want to delete multiple programs in the SAP Production server using a Transport Request(TR).
Can someone suggest a FM(Function Module) or code by which i can delete multiple programs in development system and all the deleted programs come under the same Transport Request?
This will help me in deleting the same in Production system as well.
Basically i would say if u delete programs using SE38, the system prompts u for a TR.If u give the same TR for all programs, then all of them(deleted programs) would come under the same
TR.
This is wht i want to replicate. I cannot manually delete the programs as the no. of programs is close to 300.
Hi,
I want to delete multiple programs in the SAP Production server using a Transport Request(TR).
Can someone suggest a FM(Function Module) or code by which i can delete multiple programs in development system and all the deleted programs come under the same Transport Request?
This will help me in deleting the same in Production system as well.
Basically i would say if u delete programs using SE38, the system prompts u for a TR.If u give the same TR for all programs, then all of them(deleted programs) would come under the same
TR.
This is wht i want to replicate. I cannot manually delete the programs as the no. of programs is close to 300.
2006 Jan 17 5:12 AM
you can modify this meet your need..
REPORT ZE071 MESSAGE-ID ZZ NO STANDARD PAGE HEADING
LINE-SIZE 170 LINE-COUNT 58.
TABLES: E071, TADIR, TLOCK.
PARAMETERS: OBJECT LIKE E071-OBJECT DEFAULT 'PROG'.
SELTEXTE* "Object Type
PARAMETERS: OBJNAME LIKE E071-OBJ_NAME DEFAULT 'ZP9925'.
SELTEXTE* "Object Name
PARAMETERS: TRKORR LIKE E071-TRKORR DEFAULT 'DEVK901009'.
SELTEXTE* "Transport/Corr Number
DELETE FROM E071 WHERE TRKORR EQ TRKORR
AND OBJECT EQ OBJECT
AND OBJ_NAME EQ OBJNAME.
DELETE FROM TADIR WHERE OBJECT EQ OBJECT
AND OBJ_NAME EQ OBJNAME.
DELETE FROM TLOCK WHERE OBJECT EQ OBJECT
AND LOKEY EQ OBJNAME
AND TRKORR EQ TRKORR.
COMMIT WORK.
2006 Jan 17 5:28 AM
can you do a recording of SE38 marking a program for deletion and then use this as the basis for a program to delete many programs? you can read the programs in from a file or save them all as parameter values in a variant as you prefer.
2006 Jan 17 5:41 AM
Hi Neil,
Can u please tell how to do recording of SE38 marking a program for deletion??
2006 Jan 17 6:33 AM
you can use function module 'RS_DELETE_PROGRAM' to delete reports.
to delete multiple reports, collect the report names to be deleted into an itab and loop at itab and call this function.
call function 'RS_DELETE_PROGRAM'
exporting
program = l_s_pdir-progname
suppress_checks = ' '
suppress_commit = 'X'
suppress_popup = 'X'
WITH_CUA = 'X'
WITH_DOCUMENTATION = 'X'
WITH_DYNPRO = 'X'
WITH_INCLUDES = ' '
WITH_TEXTPOOL = 'X'
with_variants = i_with_variants
TADIR_DEVCLASS =
IMPORTING
CORRNUMBER =
PROGRAM =
exceptions
enqueue_lock = 1
object_not_found = 0
permission_failure = 3
reject_deletion = 4
others = 5.
Regards
Raja
2006 Jan 17 7:47 AM
use transaaction SM35... you can record a session of transaction SE38 and then generATE A PROGRAM FROM THIS. yOU CAN THEN COPY CHUNKS OF THIS CODE TO A PROGRAM OF YOUR own which will operate on the list of programs you have and perfrom the recorded portion of code for each one. You can get it to add to the same transport.
In SE38 you can delete a program by entering the name and hitting the delete button. This is what you want to record in SM35. So to do the recording delete aone of your programs, save to the transport you wish to use. Once you have created your program you can run it with a few other programs as input to test if they get deleted and added to your transport.
Message was edited by: Neil Woodruff
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |