Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Deletion of programs

Former Member
0 Kudos

Hi,

When we create a program in SE38, a corresponding entry will be created in the database table TADIR. If I delete this entry from TADIR, the program will still exist, except the entry in TADIR.

Now, my requirement is to delete the program completely. It should not exist when we check this in SE38. Can anybody suggest me the solution for this.

8 REPLIES 8

Former Member
0 Kudos

Hi,

Goto SE38 type in the program name, in the application toolbar there will be option for delete, press that the program will be deleted.

Thanks & Regards,

Navneeth K.

former_member181995
Active Contributor
0 Kudos
Now, my requirement is to delete the program completely. It should not exist when we check this in SE38.

SAP provide us Delete button (Shift+F2) for this purpose.

0 Kudos

Once you go to SE38 in initial screen give program name, and press delete for that object, Object will be deleted no one can view it , even in SE38.

Former Member
0 Kudos

Hi,

Go to SE38 give your program name. (do not enter).

Once you enter your program name go to PROGRAM -> DELETE (SHift F2).

Hope this helps.

Regards,

Pramod

Former Member
0 Kudos

HI,

once u delete ur program throu SE38->delete in application tool bar the entry in table TADIR also gets updated....

Former Member
0 Kudos

Hi Priyanka,

Try this function module to delete the programs if you want to do it from a program

CALL FUNCTION 'RS_DELETE_PROGRAM'
  EXPORTING
*   CORRNUMBER                       =
    PROGRAM                          = 'ZRR_HI'
*   SUPPRESS_CHECKS                  = ' '
*   SUPPRESS_COMMIT                  = ' '
    SUPPRESS_POPUP                   = 'X'
*   MASS_DELETE_CALL                 = ' '
*   WITH_CUA                         = 'X'
*   WITH_DOCUMENTATION               = 'X'
*   WITH_DYNPRO                      = 'X'
*   WITH_INCLUDES                    = ' '
*   WITH_TEXTPOOL                    = 'X'
*   WITH_VARIANTS                    = 'X'
*   TADIR_DEVCLASS                   =
*   SKIP_PROGRESS_IND                = ' '
*   FORCE_DELETE_USED_INCLUDES       = ' '
* IMPORTING
*   CORRNUMBER                       =
*   PROGRAM                          =
 EXCEPTIONS
   ENQUEUE_LOCK                     = 1
   OBJECT_NOT_FOUND                 = 2
   PERMISSION_FAILURE               = 3
   REJECT_DELETION                  = 4
   OTHERS                           = 5
          .
IF SY-SUBRC EQ 0.

WRITE 'DELETED'.

ENDIF.

Regards

Former Member
0 Kudos

I have to delete around 20.000 programs which are not needed. I cannot delete one by one program in SE38.

0 Kudos

Hi Priyanka,

Loop through all the 20000 programs and use the function module which i suggested.

Fill the table IT_PROGRAMS with the programs to be deleted.

DATA : IT_PROGRAMS TYPE TABLE OF TRDIR-NAME,
       WA_PROGRAMS TYPE TRDIR-NAME.
 
LOOP AT IT_PROGRAMS INTO WA_PROGRAMS.

CALL FUNCTION 'RS_DELETE_PROGRAM'
  EXPORTING
*   CORRNUMBER                       =
    PROGRAM                          = WA_PROGRAMS
*   SUPPRESS_CHECKS                  = ' '
*   SUPPRESS_COMMIT                  = ' '
    SUPPRESS_POPUP                   = 'X'
*   MASS_DELETE_CALL                 = ' '
*   WITH_CUA                         = 'X'
*   WITH_DOCUMENTATION               = 'X'
*   WITH_DYNPRO                      = 'X'
*   WITH_INCLUDES                    = ' '
*   WITH_TEXTPOOL                    = 'X'
*   WITH_VARIANTS                    = 'X'
*   TADIR_DEVCLASS                   =
*   SKIP_PROGRESS_IND                = ' '
*   FORCE_DELETE_USED_INCLUDES       = ' '
* IMPORTING
*   CORRNUMBER                       =
*   PROGRAM                          =
 EXCEPTIONS
   ENQUEUE_LOCK                     = 1
   OBJECT_NOT_FOUND                 = 2
   PERMISSION_FAILURE               = 3
   REJECT_DELETION                  = 4
   OTHERS                           = 5
          .
          
ENDLOOP.

Regards

Edited by: Rajvansh Ravi on Oct 16, 2008 12:50 PM