SAP RS_DELETE_PROGRAM Function Module for Delete Program Objects Within Development System Environment
RS_DELETE_PROGRAM is a standard rs delete program SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Delete Program Objects Within Development System Environment processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for rs delete program FM, simply by entering the name RS_DELETE_PROGRAM into the relevant SAP transaction such as SE37 or SE38.
Function Group: SEU2
Program Name: SAPLSEU2
Main Program: SAPLSEU2
Appliation area: S
Release date: 27-May-1999
Mode(Normal, Remote etc): Normal Function Module
Update:
Function RS_DELETE_PROGRAM pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'RS_DELETE_PROGRAM'"Delete Program Objects Within Development System Environment.
EXPORTING
* CORRNUMBER = "Correction Number
* WITH_INCLUDES = ' ' "Standard Includes Will be Deleted def. By User
* WITH_TEXTPOOL = 'X' "Text Pool Will be Deleted
* WITH_VARIANTS = 'X' "Variants Will be Deleted
* TADIR_DEVCLASS = "Development Class
* SKIP_PROGRESS_IND = ' ' "Suppress Progress Indicator
* FORCE_DELETE_USED_INCLUDES = ' ' "Deletion of Used Includes
* SUPPRESS_DELETE_ENH = ' ' "Suppress Deletion of ENHO
* LOCK_HANDLE = "
* LIFECYCLE_MANAGER = "Internal use only!
PROGRAM = "
* SUPPRESS_CHECKS = ' ' "Suppress Authorization Checks
* SUPPRESS_COMMIT = ' ' "Internal Use
* SUPPRESS_POPUP = ' ' "Suppress Dialog
* MASS_DELETE_CALL = ' ' "Call from Deletion of Set
* WITH_CUA = 'X' "Menu Will be Copied by Default
* WITH_DOCUMENTATION = 'X' "Documentation Will be Deleted
* WITH_DYNPRO = 'X' "Screens Will be Deleted
IMPORTING
CORRNUMBER = "Correction Number
PROGRAM = "
EXCEPTIONS
ENQUEUE_LOCK = 1 OBJECT_NOT_FOUND = 2 PERMISSION_FAILURE = 3 REJECT_DELETION = 4
IMPORTING Parameters details for RS_DELETE_PROGRAM
CORRNUMBER - Correction Number
Data type: E071-TRKORROptional: Yes
Call by Reference: No ( called with pass by value option)
WITH_INCLUDES - Standard Includes Will be Deleted def. By User
Data type: SY-INPUTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_TEXTPOOL - Text Pool Will be Deleted
Data type: SY-INPUTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_VARIANTS - Variants Will be Deleted
Data type: SY-INPUTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TADIR_DEVCLASS - Development Class
Data type: TADIR-DEVCLASSOptional: Yes
Call by Reference: No ( called with pass by value option)
SKIP_PROGRESS_IND - Suppress Progress Indicator
Data type: SY-INPUTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
FORCE_DELETE_USED_INCLUDES - Deletion of Used Includes
Data type: SY-INPUTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_DELETE_ENH - Suppress Deletion of ENHO
Data type: SY-INPUTDefault: ' '
Optional: Yes
Call by Reference: Yes
LOCK_HANDLE -
Data type: IF_ADT_LOCK_HANDLEOptional: Yes
Call by Reference: Yes
LIFECYCLE_MANAGER - Internal use only!
Data type: IF_ADT_LIFECYCLE_MANAGEROptional: Yes
Call by Reference: Yes
PROGRAM -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
SUPPRESS_CHECKS - Suppress Authorization Checks
Data type: SY-INPUTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_COMMIT - Internal Use
Data type: SY-INPUTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_POPUP - Suppress Dialog
Data type: SY-INPUTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MASS_DELETE_CALL - Call from Deletion of Set
Data type: SY-INPUTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_CUA - Menu Will be Copied by Default
Data type: SY-INPUTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_DOCUMENTATION - Documentation Will be Deleted
Data type: SY-INPUTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_DYNPRO - Screens Will be Deleted
Data type: SY-INPUTDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RS_DELETE_PROGRAM
CORRNUMBER - Correction Number
Data type: E071-TRKORROptional: No
Call by Reference: No ( called with pass by value option)
PROGRAM -
Data type: SY-REPIDOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ENQUEUE_LOCK - Deletion Aborted Since SAP Lock Exists
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_NOT_FOUND - Object not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PERMISSION_FAILURE - Deletion unsuccessful
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
REJECT_DELETION - User Did Not Want to Delete
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RS_DELETE_PROGRAM Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.DATA: | ||||
lv_corrnumber | TYPE E071-TRKORR, " | |||
lv_corrnumber | TYPE E071-TRKORR, " | |||
lv_enqueue_lock | TYPE E071, " | |||
lv_with_includes | TYPE SY-INPUT, " ' ' | |||
lv_with_textpool | TYPE SY-INPUT, " 'X' | |||
lv_with_variants | TYPE SY-INPUT, " 'X' | |||
lv_tadir_devclass | TYPE TADIR-DEVCLASS, " | |||
lv_skip_progress_ind | TYPE SY-INPUT, " ' ' | |||
lv_force_delete_used_includes | TYPE SY-INPUT, " ' ' | |||
lv_suppress_delete_enh | TYPE SY-INPUT, " ' ' | |||
lv_lock_handle | TYPE IF_ADT_LOCK_HANDLE, " | |||
lv_lifecycle_manager | TYPE IF_ADT_LIFECYCLE_MANAGER, " | |||
lv_program | TYPE SY-REPID, " | |||
lv_program | TYPE SY-REPID, " | |||
lv_object_not_found | TYPE SY, " | |||
lv_suppress_checks | TYPE SY-INPUT, " SPACE | |||
lv_permission_failure | TYPE SY, " | |||
lv_reject_deletion | TYPE SY, " | |||
lv_suppress_commit | TYPE SY-INPUT, " SPACE | |||
lv_suppress_popup | TYPE SY-INPUT, " SPACE | |||
lv_mass_delete_call | TYPE SY-INPUT, " SPACE | |||
lv_with_cua | TYPE SY-INPUT, " 'X' | |||
lv_with_documentation | TYPE SY-INPUT, " 'X' | |||
lv_with_dynpro | TYPE SY-INPUT. " 'X' |
  CALL FUNCTION 'RS_DELETE_PROGRAM' "Delete Program Objects Within Development System Environment |
EXPORTING | ||
CORRNUMBER | = lv_corrnumber | |
WITH_INCLUDES | = lv_with_includes | |
WITH_TEXTPOOL | = lv_with_textpool | |
WITH_VARIANTS | = lv_with_variants | |
TADIR_DEVCLASS | = lv_tadir_devclass | |
SKIP_PROGRESS_IND | = lv_skip_progress_ind | |
FORCE_DELETE_USED_INCLUDES | = lv_force_delete_used_includes | |
SUPPRESS_DELETE_ENH | = lv_suppress_delete_enh | |
LOCK_HANDLE | = lv_lock_handle | |
LIFECYCLE_MANAGER | = lv_lifecycle_manager | |
PROGRAM | = lv_program | |
SUPPRESS_CHECKS | = lv_suppress_checks | |
SUPPRESS_COMMIT | = lv_suppress_commit | |
SUPPRESS_POPUP | = lv_suppress_popup | |
MASS_DELETE_CALL | = lv_mass_delete_call | |
WITH_CUA | = lv_with_cua | |
WITH_DOCUMENTATION | = lv_with_documentation | |
WITH_DYNPRO | = lv_with_dynpro | |
IMPORTING | ||
CORRNUMBER | = lv_corrnumber | |
PROGRAM | = lv_program | |
EXCEPTIONS | ||
ENQUEUE_LOCK = 1 | ||
OBJECT_NOT_FOUND = 2 | ||
PERMISSION_FAILURE = 3 | ||
REJECT_DELETION = 4 | ||
. " RS_DELETE_PROGRAM |
ABAP code using 7.40 inline data declarations to call FM RS_DELETE_PROGRAM
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8."SELECT single TRKORR FROM E071 INTO @DATA(ld_corrnumber). | ||||
"SELECT single TRKORR FROM E071 INTO @DATA(ld_corrnumber). | ||||
"SELECT single INPUT FROM SY INTO @DATA(ld_with_includes). | ||||
DATA(ld_with_includes) | = ' '. | |||
"SELECT single INPUT FROM SY INTO @DATA(ld_with_textpool). | ||||
DATA(ld_with_textpool) | = 'X'. | |||
"SELECT single INPUT FROM SY INTO @DATA(ld_with_variants). | ||||
DATA(ld_with_variants) | = 'X'. | |||
"SELECT single DEVCLASS FROM TADIR INTO @DATA(ld_tadir_devclass). | ||||
"SELECT single INPUT FROM SY INTO @DATA(ld_skip_progress_ind). | ||||
DATA(ld_skip_progress_ind) | = ' '. | |||
"SELECT single INPUT FROM SY INTO @DATA(ld_force_delete_used_includes). | ||||
DATA(ld_force_delete_used_includes) | = ' '. | |||
"SELECT single INPUT FROM SY INTO @DATA(ld_suppress_delete_enh). | ||||
DATA(ld_suppress_delete_enh) | = ' '. | |||
"SELECT single REPID FROM SY INTO @DATA(ld_program). | ||||
"SELECT single REPID FROM SY INTO @DATA(ld_program). | ||||
"SELECT single INPUT FROM SY INTO @DATA(ld_suppress_checks). | ||||
DATA(ld_suppress_checks) | = ' '. | |||
"SELECT single INPUT FROM SY INTO @DATA(ld_suppress_commit). | ||||
DATA(ld_suppress_commit) | = ' '. | |||
"SELECT single INPUT FROM SY INTO @DATA(ld_suppress_popup). | ||||
DATA(ld_suppress_popup) | = ' '. | |||
"SELECT single INPUT FROM SY INTO @DATA(ld_mass_delete_call). | ||||
DATA(ld_mass_delete_call) | = ' '. | |||
"SELECT single INPUT FROM SY INTO @DATA(ld_with_cua). | ||||
DATA(ld_with_cua) | = 'X'. | |||
"SELECT single INPUT FROM SY INTO @DATA(ld_with_documentation). | ||||
DATA(ld_with_documentation) | = 'X'. | |||
"SELECT single INPUT FROM SY INTO @DATA(ld_with_dynpro). | ||||
DATA(ld_with_dynpro) | = 'X'. | |||
Search for further information about these or an SAP related objects