SAP ENQUEUE_SWD_HEADER Function Module for Request lock for object SWD_HEADER









ENQUEUE_SWD_HEADER is a standard enqueue swd header 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 SWD_HEADER 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 swd header FM, simply by entering the name ENQUEUE_SWD_HEADER into the relevant SAP transaction such as SE37 or SE38.

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



Function ENQUEUE_SWD_HEADER 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_SWD_HEADER'"Request lock for object SWD_HEADER
EXPORTING
* MODE_SWD_HEADER = 'E' "Lock mode for table SWD_HEADER
* X_WFD_ID = ' ' "Fill argument 02 with initial value?
* X_VERSION = ' ' "Fill argument 03 with initial value?
* X_EXETYP = ' ' "Fill argument 04 with initial value?
* _SCOPE = '2' "
* _WAIT = ' ' "
* _COLLECT = ' ' "Initially only collect lock
* MODE_SWD_EXPR = 'E' "Lock mode for table SWD_EXPR
* MODE_SWD_STEPS = 'E' "Lock mode for table SWD_STEPS
* MODE_SWD_MNODES = 'E' "Lock mode for table SWD_MNODES
* MODE_SWD_TEXT = 'E' "Lock mode for table SWD_TEXT
* CLIENT = SY-MANDT "01th enqueue argument
* WFD_ID = "02th enqueue argument
* VERSION = "03th enqueue argument
* EXETYP = "04th enqueue argument

EXCEPTIONS
FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2
.



IMPORTING Parameters details for ENQUEUE_SWD_HEADER

MODE_SWD_HEADER - Lock mode for table SWD_HEADER

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

X_WFD_ID - Fill argument 02 with initial value?

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

X_VERSION - Fill argument 03 with initial value?

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

X_EXETYP - Fill argument 04 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)

MODE_SWD_EXPR - Lock mode for table SWD_EXPR

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

MODE_SWD_STEPS - Lock mode for table SWD_STEPS

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

MODE_SWD_MNODES - Lock mode for table SWD_MNODES

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

MODE_SWD_TEXT - Lock mode for table SWD_TEXT

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

CLIENT - 01th enqueue argument

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

WFD_ID - 02th enqueue argument

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

VERSION - 03th enqueue argument

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

EXETYP - 04th enqueue argument

Data type: SWD_HEADER-EXETYP
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_SWD_HEADER 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_foreign_lock  TYPE STRING, "   
lv_mode_swd_header  TYPE ENQMODE, "   'E'
lv_x_wfd_id  TYPE ENQMODE, "   SPACE
lv_x_version  TYPE ENQMODE, "   SPACE
lv_x_exetyp  TYPE ENQMODE, "   SPACE
lv__scope  TYPE ENQMODE, "   '2'
lv__wait  TYPE ENQMODE, "   SPACE
lv__collect  TYPE DDENQCOLL, "   ' '
lv_mode_swd_expr  TYPE ENQMODE, "   'E'
lv_system_failure  TYPE ENQMODE, "   
lv_mode_swd_steps  TYPE ENQMODE, "   'E'
lv_mode_swd_mnodes  TYPE ENQMODE, "   'E'
lv_mode_swd_text  TYPE ENQMODE, "   'E'
lv_client  TYPE SWD_HEADER-CLIENT, "   SY-MANDT
lv_wfd_id  TYPE SWD_HEADER-WFD_ID, "   
lv_version  TYPE SWD_HEADER-VERSION, "   
lv_exetyp  TYPE SWD_HEADER-EXETYP. "   

  CALL FUNCTION 'ENQUEUE_SWD_HEADER'  "Request lock for object SWD_HEADER
    EXPORTING
         MODE_SWD_HEADER = lv_mode_swd_header
         X_WFD_ID = lv_x_wfd_id
         X_VERSION = lv_x_version
         X_EXETYP = lv_x_exetyp
         _SCOPE = lv__scope
         _WAIT = lv__wait
         _COLLECT = lv__collect
         MODE_SWD_EXPR = lv_mode_swd_expr
         MODE_SWD_STEPS = lv_mode_swd_steps
         MODE_SWD_MNODES = lv_mode_swd_mnodes
         MODE_SWD_TEXT = lv_mode_swd_text
         CLIENT = lv_client
         WFD_ID = lv_wfd_id
         VERSION = lv_version
         EXETYP = lv_exetyp
    EXCEPTIONS
        FOREIGN_LOCK = 1
        SYSTEM_FAILURE = 2
. " ENQUEUE_SWD_HEADER




ABAP code using 7.40 inline data declarations to call FM ENQUEUE_SWD_HEADER

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_swd_header) = 'E'.
 
DATA(ld_x_wfd_id) = ' '.
 
DATA(ld_x_version) = ' '.
 
DATA(ld_x_exetyp) = ' '.
 
DATA(ld__scope) = '2'.
 
DATA(ld__wait) = ' '.
 
DATA(ld__collect) = ' '.
 
DATA(ld_mode_swd_expr) = 'E'.
 
 
DATA(ld_mode_swd_steps) = 'E'.
 
DATA(ld_mode_swd_mnodes) = 'E'.
 
DATA(ld_mode_swd_text) = 'E'.
 
"SELECT single CLIENT FROM SWD_HEADER INTO @DATA(ld_client).
DATA(ld_client) = SY-MANDT.
 
"SELECT single WFD_ID FROM SWD_HEADER INTO @DATA(ld_wfd_id).
 
"SELECT single VERSION FROM SWD_HEADER INTO @DATA(ld_version).
 
"SELECT single EXETYP FROM SWD_HEADER INTO @DATA(ld_exetyp).
 


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!