# RH_DELETE_INFTY — Delete Organizational Management Infotype Records

> Deletes organizational management infotype records passed in INNNN. It is used to remove wrong relationships or test data loaded by upload programs. Prefer delimiting (RH_CUT_INFTY) for productive history; the first record of an object (DELETE_FIRST_RECORD) cannot be deleted this way.

- Modules: HCM
- Type: Function module
- Function group: RHAP
- Remote-enabled (RFC): No
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/rh-delete-infty/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| LOAD | HRRHAP-LOAD | Load all infotypes into the buffer | - |
| VTASK | HRRHAP-VTASK | Update mode (B, D, V, S) | Yes |
| ORDER_FLG | HRRHAP-ORDER_FLG | Respect the record sequence | - |
| COMMIT_FLG | HRRHAP-COMMIT_FLG | Commit work flag | - |
| AUTHY | HRRHAP-AUTHY | Authorization check switch | - |
| PPPAR_IMP | PPPAR | Import structure PPPAR | - |
| KEEP_LUPD | HRRHAP-KEEP_LUPD | Keep last changed by/on | - |
| WORKF_ACTV | HRRHAP-WORKF_ACTV | Trigger workflow events | - |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| INNNN | - | Infotype records (HRInnnn) | Yes |
| ILFCODE | ILFCOD | Logical function codes | - |

## Exceptions

- ERROR_DURING_DELETE: Error when deleting
- NO_AUTHORIZATION: No authorization
- DELETE_FIRST_RECORD: First record must not be deleted
- CORR_EXIT: Error assigning the correction number

## Call template (ABAP)

```abap
CALL FUNCTION 'RH_DELETE_INFTY'
  EXPORTING
    vtask = lv_vtask
  TABLES
    innnn = lt_innnn
    ilfcode = lt_ilfcode
  EXCEPTIONS
    error_during_delete = 1
    no_authorization = 2
    delete_first_record = 3
    corr_exit = 4
    OTHERS = 5.
```


