SAP GEN_ENQUEUE_FUNCTION Function Module for









GEN_ENQUEUE_FUNCTION is a standard gen enqueue function SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 gen enqueue function FM, simply by entering the name GEN_ENQUEUE_FUNCTION into the relevant SAP transaction such as SE37 or SE38.

Function Group: SDM3
Program Name: SAPLSDM3
Main Program: SAPLSDM3
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function GEN_ENQUEUE_FUNCTION 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 'GEN_ENQUEUE_FUNCTION'"
EXPORTING
* DATA_DELIVERED = ' ' "Transfer data to internal tables
ENQNAME = "Lock object name
* HEADER = ' ' "Lock object header
* PRID = 0 "Output channel for log writer
* OLDTYPE = ' ' "

IMPORTING
DEQAREA = "Function group into which the DEQUEUE function module was generated
DEQFUNCNAME = "Name of the generated DEQUEUE func
ENQAREA = "Function group into which the ENQUEUE function module was generated
ENQFUNCNAME = "Name of the generated ENQUEUE func

TABLES
* ENQFIELDS = "Fields of the lock object
* ENQTABLES = "Tables of the lock object

EXCEPTIONS
ENQ_IS_INCONSISTENT = 1 ENQ_NOT_FOUND = 2 FUNCTION_ENQUEUED = 3 GENERATE_ERROR = 4 INTERNAL_ERROR = 5 REP_ERROR = 6 REP_NOT_FOUND = 7 TOO_MANY_FUNCTIONS = 8
.



IMPORTING Parameters details for GEN_ENQUEUE_FUNCTION

DATA_DELIVERED - Transfer data to internal tables

Data type: DDREFSTRUC-BOOL
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ENQNAME - Lock object name

Data type: DD25V-VIEWNAME
Optional: No
Call by Reference: No ( called with pass by value option)

HEADER - Lock object header

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PRID - Output channel for log writer

Data type: SY-TABIX
Optional: Yes
Call by Reference: No ( called with pass by value option)

OLDTYPE -

Data type: DDREFSTRUC-FLAG
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for GEN_ENQUEUE_FUNCTION

DEQAREA - Function group into which the DEQUEUE function module was generated

Data type: TLIBG-AREA
Optional: No
Call by Reference: No ( called with pass by value option)

DEQFUNCNAME - Name of the generated DEQUEUE func

Data type: TFDIR-FUNCNAME
Optional: No
Call by Reference: No ( called with pass by value option)

ENQAREA - Function group into which the ENQUEUE function module was generated

Data type: TLIBG-AREA
Optional: No
Call by Reference: No ( called with pass by value option)

ENQFUNCNAME - Name of the generated ENQUEUE func

Data type: TFDIR-FUNCNAME
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for GEN_ENQUEUE_FUNCTION

ENQFIELDS - Fields of the lock object

Data type: DD27P
Optional: Yes
Call by Reference: No ( called with pass by value option)

ENQTABLES - Tables of the lock object

Data type: DD26V
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

ENQ_IS_INCONSISTENT - Lock object is inconsistent

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ENQ_NOT_FOUND - Lock object not found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FUNCTION_ENQUEUED - Function group is blocked

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

GENERATE_ERROR - Generated function modules incorre

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INTERNAL_ERROR - Internal error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

REP_ERROR - Error in the program reference

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

REP_NOT_FOUND - Program reference is missing

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TOO_MANY_FUNCTIONS - Too many function modules

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for GEN_ENQUEUE_FUNCTION 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_deqarea  TYPE TLIBG-AREA, "   
lt_enqfields  TYPE STANDARD TABLE OF DD27P, "   
lv_data_delivered  TYPE DDREFSTRUC-BOOL, "   SPACE
lv_enq_is_inconsistent  TYPE DDREFSTRUC, "   
lv_enqname  TYPE DD25V-VIEWNAME, "   
lt_enqtables  TYPE STANDARD TABLE OF DD26V, "   
lv_deqfuncname  TYPE TFDIR-FUNCNAME, "   
lv_enq_not_found  TYPE TFDIR, "   
lv_header  TYPE TFDIR, "   SPACE
lv_enqarea  TYPE TLIBG-AREA, "   
lv_function_enqueued  TYPE TLIBG, "   
lv_prid  TYPE SY-TABIX, "   0
lv_enqfuncname  TYPE TFDIR-FUNCNAME, "   
lv_generate_error  TYPE TFDIR, "   
lv_oldtype  TYPE DDREFSTRUC-FLAG, "   ' '
lv_internal_error  TYPE DDREFSTRUC, "   
lv_rep_error  TYPE DDREFSTRUC, "   
lv_rep_not_found  TYPE DDREFSTRUC, "   
lv_too_many_functions  TYPE DDREFSTRUC. "   

  CALL FUNCTION 'GEN_ENQUEUE_FUNCTION'  "
    EXPORTING
         DATA_DELIVERED = lv_data_delivered
         ENQNAME = lv_enqname
         HEADER = lv_header
         PRID = lv_prid
         OLDTYPE = lv_oldtype
    IMPORTING
         DEQAREA = lv_deqarea
         DEQFUNCNAME = lv_deqfuncname
         ENQAREA = lv_enqarea
         ENQFUNCNAME = lv_enqfuncname
    TABLES
         ENQFIELDS = lt_enqfields
         ENQTABLES = lt_enqtables
    EXCEPTIONS
        ENQ_IS_INCONSISTENT = 1
        ENQ_NOT_FOUND = 2
        FUNCTION_ENQUEUED = 3
        GENERATE_ERROR = 4
        INTERNAL_ERROR = 5
        REP_ERROR = 6
        REP_NOT_FOUND = 7
        TOO_MANY_FUNCTIONS = 8
. " GEN_ENQUEUE_FUNCTION




ABAP code using 7.40 inline data declarations to call FM GEN_ENQUEUE_FUNCTION

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 AREA FROM TLIBG INTO @DATA(ld_deqarea).
 
 
"SELECT single BOOL FROM DDREFSTRUC INTO @DATA(ld_data_delivered).
DATA(ld_data_delivered) = ' '.
 
 
"SELECT single VIEWNAME FROM DD25V INTO @DATA(ld_enqname).
 
 
"SELECT single FUNCNAME FROM TFDIR INTO @DATA(ld_deqfuncname).
 
 
DATA(ld_header) = ' '.
 
"SELECT single AREA FROM TLIBG INTO @DATA(ld_enqarea).
 
 
"SELECT single TABIX FROM SY INTO @DATA(ld_prid).
 
"SELECT single FUNCNAME FROM TFDIR INTO @DATA(ld_enqfuncname).
 
 
"SELECT single FLAG FROM DDREFSTRUC INTO @DATA(ld_oldtype).
DATA(ld_oldtype) = ' '.
 
 
 
 
 


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!