# HR_EMPLOYEE_ENQUEUE — Lock Employee (HR)

> Locks a personnel number for HR master data maintenance and, if the lock fails, returns the user who holds it in LOCKING_USER. It is used in custom maintenance programs that need to tell the user who is blocking the record. Release the lock with HR_EMPLOYEE_DEQUEUE.

- Modules: HCM
- Type: Function module
- Function group: 1065
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/hr-employee-enqueue/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| NUMBER | BAPIP0001-PERNR | Personnel number | Yes |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| RETURN | BAPIRETURN1 | Return message |
| LOCKING_USER | SY-UNAME | User holding the lock |

## Call template (ABAP)

```abap
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
  EXPORTING
    number = lv_number
  IMPORTING
    return = lv_return
    locking_user = lv_locking_user.
```


