SAP CLEF_TCLA_READ_AND_LOCK Function Module for Reads TCLA and Locks for Update









CLEF_TCLA_READ_AND_LOCK is a standard clef tcla read and 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 Reads TCLA and Locks for Update 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 clef tcla read and lock FM, simply by entering the name CLEF_TCLA_READ_AND_LOCK into the relevant SAP transaction such as SE37 or SE38.

Function Group: CLEF
Program Name: SAPLCLEF
Main Program: SAPLCLEF
Appliation area:
Release date: 01-Jan-1970
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CLEF_TCLA_READ_AND_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 'CLEF_TCLA_READ_AND_LOCK'"Reads TCLA and Locks for Update
EXPORTING
I_CLASSTYPE = "
* I_LOCK_ONLY = "
* I_READ_ONLY = 'X' "Field for Selecting an Entry

IMPORTING
E_V_TCLA = "Class Type View

TABLES
* T_VCLAO = "Object Types of Class Type

EXCEPTIONS
ENTRY_LOCKED = 1 KLART_NOT_FOUND = 2 KLART_NOT_ALLOWED = 3
.



IMPORTING Parameters details for CLEF_TCLA_READ_AND_LOCK

I_CLASSTYPE -

Data type: TCLA-KLART
Optional: No
Call by Reference: Yes

I_LOCK_ONLY -

Data type: RMCLF-KREUZ
Optional: Yes
Call by Reference: Yes

I_READ_ONLY - Field for Selecting an Entry

Data type: RMCLF-KREUZ
Default: 'X'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for CLEF_TCLA_READ_AND_LOCK

E_V_TCLA - Class Type View

Data type: V_CLA
Optional: No
Call by Reference: Yes

TABLES Parameters details for CLEF_TCLA_READ_AND_LOCK

T_VCLAO - Object Types of Class Type

Data type: V_CLAO
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

ENTRY_LOCKED - Class Type Already Locked

Data type:
Optional: No
Call by Reference: Yes

KLART_NOT_FOUND - Class Type not Found

Data type:
Optional: No
Call by Reference: Yes

KLART_NOT_ALLOWED - Class Type Not Allowed for Engineering Change Management

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CLEF_TCLA_READ_AND_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:
lt_t_vclao  TYPE STANDARD TABLE OF V_CLAO, "   
lv_e_v_tcla  TYPE V_CLA, "   
lv_i_classtype  TYPE TCLA-KLART, "   
lv_entry_locked  TYPE TCLA, "   
lv_i_lock_only  TYPE RMCLF-KREUZ, "   
lv_klart_not_found  TYPE RMCLF, "   
lv_i_read_only  TYPE RMCLF-KREUZ, "   'X'
lv_klart_not_allowed  TYPE RMCLF. "   

  CALL FUNCTION 'CLEF_TCLA_READ_AND_LOCK'  "Reads TCLA and Locks for Update
    EXPORTING
         I_CLASSTYPE = lv_i_classtype
         I_LOCK_ONLY = lv_i_lock_only
         I_READ_ONLY = lv_i_read_only
    IMPORTING
         E_V_TCLA = lv_e_v_tcla
    TABLES
         T_VCLAO = lt_t_vclao
    EXCEPTIONS
        ENTRY_LOCKED = 1
        KLART_NOT_FOUND = 2
        KLART_NOT_ALLOWED = 3
. " CLEF_TCLA_READ_AND_LOCK




ABAP code using 7.40 inline data declarations to call FM CLEF_TCLA_READ_AND_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 KLART FROM TCLA INTO @DATA(ld_i_classtype).
 
 
"SELECT single KREUZ FROM RMCLF INTO @DATA(ld_i_lock_only).
 
 
"SELECT single KREUZ FROM RMCLF INTO @DATA(ld_i_read_only).
DATA(ld_i_read_only) = 'X'.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!