SAP /SAPAPO/DM_DELETE_VERSION Function Module for Delete Version
/SAPAPO/DM_DELETE_VERSION is a standard /sapapo/dm delete version 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 Version 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 /sapapo/dm delete version FM, simply by entering the name /SAPAPO/DM_DELETE_VERSION into the relevant SAP transaction such as SE37 or SE38.
Function Group: /SAPAPO/DM_VERSION
Program Name: /SAPAPO/SAPLDM_VERSION
Main Program: /SAPAPO/SAPLDM_VERSION
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function /SAPAPO/DM_DELETE_VERSION 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 '/SAPAPO/DM_DELETE_VERSION'"Delete Version.
EXPORTING
I_VERSIOID = "
* I_DEL_VERS = GC_TRUE "
* ONLY_TRANSACTIONAL_DATA = GC_FALSE "
TABLES
* ET_RC = "
* ET_ORDERS_NOT_DELETED = "
* ET_RESUID_USED = "
* ET_RESUID_LOCKED = "
EXCEPTIONS
NOT_QUALIFIED = 1 DEL_FAILED = 2 LC_CONNECT_FAILED = 3 LC_COM_ERROR = 4 LC_APPL_ERROR = 5 LC_ERROR = 6 NO_MODEL = 7
IMPORTING Parameters details for /SAPAPO/DM_DELETE_VERSION
I_VERSIOID -
Data type: /SAPAPO/VRSIOIDOptional: No
Call by Reference: No ( called with pass by value option)
I_DEL_VERS -
Data type: CDefault: GC_TRUE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ONLY_TRANSACTIONAL_DATA -
Data type: CDefault: GC_FALSE
Optional: Yes
Call by Reference: Yes
TABLES Parameters details for /SAPAPO/DM_DELETE_VERSION
ET_RC -
Data type: /SAPAPO/OM_LC_RC_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
ET_ORDERS_NOT_DELETED -
Data type: /SAPAPO/ORDID_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
ET_RESUID_USED -
Data type: /SAPAPO/CRES_RESUID_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
ET_RESUID_LOCKED -
Data type: /SAPAPO/CRES_RESUID_TABOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_QUALIFIED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DEL_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LC_CONNECT_FAILED - Verbindungsaufbau zum liveCache gescheitert
Data type:Optional: No
Call by Reference: Yes
LC_COM_ERROR - COM-Routinen-Aufruf mit Systemfehler gescheitert
Data type:Optional: No
Call by Reference: Yes
LC_APPL_ERROR - COM-Routine mit eigenem Fehlercode beendet
Data type:Optional: No
Call by Reference: Yes
LC_ERROR - Fehler im LifeCache aufgetreten
Data type:Optional: No
Call by Reference: Yes
NO_MODEL -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for /SAPAPO/DM_DELETE_VERSION 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: | ||||
| lt_et_rc | TYPE STANDARD TABLE OF /SAPAPO/OM_LC_RC_TAB, " | |||
| lv_i_versioid | TYPE /SAPAPO/VRSIOID, " | |||
| lv_not_qualified | TYPE /SAPAPO/VRSIOID, " | |||
| lv_del_failed | TYPE /SAPAPO/VRSIOID, " | |||
| lv_i_del_vers | TYPE C, " GC_TRUE | |||
| lt_et_orders_not_deleted | TYPE STANDARD TABLE OF /SAPAPO/ORDID_TAB, " | |||
| lt_et_resuid_used | TYPE STANDARD TABLE OF /SAPAPO/CRES_RESUID_TAB, " | |||
| lv_lc_connect_failed | TYPE /SAPAPO/CRES_RESUID_TAB, " | |||
| lv_only_transactional_data | TYPE C, " GC_FALSE | |||
| lv_lc_com_error | TYPE C, " | |||
| lt_et_resuid_locked | TYPE STANDARD TABLE OF /SAPAPO/CRES_RESUID_TAB, " | |||
| lv_lc_appl_error | TYPE /SAPAPO/CRES_RESUID_TAB, " | |||
| lv_lc_error | TYPE /SAPAPO/CRES_RESUID_TAB, " | |||
| lv_no_model | TYPE /SAPAPO/CRES_RESUID_TAB. " |
|   CALL FUNCTION '/SAPAPO/DM_DELETE_VERSION' "Delete Version |
| EXPORTING | ||
| I_VERSIOID | = lv_i_versioid | |
| I_DEL_VERS | = lv_i_del_vers | |
| ONLY_TRANSACTIONAL_DATA | = lv_only_transactional_data | |
| TABLES | ||
| ET_RC | = lt_et_rc | |
| ET_ORDERS_NOT_DELETED | = lt_et_orders_not_deleted | |
| ET_RESUID_USED | = lt_et_resuid_used | |
| ET_RESUID_LOCKED | = lt_et_resuid_locked | |
| EXCEPTIONS | ||
| NOT_QUALIFIED = 1 | ||
| DEL_FAILED = 2 | ||
| LC_CONNECT_FAILED = 3 | ||
| LC_COM_ERROR = 4 | ||
| LC_APPL_ERROR = 5 | ||
| LC_ERROR = 6 | ||
| NO_MODEL = 7 | ||
| . " /SAPAPO/DM_DELETE_VERSION | ||
ABAP code using 7.40 inline data declarations to call FM /SAPAPO/DM_DELETE_VERSION
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.| DATA(ld_i_del_vers) | = GC_TRUE. | |||
| DATA(ld_only_transactional_data) | = GC_FALSE. | |||
Search for further information about these or an SAP related objects