SAP DD_TABL_CNV_LOCK Function Module for Lock a table for conversion
DD_TABL_CNV_LOCK is a standard dd tabl cnv 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 Lock a table for conversion 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 dd tabl cnv lock FM, simply by entering the name DD_TABL_CNV_LOCK into the relevant SAP transaction such as SE37 or SE38.
Function Group: SDB6
Program Name: SAPLSDB6
Main Program: SAPLSDB6
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function DD_TABL_CNV_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 'DD_TABL_CNV_LOCK'"Lock a table for conversion.
EXPORTING
TABNAME = "
* PRID = 0 "Row Index of Internal Tables
* FCT = 'ICN' "
* EXECMODE = 'B' "
* EXITS = "
* SCENARIO = 'PREUPG' "Sscenario (graph) of a conversion
* MIGDEST = "Logical Destination (Specified in Function Call)
* CBASIS_CHECK = 'X' "
* MASS_DATA = ' ' "
IMPORTING
TICNV_WA = "
EXCEPTIONS
LOCK_REFUSED = 1 OP_FAILURE = 2 OBJECT_LOCKED = 3 ILLEGAL_EXECMODE = 4 ACTIVATION_NOT_SUCCESSFULL = 5 CANNOT_CHECK_DBMS = 6 OLD_DBMS_VERSION = 7 IS_IN_TARGET = 8 LOCK_REFUSED_IN_TARGET = 9
IMPORTING Parameters details for DD_TABL_CNV_LOCK
TABNAME -
Data type: DD02L-TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
PRID - Row Index of Internal Tables
Data type: SY-TABIXOptional: Yes
Call by Reference: No ( called with pass by value option)
FCT -
Data type: TBATG-FCTDefault: 'ICN'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXECMODE -
Data type: TBATG-EXECMODEDefault: 'B'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXITS -
Data type: DDCNVEXITOptional: Yes
Call by Reference: No ( called with pass by value option)
SCENARIO - Sscenario (graph) of a conversion
Data type: TICNV-SCENARIODefault: 'PREUPG'
Optional: Yes
Call by Reference: No ( called with pass by value option)
MIGDEST - Logical Destination (Specified in Function Call)
Data type: TICNV-MIGDESTOptional: Yes
Call by Reference: No ( called with pass by value option)
CBASIS_CHECK -
Data type: DDREFSTRUC-BOOLDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
MASS_DATA -
Data type: DDREFSTRUC-BOOLDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for DD_TABL_CNV_LOCK
TICNV_WA -
Data type: TICNVOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
LOCK_REFUSED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OP_FAILURE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_LOCKED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ILLEGAL_EXECMODE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ACTIVATION_NOT_SUCCESSFULL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CANNOT_CHECK_DBMS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OLD_DBMS_VERSION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
IS_IN_TARGET -
Data type:Optional: No
Call by Reference: Yes
LOCK_REFUSED_IN_TARGET -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for DD_TABL_CNV_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_tabname | TYPE DD02L-TABNAME, " | |||
| lv_ticnv_wa | TYPE TICNV, " | |||
| lv_lock_refused | TYPE TICNV, " | |||
| lv_prid | TYPE SY-TABIX, " 0 | |||
| lv_op_failure | TYPE SY, " | |||
| lv_fct | TYPE TBATG-FCT, " 'ICN' | |||
| lv_object_locked | TYPE TBATG, " | |||
| lv_execmode | TYPE TBATG-EXECMODE, " 'B' | |||
| lv_illegal_execmode | TYPE TBATG, " | |||
| lv_exits | TYPE DDCNVEXIT, " | |||
| lv_activation_not_successfull | TYPE DDCNVEXIT, " | |||
| lv_scenario | TYPE TICNV-SCENARIO, " 'PREUPG' | |||
| lv_cannot_check_dbms | TYPE TICNV, " | |||
| lv_migdest | TYPE TICNV-MIGDEST, " | |||
| lv_old_dbms_version | TYPE TICNV, " | |||
| lv_cbasis_check | TYPE DDREFSTRUC-BOOL, " 'X' | |||
| lv_is_in_target | TYPE DDREFSTRUC, " | |||
| lv_mass_data | TYPE DDREFSTRUC-BOOL, " ' ' | |||
| lv_lock_refused_in_target | TYPE DDREFSTRUC. " |
|   CALL FUNCTION 'DD_TABL_CNV_LOCK' "Lock a table for conversion |
| EXPORTING | ||
| TABNAME | = lv_tabname | |
| PRID | = lv_prid | |
| FCT | = lv_fct | |
| EXECMODE | = lv_execmode | |
| EXITS | = lv_exits | |
| SCENARIO | = lv_scenario | |
| MIGDEST | = lv_migdest | |
| CBASIS_CHECK | = lv_cbasis_check | |
| MASS_DATA | = lv_mass_data | |
| IMPORTING | ||
| TICNV_WA | = lv_ticnv_wa | |
| EXCEPTIONS | ||
| LOCK_REFUSED = 1 | ||
| OP_FAILURE = 2 | ||
| OBJECT_LOCKED = 3 | ||
| ILLEGAL_EXECMODE = 4 | ||
| ACTIVATION_NOT_SUCCESSFULL = 5 | ||
| CANNOT_CHECK_DBMS = 6 | ||
| OLD_DBMS_VERSION = 7 | ||
| IS_IN_TARGET = 8 | ||
| LOCK_REFUSED_IN_TARGET = 9 | ||
| . " DD_TABL_CNV_LOCK | ||
ABAP code using 7.40 inline data declarations to call FM DD_TABL_CNV_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 TABNAME FROM DD02L INTO @DATA(ld_tabname). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_prid). | ||||
| "SELECT single FCT FROM TBATG INTO @DATA(ld_fct). | ||||
| DATA(ld_fct) | = 'ICN'. | |||
| "SELECT single EXECMODE FROM TBATG INTO @DATA(ld_execmode). | ||||
| DATA(ld_execmode) | = 'B'. | |||
| "SELECT single SCENARIO FROM TICNV INTO @DATA(ld_scenario). | ||||
| DATA(ld_scenario) | = 'PREUPG'. | |||
| "SELECT single MIGDEST FROM TICNV INTO @DATA(ld_migdest). | ||||
| "SELECT single BOOL FROM DDREFSTRUC INTO @DATA(ld_cbasis_check). | ||||
| DATA(ld_cbasis_check) | = 'X'. | |||
| "SELECT single BOOL FROM DDREFSTRUC INTO @DATA(ld_mass_data). | ||||
| DATA(ld_mass_data) | = ' '. | |||
Search for further information about these or an SAP related objects