# ENQUEUE_READ — Read Lock Entries from Lock Table

> Reads the lock entries in the lock server by client, lock object (table name), lock argument and user (the counterpart of SM12). Mass update programs use it to detect in advance that a document or master record is locked by another user and to report it. You can use '*' as a wildcard in GARG; the result is returned in the ENQ table and the entry count in NUMBER.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| GCLIENT | SEQG3-GCLIENT | Client | - |
| GNAME | SEQG3-GNAME | Locked table name | - |
| GARG | SEQG3-GARG | Lock argument | - |
| GUNAME | SEQG3-GUNAME | User name | - |
| LOCAL | SY-CTYPE | Local locks only | - |
| FAST | SY-CTYPE | Fast read | - |
| GARGNOWC | SY-CTYPE | No wildcards in argument | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| NUMBER | SY-TABIX | Number of lock entries |
| SUBRC | SY-SUBRC | Return code |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| ENQ | SEQG3 | Lock entries | Yes |

## Exceptions

- COMMUNICATION_FAILURE: Communication failure
- SYSTEM_FAILURE: System failure

## Call template (ABAP)

```abap
CALL FUNCTION 'ENQUEUE_READ'
  IMPORTING
    number = lv_number
    subrc = lv_subrc
  TABLES
    enq = lt_enq
  EXCEPTIONS
    communication_failure = 1
    system_failure = 2
    OTHERS = 3.
```


