# HR_READ_INFOTYPE — Read HR Infotype Records

> Reads the records of one personnel administration infotype for a personnel number within a date range, with the standard authorization check. Custom programs use it instead of selecting PAnnnn tables directly when HR authorizations must apply. Pass an internal table typed like the infotype (for example P0001) to INFTY_TAB and check SUBRC.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| TCLAS | PSPAR-TCLAS | Transaction class (A = employee, B = applicant) | - |
| PERNR | PRELP-PERNR | Personnel number | Yes |
| INFTY | PRELP-INFTY | Infotype | Yes |
| BEGDA | PRELP-BEGDA | Start date | - |
| ENDDA | PRELP-ENDDA | End date | - |
| BYPASS_BUFFER | FLAG | Bypass the buffer | - |
| LEGACY_MODE | BOOLE_D | Legacy mode | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| SUBRC | SY-SUBRC | Return code |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| INFTY_TAB | - | Infotype table (records found) | Yes |

## Exceptions

- INFTY_NOT_FOUND: Infotype does not exist

## Call template (ABAP)

```abap
CALL FUNCTION 'HR_READ_INFOTYPE'
  EXPORTING
    pernr = lv_pernr
    infty = lv_infty
  IMPORTING
    subrc = lv_subrc
  TABLES
    infty_tab = lt_infty_tab
  EXCEPTIONS
    infty_not_found = 1
    OTHERS = 2.
```


