SAP ENQUEUE_EWCCE Function Module for Request lock for object EWCCE
ENQUEUE_EWCCE is a standard enqueue ewcce 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 EWCCE 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 ewcce FM, simply by entering the name ENQUEUE_EWCCE into the relevant SAP transaction such as SE37 or SE38.
Function Group: /1BCDWBEN/WEN0001
Program Name: /1BCDWBEN/SAPLWEN0001
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function ENQUEUE_EWCCE 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_EWCCE'"Request lock for object EWCCE.
EXPORTING
* MODE_WCCE = 'E' "Lock mode for table WCCE
* X_TGGRP = ' ' "Fill argument 03 with initial value?
* X_TGPROC1 = ' ' "Fill argument 04 with initial value?
* X_TGTYP1 = ' ' "Fill argument 05 with initial value?
* X_TGPROC2 = ' ' "Fill argument 06 with initial value?
* X_TGTYP2 = ' ' "Fill argument 07 with initial value?
* _SCOPE = '2' "
* _WAIT = ' ' "
* _COLLECT = ' ' "Initially only collect lock
* MANDT = SY-MANDT "01th enqueue argument
* IWERK = "02th enqueue argument
* TGGRP = "03th enqueue argument
* TGPROC1 = "04th enqueue argument
* TGTYP1 = "05th enqueue argument
* TGPROC2 = "06th enqueue argument
* TGTYP2 = "07th enqueue argument
* X_IWERK = ' ' "Fill argument 02 with initial value?
EXCEPTIONS
FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2
IMPORTING Parameters details for ENQUEUE_EWCCE
MODE_WCCE - Lock mode for table WCCE
Data type: ENQMODEDefault: 'E'
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_TGGRP - Fill argument 03 with initial value?
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_TGPROC1 - Fill argument 04 with initial value?
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_TGTYP1 - Fill argument 05 with initial value?
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_TGPROC2 - Fill argument 06 with initial value?
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_TGTYP2 - Fill argument 07 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: DDENQCOLLDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
MANDT - 01th enqueue argument
Data type: WCCE-MANDTDefault: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)
IWERK - 02th enqueue argument
Data type: WCCE-IWERKOptional: Yes
Call by Reference: No ( called with pass by value option)
TGGRP - 03th enqueue argument
Data type: WCCE-TGGRPOptional: Yes
Call by Reference: No ( called with pass by value option)
TGPROC1 - 04th enqueue argument
Data type: WCCE-TGPROC1Optional: Yes
Call by Reference: No ( called with pass by value option)
TGTYP1 - 05th enqueue argument
Data type: WCCE-TGTYP1Optional: Yes
Call by Reference: No ( called with pass by value option)
TGPROC2 - 06th enqueue argument
Data type: WCCE-TGPROC2Optional: Yes
Call by Reference: No ( called with pass by value option)
TGTYP2 - 07th enqueue argument
Data type: WCCE-TGTYP2Optional: Yes
Call by Reference: No ( called with pass by value option)
X_IWERK - Fill argument 02 with initial value?
Data type:Default: SPACE
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_EWCCE 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_wcce | TYPE ENQMODE, " 'E' | |||
lv_foreign_lock | TYPE ENQMODE, " | |||
lv_x_tggrp | TYPE ENQMODE, " SPACE | |||
lv_x_tgproc1 | TYPE ENQMODE, " SPACE | |||
lv_x_tgtyp1 | TYPE ENQMODE, " SPACE | |||
lv_x_tgproc2 | TYPE ENQMODE, " SPACE | |||
lv_x_tgtyp2 | TYPE ENQMODE, " SPACE | |||
lv__scope | TYPE ENQMODE, " '2' | |||
lv__wait | TYPE ENQMODE, " SPACE | |||
lv__collect | TYPE DDENQCOLL, " ' ' | |||
lv_mandt | TYPE WCCE-MANDT, " SY-MANDT | |||
lv_system_failure | TYPE WCCE, " | |||
lv_iwerk | TYPE WCCE-IWERK, " | |||
lv_tggrp | TYPE WCCE-TGGRP, " | |||
lv_tgproc1 | TYPE WCCE-TGPROC1, " | |||
lv_tgtyp1 | TYPE WCCE-TGTYP1, " | |||
lv_tgproc2 | TYPE WCCE-TGPROC2, " | |||
lv_tgtyp2 | TYPE WCCE-TGTYP2, " | |||
lv_x_iwerk | TYPE WCCE. " SPACE |
  CALL FUNCTION 'ENQUEUE_EWCCE' "Request lock for object EWCCE |
EXPORTING | ||
MODE_WCCE | = lv_mode_wcce | |
X_TGGRP | = lv_x_tggrp | |
X_TGPROC1 | = lv_x_tgproc1 | |
X_TGTYP1 | = lv_x_tgtyp1 | |
X_TGPROC2 | = lv_x_tgproc2 | |
X_TGTYP2 | = lv_x_tgtyp2 | |
_SCOPE | = lv__scope | |
_WAIT | = lv__wait | |
_COLLECT | = lv__collect | |
MANDT | = lv_mandt | |
IWERK | = lv_iwerk | |
TGGRP | = lv_tggrp | |
TGPROC1 | = lv_tgproc1 | |
TGTYP1 | = lv_tgtyp1 | |
TGPROC2 | = lv_tgproc2 | |
TGTYP2 | = lv_tgtyp2 | |
X_IWERK | = lv_x_iwerk | |
EXCEPTIONS | ||
FOREIGN_LOCK = 1 | ||
SYSTEM_FAILURE = 2 | ||
. " ENQUEUE_EWCCE |
ABAP code using 7.40 inline data declarations to call FM ENQUEUE_EWCCE
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_wcce) | = 'E'. | |||
DATA(ld_x_tggrp) | = ' '. | |||
DATA(ld_x_tgproc1) | = ' '. | |||
DATA(ld_x_tgtyp1) | = ' '. | |||
DATA(ld_x_tgproc2) | = ' '. | |||
DATA(ld_x_tgtyp2) | = ' '. | |||
DATA(ld__scope) | = '2'. | |||
DATA(ld__wait) | = ' '. | |||
DATA(ld__collect) | = ' '. | |||
"SELECT single MANDT FROM WCCE INTO @DATA(ld_mandt). | ||||
DATA(ld_mandt) | = SY-MANDT. | |||
"SELECT single IWERK FROM WCCE INTO @DATA(ld_iwerk). | ||||
"SELECT single TGGRP FROM WCCE INTO @DATA(ld_tggrp). | ||||
"SELECT single TGPROC1 FROM WCCE INTO @DATA(ld_tgproc1). | ||||
"SELECT single TGTYP1 FROM WCCE INTO @DATA(ld_tgtyp1). | ||||
"SELECT single TGPROC2 FROM WCCE INTO @DATA(ld_tgproc2). | ||||
"SELECT single TGTYP2 FROM WCCE INTO @DATA(ld_tgtyp2). | ||||
DATA(ld_x_iwerk) | = ' '. | |||
Search for further information about these or an SAP related objects