# CU_READ_RGDIR — Read Payroll Directory (Cluster CU)

> Reads the payroll directory (RGDIR) of a personnel number from cluster CU and returns the country grouping. Each line describes one payroll run with period, payment date and sequence number. Filter the lines you need (for example the current results) and pass their sequence numbers to PYXX_READ_PAYROLL_RESULT.

- Modules: HCM
- Type: Function module
- Function group: RPRU
- Remote-enabled (RFC): No
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/cu-read-rgdir/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| PERSNR | P0000-PERNR | Personnel number | Yes |
| BUFFER | HRPAY_BUFFER | Payroll buffer | - |
| NO_AUTHORITY_CHECK | XFELD | Skip the authorization check | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| MOLGA | T500L-MOLGA | Country grouping |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| IN_RGDIR | PC261 | Payroll directory (RGDIR) | Yes |

## Exceptions

- NO_RECORD_FOUND: No payroll result found

## Call template (ABAP)

```abap
CALL FUNCTION 'CU_READ_RGDIR'
  EXPORTING
    persnr = lv_persnr
  IMPORTING
    molga = lv_molga
  TABLES
    in_rgdir = lt_in_rgdir
  EXCEPTIONS
    no_record_found = 1
    OTHERS = 2.
```

## Related tables

PCL2

