Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

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

*           Hi here is the best example for deleting the program using the function modules.
*          if suppose there is a need for deleting a bunch of programs , we can use this

*         function module for doing this .

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

REPORT zdelete.

parameters: p_prog type sy-repid .

CALL FUNCTION 'RS_DELETE_PROGRAM'

EXPORTING

program = p_prog

SUPPRESS_CHECKS = ' '

SUPPRESS_COMMIT = ' '

SUPPRESS_POPUP = ' '

MASS_DELETE_CALL = ' '

WITH_CUA = 'X'

WITH_DOCUMENTATION = 'X'

WITH_DYNPRO = 'X'

WITH_INCLUDES = ' '

WITH_TEXTPOOL = 'X'

WITH_VARIANTS = 'X'

SKIP_PROGRESS_IND = ' '

FORCE_DELETE_USED_INCLUDES = ' '

EXCEPTIONS

ENQUEUE_LOCK = 1

OBJECT_NOT_FOUND = 2

PERMISSION_FAILURE = 3

REJECT_DELETION = 4

OTHERS = 5

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

Else.

Write:/ 'the program', p_prog , ' was deleted successfully ' .

ENDIF

  • No labels