SAP ENQUEUE_ENLSU Function Module for Request lock for object ENLSU









ENQUEUE_ENLSU is a standard enqueue enlsu SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Request lock for object ENLSU 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 enqueue enlsu FM, simply by entering the name ENQUEUE_ENLSU into the relevant SAP transaction such as SE37 or SE38.

Function Group: /1BCDWBEN/NEN0002
Program Name: /1BCDWBEN/SAPLNEN0002
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function ENQUEUE_ENLSU 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 'ENQUEUE_ENLSU'"Request lock for object ENLSU
EXPORTING
* MODE_NLSU = 'E' "Lock mode for table NLSU
* LEIST = "09th enqueue argument
* MEINH = "10th enqueue argument
* AUTAR = "11th enqueue argument
* X_EINRI = ' ' "Fill argument 02 with initial value?
* X_KATID = ' ' "Fill argument 03 with initial value?
* X_JAHR = ' ' "Fill argument 04 with initial value?
* X_MONAT = ' ' "Fill argument 05 with initial value?
* X_FALAR = ' ' "Fill argument 06 with initial value?
* X_ANFOE = ' ' "Fill argument 07 with initial value?
* X_ERBOE = ' ' "Fill argument 08 with initial value?
* MANDT = SY-MANDT "01th enqueue argument
* X_LEIST = ' ' "Fill argument 09 with initial value?
* X_MEINH = ' ' "Fill argument 10 with initial value?
* X_AUTAR = ' ' "Fill argument 11 with initial value?
* _SCOPE = '2' "
* _WAIT = ' ' "
* _COLLECT = ' ' "Initially only collect lock
* EINRI = "02th enqueue argument
* KATID = "03th enqueue argument
* JAHR = "04th enqueue argument
* MONAT = "05th enqueue argument
* FALAR = "06th enqueue argument
* ANFOE = "07th enqueue argument
* ERBOE = "08th enqueue argument

EXCEPTIONS
FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2
.



IMPORTING Parameters details for ENQUEUE_ENLSU

MODE_NLSU - Lock mode for table NLSU

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

LEIST - 09th enqueue argument

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

MEINH - 10th enqueue argument

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

AUTAR - 11th enqueue argument

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

X_EINRI - Fill argument 02 with initial value?

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

X_KATID - Fill argument 03 with initial value?

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

X_JAHR - Fill argument 04 with initial value?

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

X_MONAT - Fill argument 05 with initial value?

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

X_FALAR - Fill argument 06 with initial value?

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

X_ANFOE - Fill argument 07 with initial value?

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

X_ERBOE - Fill argument 08 with initial value?

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

MANDT - 01th enqueue argument

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

X_LEIST - Fill argument 09 with initial value?

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

X_MEINH - Fill argument 10 with initial value?

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

X_AUTAR - Fill argument 11 with initial value?

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

_SCOPE -

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

_WAIT -

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

_COLLECT - Initially only collect lock

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

EINRI - 02th enqueue argument

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

KATID - 03th enqueue argument

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

JAHR - 04th enqueue argument

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

MONAT - 05th enqueue argument

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

FALAR - 06th enqueue argument

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

ANFOE - 07th enqueue argument

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

ERBOE - 08th enqueue argument

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

EXCEPTIONS details

FOREIGN_LOCK - Object already locked

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

SYSTEM_FAILURE - Internal error from enqueue server

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

Copy and paste ABAP code example for ENQUEUE_ENLSU 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_mode_nlsu  TYPE ENQMODE, "   'E'
lv_foreign_lock  TYPE ENQMODE, "   
lv_leist  TYPE NLSU-LEIST, "   
lv_meinh  TYPE NLSU-MEINH, "   
lv_autar  TYPE NLSU-AUTAR, "   
lv_x_einri  TYPE NLSU, "   SPACE
lv_x_katid  TYPE NLSU, "   SPACE
lv_x_jahr  TYPE NLSU, "   SPACE
lv_x_monat  TYPE NLSU, "   SPACE
lv_x_falar  TYPE NLSU, "   SPACE
lv_x_anfoe  TYPE NLSU, "   SPACE
lv_x_erboe  TYPE NLSU, "   SPACE
lv_mandt  TYPE NLSU-MANDT, "   SY-MANDT
lv_system_failure  TYPE NLSU, "   
lv_x_leist  TYPE NLSU, "   SPACE
lv_x_meinh  TYPE NLSU, "   SPACE
lv_x_autar  TYPE NLSU, "   SPACE
lv__scope  TYPE NLSU, "   '2'
lv__wait  TYPE NLSU, "   SPACE
lv__collect  TYPE DDENQCOLL, "   ' '
lv_einri  TYPE NLSU-EINRI, "   
lv_katid  TYPE NLSU-KATID, "   
lv_jahr  TYPE NLSU-JAHR, "   
lv_monat  TYPE NLSU-MONAT, "   
lv_falar  TYPE NLSU-FALAR, "   
lv_anfoe  TYPE NLSU-ANFOE, "   
lv_erboe  TYPE NLSU-ERBOE. "   

  CALL FUNCTION 'ENQUEUE_ENLSU'  "Request lock for object ENLSU
    EXPORTING
         MODE_NLSU = lv_mode_nlsu
         LEIST = lv_leist
         MEINH = lv_meinh
         AUTAR = lv_autar
         X_EINRI = lv_x_einri
         X_KATID = lv_x_katid
         X_JAHR = lv_x_jahr
         X_MONAT = lv_x_monat
         X_FALAR = lv_x_falar
         X_ANFOE = lv_x_anfoe
         X_ERBOE = lv_x_erboe
         MANDT = lv_mandt
         X_LEIST = lv_x_leist
         X_MEINH = lv_x_meinh
         X_AUTAR = lv_x_autar
         _SCOPE = lv__scope
         _WAIT = lv__wait
         _COLLECT = lv__collect
         EINRI = lv_einri
         KATID = lv_katid
         JAHR = lv_jahr
         MONAT = lv_monat
         FALAR = lv_falar
         ANFOE = lv_anfoe
         ERBOE = lv_erboe
    EXCEPTIONS
        FOREIGN_LOCK = 1
        SYSTEM_FAILURE = 2
. " ENQUEUE_ENLSU




ABAP code using 7.40 inline data declarations to call FM ENQUEUE_ENLSU

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_mode_nlsu) = 'E'.
 
 
"SELECT single LEIST FROM NLSU INTO @DATA(ld_leist).
 
"SELECT single MEINH FROM NLSU INTO @DATA(ld_meinh).
 
"SELECT single AUTAR FROM NLSU INTO @DATA(ld_autar).
 
DATA(ld_x_einri) = ' '.
 
DATA(ld_x_katid) = ' '.
 
DATA(ld_x_jahr) = ' '.
 
DATA(ld_x_monat) = ' '.
 
DATA(ld_x_falar) = ' '.
 
DATA(ld_x_anfoe) = ' '.
 
DATA(ld_x_erboe) = ' '.
 
"SELECT single MANDT FROM NLSU INTO @DATA(ld_mandt).
DATA(ld_mandt) = SY-MANDT.
 
 
DATA(ld_x_leist) = ' '.
 
DATA(ld_x_meinh) = ' '.
 
DATA(ld_x_autar) = ' '.
 
DATA(ld__scope) = '2'.
 
DATA(ld__wait) = ' '.
 
DATA(ld__collect) = ' '.
 
"SELECT single EINRI FROM NLSU INTO @DATA(ld_einri).
 
"SELECT single KATID FROM NLSU INTO @DATA(ld_katid).
 
"SELECT single JAHR FROM NLSU INTO @DATA(ld_jahr).
 
"SELECT single MONAT FROM NLSU INTO @DATA(ld_monat).
 
"SELECT single FALAR FROM NLSU INTO @DATA(ld_falar).
 
"SELECT single ANFOE FROM NLSU INTO @DATA(ld_anfoe).
 
"SELECT single ERBOE FROM NLSU INTO @DATA(ld_erboe).
 


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!