SAP HR_ENQUEUE_OBJECT_LIST Function Module for Lock HR objects (List)









HR_ENQUEUE_OBJECT_LIST is a standard hr enqueue object list SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Lock HR objects (List) 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 hr enqueue object list FM, simply by entering the name HR_ENQUEUE_OBJECT_LIST into the relevant SAP transaction such as SE37 or SE38.

Function Group: HRBAS00ENQDEQ
Program Name: SAPLHRBAS00ENQDEQ
Main Program: SAPLHRBAS00ENQDEQ
Appliation area: H
Release date: 17-Sep-1998
Mode(Normal, Remote etc): Normal Function Module
Update:



Function HR_ENQUEUE_OBJECT_LIST 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 'HR_ENQUEUE_OBJECT_LIST'"Lock HR objects (List)
EXPORTING
* ENQUEUE_ONCE = ' ' "Do Not Lock Objects More Than Once
* ENQ_SCOPE = '2' "Control Lock Behavior When Calling the Update Task
* ENQ_WAIT = ' ' "Flag Indicating Whether Lock Attempt Is to Be Repeated
* ENQ_COLLECT = ' ' "Only collect locks initially?

IMPORTING
LOCK_USER = "User Locking the Object
ERROR_TABIX = "Index of Table Entries with Errors

TABLES
ENQUEUE_LIST = "List of Objects to Lock

EXCEPTIONS
ENQUEUE_FAILED = 1 OBJID_IS_INITIAL = 2 ILLEGAL_OTYPE = 3 INTERNAL_ERROR = 4
.



IMPORTING Parameters details for HR_ENQUEUE_OBJECT_LIST

ENQUEUE_ONCE - Do Not Lock Objects More Than Once

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

ENQ_SCOPE - Control Lock Behavior When Calling the Update Task

Data type: DDENQSCOPE
Default: '2'
Optional: Yes
Call by Reference: Yes

ENQ_WAIT - Flag Indicating Whether Lock Attempt Is to Be Repeated

Data type: DDENQWAIT
Default: SPACE
Optional: Yes
Call by Reference: Yes

ENQ_COLLECT - Only collect locks initially?

Data type: DDENQCOLL
Default: ' '
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for HR_ENQUEUE_OBJECT_LIST

LOCK_USER - User Locking the Object

Data type: SY-UNAME
Optional: No
Call by Reference: Yes

ERROR_TABIX - Index of Table Entries with Errors

Data type: SY-TABIX
Optional: No
Call by Reference: Yes

TABLES Parameters details for HR_ENQUEUE_OBJECT_LIST

ENQUEUE_LIST - List of Objects to Lock

Data type: PPENQ
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

ENQUEUE_FAILED - Object Already Locked

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

OBJID_IS_INITIAL - Object ID Empty

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

ILLEGAL_OTYPE - Object Type not Permitted

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

INTERNAL_ERROR - System Error

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

Copy and paste ABAP code example for HR_ENQUEUE_OBJECT_LIST 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_lock_user  TYPE SY-UNAME, "   
lt_enqueue_list  TYPE STANDARD TABLE OF PPENQ, "   
lv_enqueue_once  TYPE C, "   SPACE
lv_enqueue_failed  TYPE C, "   
lv_enq_scope  TYPE DDENQSCOPE, "   '2'
lv_error_tabix  TYPE SY-TABIX, "   
lv_objid_is_initial  TYPE SY, "   
lv_enq_wait  TYPE DDENQWAIT, "   SPACE
lv_illegal_otype  TYPE DDENQWAIT, "   
lv_enq_collect  TYPE DDENQCOLL, "   ' '
lv_internal_error  TYPE DDENQCOLL. "   

  CALL FUNCTION 'HR_ENQUEUE_OBJECT_LIST'  "Lock HR objects (List)
    EXPORTING
         ENQUEUE_ONCE = lv_enqueue_once
         ENQ_SCOPE = lv_enq_scope
         ENQ_WAIT = lv_enq_wait
         ENQ_COLLECT = lv_enq_collect
    IMPORTING
         LOCK_USER = lv_lock_user
         ERROR_TABIX = lv_error_tabix
    TABLES
         ENQUEUE_LIST = lt_enqueue_list
    EXCEPTIONS
        ENQUEUE_FAILED = 1
        OBJID_IS_INITIAL = 2
        ILLEGAL_OTYPE = 3
        INTERNAL_ERROR = 4
. " HR_ENQUEUE_OBJECT_LIST




ABAP code using 7.40 inline data declarations to call FM HR_ENQUEUE_OBJECT_LIST

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 UNAME FROM SY INTO @DATA(ld_lock_user).
 
 
DATA(ld_enqueue_once) = ' '.
 
 
DATA(ld_enq_scope) = '2'.
 
"SELECT single TABIX FROM SY INTO @DATA(ld_error_tabix).
 
 
DATA(ld_enq_wait) = ' '.
 
 
DATA(ld_enq_collect) = ' '.
 
 


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!