SAP ENQUEUE_E_FOTDECLS Function Module for Request lock for object E_FOTDECLS









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

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



Function ENQUEUE_E_FOTDECLS 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_FOTDECLS'"Request lock for object E_FOTDECLS
EXPORTING
* MODE_FOTDECLSTA = 'E' "Lock mode for table FOTDECLSTA
* X_DECL_TYPE = ' ' "Fill argument 02 with initial value?
* X_TBUKRS = ' ' "Fill argument 03 with initial value?
* X_DECL_CTRY = ' ' "Fill argument 04 with initial value?
* X_DECL_YEAR = ' ' "Fill argument 05 with initial value?
* X_DECL_PER = ' ' "Fill argument 06 with initial value?
* X_DECL_RUNID = ' ' "Fill argument 07 with initial value?
* X_DECL_VERS = ' ' "Fill argument 08 with initial value?
* _SCOPE = '2' "
* _WAIT = ' ' "
* _COLLECT = ' ' "Initially only collect lock
* MANDT = SY-MANDT "01th enqueue argument
* DECL_TYPE = "02th enqueue argument
* TBUKRS = "03th enqueue argument
* DECL_CTRY = "04th enqueue argument
* DECL_YEAR = "05th enqueue argument
* DECL_PER = "06th enqueue argument
* DECL_RUNID = "07th enqueue argument
* DECL_VERS = "08th enqueue argument

EXCEPTIONS
FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2
.



IMPORTING Parameters details for ENQUEUE_E_FOTDECLS

MODE_FOTDECLSTA - Lock mode for table FOTDECLSTA

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

X_DECL_TYPE - Fill argument 02 with initial value?

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

X_TBUKRS - Fill argument 03 with initial value?

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

X_DECL_CTRY - Fill argument 04 with initial value?

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

X_DECL_YEAR - Fill argument 05 with initial value?

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

X_DECL_PER - Fill argument 06 with initial value?

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

X_DECL_RUNID - Fill argument 07 with initial value?

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

X_DECL_VERS - 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)

_COLLECT - Initially only collect lock

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

MANDT - 01th enqueue argument

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

DECL_TYPE - 02th enqueue argument

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

TBUKRS - 03th enqueue argument

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

DECL_CTRY - 04th enqueue argument

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

DECL_YEAR - 05th enqueue argument

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

DECL_PER - 06th enqueue argument

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

DECL_RUNID - 07th enqueue argument

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

DECL_VERS - 08th enqueue argument

Data type: FOTDECLSTA-DECL_VERS
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_FOTDECLS 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_fotdeclsta  TYPE ENQMODE, "   'E'
lv_x_decl_type  TYPE ENQMODE, "   SPACE
lv_x_tbukrs  TYPE ENQMODE, "   SPACE
lv_x_decl_ctry  TYPE ENQMODE, "   SPACE
lv_x_decl_year  TYPE ENQMODE, "   SPACE
lv_x_decl_per  TYPE ENQMODE, "   SPACE
lv_x_decl_runid  TYPE ENQMODE, "   SPACE
lv_x_decl_vers  TYPE ENQMODE, "   SPACE
lv__scope  TYPE ENQMODE, "   '2'
lv__wait  TYPE ENQMODE, "   SPACE
lv__collect  TYPE DDENQCOLL, "   ' '
lv_mandt  TYPE FOTDECLSTA-MANDT, "   SY-MANDT
lv_system_failure  TYPE FOTDECLSTA, "   
lv_decl_type  TYPE FOTDECLSTA-DECL_TYPE, "   
lv_tbukrs  TYPE FOTDECLSTA-TBUKRS, "   
lv_decl_ctry  TYPE FOTDECLSTA-DECL_CTRY, "   
lv_decl_year  TYPE FOTDECLSTA-DECL_YEAR, "   
lv_decl_per  TYPE FOTDECLSTA-DECL_PER, "   
lv_decl_runid  TYPE FOTDECLSTA-DECL_RUNID, "   
lv_decl_vers  TYPE FOTDECLSTA-DECL_VERS. "   

  CALL FUNCTION 'ENQUEUE_E_FOTDECLS'  "Request lock for object E_FOTDECLS
    EXPORTING
         MODE_FOTDECLSTA = lv_mode_fotdeclsta
         X_DECL_TYPE = lv_x_decl_type
         X_TBUKRS = lv_x_tbukrs
         X_DECL_CTRY = lv_x_decl_ctry
         X_DECL_YEAR = lv_x_decl_year
         X_DECL_PER = lv_x_decl_per
         X_DECL_RUNID = lv_x_decl_runid
         X_DECL_VERS = lv_x_decl_vers
         _SCOPE = lv__scope
         _WAIT = lv__wait
         _COLLECT = lv__collect
         MANDT = lv_mandt
         DECL_TYPE = lv_decl_type
         TBUKRS = lv_tbukrs
         DECL_CTRY = lv_decl_ctry
         DECL_YEAR = lv_decl_year
         DECL_PER = lv_decl_per
         DECL_RUNID = lv_decl_runid
         DECL_VERS = lv_decl_vers
    EXCEPTIONS
        FOREIGN_LOCK = 1
        SYSTEM_FAILURE = 2
. " ENQUEUE_E_FOTDECLS




ABAP code using 7.40 inline data declarations to call FM ENQUEUE_E_FOTDECLS

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_fotdeclsta) = 'E'.
 
DATA(ld_x_decl_type) = ' '.
 
DATA(ld_x_tbukrs) = ' '.
 
DATA(ld_x_decl_ctry) = ' '.
 
DATA(ld_x_decl_year) = ' '.
 
DATA(ld_x_decl_per) = ' '.
 
DATA(ld_x_decl_runid) = ' '.
 
DATA(ld_x_decl_vers) = ' '.
 
DATA(ld__scope) = '2'.
 
DATA(ld__wait) = ' '.
 
DATA(ld__collect) = ' '.
 
"SELECT single MANDT FROM FOTDECLSTA INTO @DATA(ld_mandt).
DATA(ld_mandt) = SY-MANDT.
 
 
"SELECT single DECL_TYPE FROM FOTDECLSTA INTO @DATA(ld_decl_type).
 
"SELECT single TBUKRS FROM FOTDECLSTA INTO @DATA(ld_tbukrs).
 
"SELECT single DECL_CTRY FROM FOTDECLSTA INTO @DATA(ld_decl_ctry).
 
"SELECT single DECL_YEAR FROM FOTDECLSTA INTO @DATA(ld_decl_year).
 
"SELECT single DECL_PER FROM FOTDECLSTA INTO @DATA(ld_decl_per).
 
"SELECT single DECL_RUNID FROM FOTDECLSTA INTO @DATA(ld_decl_runid).
 
"SELECT single DECL_VERS FROM FOTDECLSTA INTO @DATA(ld_decl_vers).
 


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!