# PYXX_READ_PAYROLL_RESULT — Read Payroll Result

> Imports one payroll result of a personnel number from the payroll cluster, identified by its sequence number. Custom payroll reports use it together with CU_READ_RGDIR: first find the sequence numbers in the payroll directory, then read each result. PAYROLL_RESULT must be typed with the country-specific result structure (for example PAY99_RESULT or the local PAYxx_RESULT).

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| CLIENT | PCL2-CLIENT | Client (exceptional cases only) | - |
| EMPLOYEENUMBER | PC200-PERNR | Personnel number | Yes |
| SEQUENCENUMBER | PC261-SEQNR | Sequence number of the payroll result | Yes |
| READ_ONLY_BUFFER | - | Read from the buffer only | - |
| READ_ONLY_INTERNATIONAL | - | International part only | - |
| ARC_GROUP | ARC_GROUP | Archiving group | - |
| CHECK_READ_AUTHORITY | - | Check read authorization | - |
| FILTER_CUMULATIONS | - | Filter cumulation tables | - |
| CLUSTERID | PCL2-RELID | Payroll cluster ID | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| VERSION_NUMBER_PAYVN | - | Version number in the type group |
| VERSION_NUMBER_PCL2 | - | Version number on PCL2 |

## Changing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| PAYROLL_RESULT | - | Payroll result (country-specific structure) | Yes |

## Exceptions

- ILLEGAL_ISOCODE_OR_CLUSTERID: Cluster ID or ISO code not in T500L
- ERROR_GENERATING_IMPORT: Error generating the import routine
- IMPORT_MISMATCH_ERROR: Import error: structures differ
- SUBPOOL_DIR_FULL: Too many temporary routines generated
- NO_READ_AUTHORITY: No read authorization for the cluster
- NO_RECORD_FOUND: No payroll result found
- VERSIONS_DO_NOT_MATCH: Version indicators do not match
- ERROR_READING_ARCHIVE: Error reading the archive
- ERROR_READING_RELID: Error reading the cluster ID

## Call template (ABAP)

```abap
CALL FUNCTION 'PYXX_READ_PAYROLL_RESULT'
  EXPORTING
    employeenumber = lv_employeenumber
    sequencenumber = lv_sequencenumber
  IMPORTING
    version_number_payvn = lv_version_number_payvn
    version_number_pcl2 = lv_version_number_pcl2
  CHANGING
    payroll_result = lv_payroll_result
  EXCEPTIONS
    illegal_isocode_or_clusterid = 1
    error_generating_import = 2
    import_mismatch_error = 3
    subpool_dir_full = 4
    no_read_authority = 5
    no_record_found = 6
    versions_do_not_match = 7
    error_reading_archive = 8
    OTHERS = 9.
```

## Related tables

PCL2

