# RH_INSERT_INFTY — Insert Organizational Management Infotype Records

> Inserts records of an organizational management infotype from table INNNN, for example relationships (1001) or descriptions. It is used in upload programs that build org structures. VTASK controls the update mode: use D for direct update or B to buffer several calls and post them together.

- 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-insert-infty/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| FCODE | HRRHAP-FCODE | Function code | - |
| 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 | - |
| OLD_TABNR | HRRHAP-OLD_TABNR | Keep the old table pointer (TABNR) | - |
| REPID | SY-REPID | Report for table infotypes | - |
| FORM | - | FORM routine for table infotypes | - |
| 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

- NO_AUTHORIZATION: No authorization
- ERROR_DURING_INSERT: Error during insert
- REPID_FORM_INITIAL: Report/FORM name for table infotype is empty
- CORR_EXIT: Error assigning the correction number
- BEGDA_GREATER_ENDDA: Start date is after end date

## Call template (ABAP)

```abap
CALL FUNCTION 'RH_INSERT_INFTY'
  EXPORTING
    vtask = lv_vtask
  TABLES
    innnn = lt_innnn
    ilfcode = lt_ilfcode
  EXCEPTIONS
    no_authorization = 1
    error_during_insert = 2
    repid_form_initial = 3
    corr_exit = 4
    begda_greater_endda = 5
    OTHERS = 6.
```


