SAP Function Modules

ENQUEUE_ET5HPBSJ SAP Function module - Request lock for object ET5HPBSJ







ENQUEUE_ET5HPBSJ is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name ENQUEUE_ET5HPBSJ into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: DWBEN/SAPLPEN0003
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM ENQUEUE_ET5HPBSJ - ENQUEUE ET5HPBSJ





CALL FUNCTION 'ENQUEUE_ET5HPBSJ' "Request lock for object ET5HPBSJ
* EXPORTING
*   mode_t5hpbsjf = 'E'         " enqmode       Lock mode for table T5HPBSJF
*   mode_t5hpbsjl = 'E'         " enqmode       Lock mode for table T5HPBSJL
*   mode_t5hpbsjm = 'E'         " enqmode       Lock mode for table T5HPBSJM
*   mandt = SY-MANDT            " t5hpbsjf-mandt  01th enqueue argument
*   jelev =                     " t5hpbsjf-jelev  02th enqueue argument
*   jelho =                     " t5hpbsjf-jelho  03th enqueue argument
*   tazon =                     " t5hpbsjf-tazon  04th enqueue argument
*   lapti =                     " t5hpbsjl-lapti  05th enqueue argument
*   lapsz =                     " t5hpbsjl-lapsz  06th enqueue argument
*   mezon =                     " t5hpbsjm-mezon  07th enqueue argument
*   x_jelev = SPACE             "               Fill argument 02 with initial value?
*   x_jelho = SPACE             "               Fill argument 03 with initial value?
*   x_tazon = SPACE             "               Fill argument 04 with initial value?
*   x_lapti = SPACE             "               Fill argument 05 with initial value?
*   x_lapsz = SPACE             "               Fill argument 06 with initial value?
*   x_mezon = SPACE             "               Fill argument 07 with initial value?
*   _scope = '2'                "
*   _wait = SPACE               "
*   _collect = ' '              " ddenqcoll     Initially only collect lock
  EXCEPTIONS
    FOREIGN_LOCK = 1            "               Object already locked
    SYSTEM_FAILURE = 2          "               Internal error from enqueue server
    .  "  ENQUEUE_ET5HPBSJ

ABAP code example for Function Module ENQUEUE_ET5HPBSJ





The ABAP code below is a full code listing to execute function module ENQUEUE_ET5HPBSJ including all data declarations. The code uses 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 original method of declaring data variables up front. 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).


DATA(ld_mode_t5hpbsjf) = 'Check type of data required'.
DATA(ld_mode_t5hpbsjl) = 'Check type of data required'.
DATA(ld_mode_t5hpbsjm) = 'Check type of data required'.

SELECT single MANDT
FROM T5HPBSJF
INTO @DATA(ld_mandt).


SELECT single JELEV
FROM T5HPBSJF
INTO @DATA(ld_jelev).


SELECT single JELHO
FROM T5HPBSJF
INTO @DATA(ld_jelho).


SELECT single TAZON
FROM T5HPBSJF
INTO @DATA(ld_tazon).


SELECT single LAPTI
FROM T5HPBSJL
INTO @DATA(ld_lapti).


SELECT single LAPSZ
FROM T5HPBSJL
INTO @DATA(ld_lapsz).


SELECT single MEZON
FROM T5HPBSJM
INTO @DATA(ld_mezon).

DATA(ld_x_jelev) = 'some text here'.
DATA(ld_x_jelho) = 'some text here'.
DATA(ld_x_tazon) = 'some text here'.
DATA(ld_x_lapti) = 'some text here'.
DATA(ld_x_lapsz) = 'some text here'.
DATA(ld_x_mezon) = 'some text here'.
DATA(ld__scope) = 'some text here'.
DATA(ld__wait) = 'some text here'.
DATA(ld__collect) = 'Check type of data required'. . CALL FUNCTION 'ENQUEUE_ET5HPBSJ' * EXPORTING * mode_t5hpbsjf = ld_mode_t5hpbsjf * mode_t5hpbsjl = ld_mode_t5hpbsjl * mode_t5hpbsjm = ld_mode_t5hpbsjm * mandt = ld_mandt * jelev = ld_jelev * jelho = ld_jelho * tazon = ld_tazon * lapti = ld_lapti * lapsz = ld_lapsz * mezon = ld_mezon * x_jelev = ld_x_jelev * x_jelho = ld_x_jelho * x_tazon = ld_x_tazon * x_lapti = ld_x_lapti * x_lapsz = ld_x_lapsz * x_mezon = ld_x_mezon * _scope = ld__scope * _wait = ld__wait * _collect = ld__collect EXCEPTIONS FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2 . " ENQUEUE_ET5HPBSJ
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_mode_t5hpbsjf  TYPE ENQMODE ,
ld_mode_t5hpbsjl  TYPE ENQMODE ,
ld_mode_t5hpbsjm  TYPE ENQMODE ,
ld_mandt  TYPE T5HPBSJF-MANDT ,
ld_jelev  TYPE T5HPBSJF-JELEV ,
ld_jelho  TYPE T5HPBSJF-JELHO ,
ld_tazon  TYPE T5HPBSJF-TAZON ,
ld_lapti  TYPE T5HPBSJL-LAPTI ,
ld_lapsz  TYPE T5HPBSJL-LAPSZ ,
ld_mezon  TYPE T5HPBSJM-MEZON ,
ld_x_jelev  TYPE STRING ,
ld_x_jelho  TYPE STRING ,
ld_x_tazon  TYPE STRING ,
ld_x_lapti  TYPE STRING ,
ld_x_lapsz  TYPE STRING ,
ld_x_mezon  TYPE STRING ,
ld__scope  TYPE STRING ,
ld__wait  TYPE STRING ,
ld__collect  TYPE DDENQCOLL .

ld_mode_t5hpbsjf = 'Check type of data required'.
ld_mode_t5hpbsjl = 'Check type of data required'.
ld_mode_t5hpbsjm = 'Check type of data required'.

SELECT single MANDT
FROM T5HPBSJF
INTO ld_mandt.


SELECT single JELEV
FROM T5HPBSJF
INTO ld_jelev.


SELECT single JELHO
FROM T5HPBSJF
INTO ld_jelho.


SELECT single TAZON
FROM T5HPBSJF
INTO ld_tazon.


SELECT single LAPTI
FROM T5HPBSJL
INTO ld_lapti.


SELECT single LAPSZ
FROM T5HPBSJL
INTO ld_lapsz.


SELECT single MEZON
FROM T5HPBSJM
INTO ld_mezon.

ld_x_jelev = 'some text here'.
ld_x_jelho = 'some text here'.
ld_x_tazon = 'some text here'.
ld_x_lapti = 'some text here'.
ld_x_lapsz = 'some text here'.
ld_x_mezon = 'some text here'.
ld__scope = 'some text here'.
ld__wait = 'some text here'.
ld__collect = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name ENQUEUE_ET5HPBSJ or its description.