SAP ENQUEUE_E_TOAIN Function Module for Request lock for object E_TOAIN









ENQUEUE_E_TOAIN is a standard enqueue e toain 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 E_TOAIN 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 e toain FM, simply by entering the name ENQUEUE_E_TOAIN into the relevant SAP transaction such as SE37 or SE38.

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



Function ENQUEUE_E_TOAIN 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_E_TOAIN'"Request lock for object E_TOAIN
EXPORTING
* MODE_TOAIN = 'E' "Lock mode for table TOAIN
* X_PROTOKOLL = ' ' "Fill argument 01 with initial value?
* X_VERSION = ' ' "Fill argument 02 with initial value?
* X_APPLMETHOD = ' ' "Fill argument 03 with initial value?
* X_DOC_TYPE = ' ' "Fill argument 04 with initial value?
* X_SUPPORTED = ' ' "Fill argument 05 with initial value?
* X_KOMMTYP = ' ' "Fill argument 06 with initial value?
* X_APPLICATIO = ' ' "Fill argument 07 with initial value?
* X_S_METHODE = ' ' "Fill argument 08 with initial value?
* _SCOPE = '2' "
* _WAIT = ' ' "
* PROTOKOLL = "01th enqueue argument
* _COLLECT = ' ' "Initially only collect lock
* VERSION = "02th enqueue argument
* APPLMETHOD = "03th enqueue argument
* DOC_TYPE = "04th enqueue argument
* SUPPORTED = "05th enqueue argument
* KOMMTYP = "06th enqueue argument
* APPLICATIO = "07th enqueue argument
* S_METHODE = "08th enqueue argument

EXCEPTIONS
FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2
.



IMPORTING Parameters details for ENQUEUE_E_TOAIN

MODE_TOAIN - Lock mode for table TOAIN

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

X_PROTOKOLL - Fill argument 01 with initial value?

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

X_VERSION - Fill argument 02 with initial value?

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

X_APPLMETHOD - Fill argument 03 with initial value?

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

X_DOC_TYPE - Fill argument 04 with initial value?

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

X_SUPPORTED - Fill argument 05 with initial value?

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

X_KOMMTYP - Fill argument 06 with initial value?

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

X_APPLICATIO - Fill argument 07 with initial value?

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

X_S_METHODE - Fill argument 08 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)

PROTOKOLL - 01th enqueue argument

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

_COLLECT - Initially only collect lock

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

VERSION - 02th enqueue argument

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

APPLMETHOD - 03th enqueue argument

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

DOC_TYPE - 04th enqueue argument

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

SUPPORTED - 05th enqueue argument

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

KOMMTYP - 06th enqueue argument

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

APPLICATIO - 07th enqueue argument

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

S_METHODE - 08th enqueue argument

Data type: TOAIN-S_METHODE
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_E_TOAIN 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_toain  TYPE DD26E-ENQMODE, "   'E'
lv_foreign_lock  TYPE DD26E, "   
lv_x_protokoll  TYPE DD26E, "   SPACE
lv_x_version  TYPE DD26E, "   SPACE
lv_x_applmethod  TYPE DD26E, "   SPACE
lv_x_doc_type  TYPE DD26E, "   SPACE
lv_x_supported  TYPE DD26E, "   SPACE
lv_x_kommtyp  TYPE DD26E, "   SPACE
lv_x_applicatio  TYPE DD26E, "   SPACE
lv_x_s_methode  TYPE DD26E, "   SPACE
lv__scope  TYPE DD26E, "   '2'
lv__wait  TYPE DD26E, "   SPACE
lv_protokoll  TYPE TOAIN-PROTOKOLL, "   
lv_system_failure  TYPE TOAIN, "   
lv__collect  TYPE DDENQ_LIKE-COLLECT, "   ' '
lv_version  TYPE TOAIN-VERSION, "   
lv_applmethod  TYPE TOAIN-APPLMETHOD, "   
lv_doc_type  TYPE TOAIN-DOC_TYPE, "   
lv_supported  TYPE TOAIN-SUPPORTED, "   
lv_kommtyp  TYPE TOAIN-KOMMTYP, "   
lv_applicatio  TYPE TOAIN-APPLICATIO, "   
lv_s_methode  TYPE TOAIN-S_METHODE. "   

  CALL FUNCTION 'ENQUEUE_E_TOAIN'  "Request lock for object E_TOAIN
    EXPORTING
         MODE_TOAIN = lv_mode_toain
         X_PROTOKOLL = lv_x_protokoll
         X_VERSION = lv_x_version
         X_APPLMETHOD = lv_x_applmethod
         X_DOC_TYPE = lv_x_doc_type
         X_SUPPORTED = lv_x_supported
         X_KOMMTYP = lv_x_kommtyp
         X_APPLICATIO = lv_x_applicatio
         X_S_METHODE = lv_x_s_methode
         _SCOPE = lv__scope
         _WAIT = lv__wait
         PROTOKOLL = lv_protokoll
         _COLLECT = lv__collect
         VERSION = lv_version
         APPLMETHOD = lv_applmethod
         DOC_TYPE = lv_doc_type
         SUPPORTED = lv_supported
         KOMMTYP = lv_kommtyp
         APPLICATIO = lv_applicatio
         S_METHODE = lv_s_methode
    EXCEPTIONS
        FOREIGN_LOCK = 1
        SYSTEM_FAILURE = 2
. " ENQUEUE_E_TOAIN




ABAP code using 7.40 inline data declarations to call FM ENQUEUE_E_TOAIN

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 ENQMODE FROM DD26E INTO @DATA(ld_mode_toain).
DATA(ld_mode_toain) = 'E'.
 
 
DATA(ld_x_protokoll) = ' '.
 
DATA(ld_x_version) = ' '.
 
DATA(ld_x_applmethod) = ' '.
 
DATA(ld_x_doc_type) = ' '.
 
DATA(ld_x_supported) = ' '.
 
DATA(ld_x_kommtyp) = ' '.
 
DATA(ld_x_applicatio) = ' '.
 
DATA(ld_x_s_methode) = ' '.
 
DATA(ld__scope) = '2'.
 
DATA(ld__wait) = ' '.
 
"SELECT single PROTOKOLL FROM TOAIN INTO @DATA(ld_protokoll).
 
 
"SELECT single COLLECT FROM DDENQ_LIKE INTO @DATA(ld__collect).
DATA(ld__collect) = ' '.
 
"SELECT single VERSION FROM TOAIN INTO @DATA(ld_version).
 
"SELECT single APPLMETHOD FROM TOAIN INTO @DATA(ld_applmethod).
 
"SELECT single DOC_TYPE FROM TOAIN INTO @DATA(ld_doc_type).
 
"SELECT single SUPPORTED FROM TOAIN INTO @DATA(ld_supported).
 
"SELECT single KOMMTYP FROM TOAIN INTO @DATA(ld_kommtyp).
 
"SELECT single APPLICATIO FROM TOAIN INTO @DATA(ld_applicatio).
 
"SELECT single S_METHODE FROM TOAIN INTO @DATA(ld_s_methode).
 


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!