SAP RSDMD_CHECK_LOCK Function Module for Testing whether a table is locked
RSDMD_CHECK_LOCK is a standard rsdmd check lock SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Testing whether a table is locked 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 rsdmd check lock FM, simply by entering the name RSDMD_CHECK_LOCK into the relevant SAP transaction such as SE37 or SE38.
Function Group: RSDMD
Program Name: SAPLRSDMD
Main Program: SAPLRSDMD
Appliation area: B
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RSDMD_CHECK_LOCK 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 'RSDMD_CHECK_LOCK'"Testing whether a table is locked.
EXPORTING
* I_IOBJNM = "
* I_CHABASNM = "
I_TABCLASS = "
* I_REQUNR = "
IMPORTING
E_PERMIT = "
E_LOCK_SET = "
E_REQUNR = "
E_TSTPNM = "Last Changed By
E_DATE = "Date and Time, Current (Application Server) Date
E_TIME = "Date and Time, Current Application Server Time
EXCEPTIONS
MISSING_IMPORT_PARAMETER = 1 RSD_IOBJ_GET = 2 TABLE_RSDMDENQ_ACCESS_ERROR = 3
IMPORTING Parameters details for RSDMD_CHECK_LOCK
I_IOBJNM -
Data type: RSDIOBJ-IOBJNMOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CHABASNM -
Data type: RSDCHABAS-CHABASNMOptional: Yes
Call by Reference: No ( called with pass by value option)
I_TABCLASS -
Data type: RSDMDENQ-TABCLASSOptional: No
Call by Reference: No ( called with pass by value option)
I_REQUNR -
Data type: RSDMDENQ-REQUNROptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RSDMD_CHECK_LOCK
E_PERMIT -
Data type: RS_BOOLOptional: No
Call by Reference: No ( called with pass by value option)
E_LOCK_SET -
Data type: RS_BOOLOptional: No
Call by Reference: No ( called with pass by value option)
E_REQUNR -
Data type: RSDMDENQ-REQUNROptional: No
Call by Reference: No ( called with pass by value option)
E_TSTPNM - Last Changed By
Data type: RSTSTPNMOptional: No
Call by Reference: No ( called with pass by value option)
E_DATE - Date and Time, Current (Application Server) Date
Data type: SYDATUMOptional: No
Call by Reference: No ( called with pass by value option)
E_TIME - Date and Time, Current Application Server Time
Data type: SYUZEITOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
MISSING_IMPORT_PARAMETER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RSD_IOBJ_GET -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLE_RSDMDENQ_ACCESS_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RSDMD_CHECK_LOCK 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_e_permit | TYPE RS_BOOL, " | |||
| lv_i_iobjnm | TYPE RSDIOBJ-IOBJNM, " | |||
| lv_missing_import_parameter | TYPE RSDIOBJ, " | |||
| lv_e_lock_set | TYPE RS_BOOL, " | |||
| lv_i_chabasnm | TYPE RSDCHABAS-CHABASNM, " | |||
| lv_rsd_iobj_get | TYPE RSDCHABAS, " | |||
| lv_e_requnr | TYPE RSDMDENQ-REQUNR, " | |||
| lv_i_tabclass | TYPE RSDMDENQ-TABCLASS, " | |||
| lv_table_rsdmdenq_access_error | TYPE RSDMDENQ, " | |||
| lv_e_tstpnm | TYPE RSTSTPNM, " | |||
| lv_i_requnr | TYPE RSDMDENQ-REQUNR, " | |||
| lv_e_date | TYPE SYDATUM, " | |||
| lv_e_time | TYPE SYUZEIT. " |
|   CALL FUNCTION 'RSDMD_CHECK_LOCK' "Testing whether a table is locked |
| EXPORTING | ||
| I_IOBJNM | = lv_i_iobjnm | |
| I_CHABASNM | = lv_i_chabasnm | |
| I_TABCLASS | = lv_i_tabclass | |
| I_REQUNR | = lv_i_requnr | |
| IMPORTING | ||
| E_PERMIT | = lv_e_permit | |
| E_LOCK_SET | = lv_e_lock_set | |
| E_REQUNR | = lv_e_requnr | |
| E_TSTPNM | = lv_e_tstpnm | |
| E_DATE | = lv_e_date | |
| E_TIME | = lv_e_time | |
| EXCEPTIONS | ||
| MISSING_IMPORT_PARAMETER = 1 | ||
| RSD_IOBJ_GET = 2 | ||
| TABLE_RSDMDENQ_ACCESS_ERROR = 3 | ||
| . " RSDMD_CHECK_LOCK | ||
ABAP code using 7.40 inline data declarations to call FM RSDMD_CHECK_LOCK
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 IOBJNM FROM RSDIOBJ INTO @DATA(ld_i_iobjnm). | ||||
| "SELECT single CHABASNM FROM RSDCHABAS INTO @DATA(ld_i_chabasnm). | ||||
| "SELECT single REQUNR FROM RSDMDENQ INTO @DATA(ld_e_requnr). | ||||
| "SELECT single TABCLASS FROM RSDMDENQ INTO @DATA(ld_i_tabclass). | ||||
| "SELECT single REQUNR FROM RSDMDENQ INTO @DATA(ld_i_requnr). | ||||
Search for further information about these or an SAP related objects