# HR_INFOTYPE_OPERATION — Maintain HR Infotype Record

> Generic function to create, change, copy, delimit or delete a record of any personnel administration infotype. Custom upload programs pass the infotype record in RECORD and the operation code (INS, MOD, COP, LIS9, DEL) in OPERATION. Lock the personnel number with BAPI_EMPLOYEE_ENQUEUE before the call, unlock it afterwards, and check RETURN.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| INFTY | PRELP-INFTY | Infotype | Yes |
| NUMBER | P0001-PERNR | Personnel number | Yes |
| SUBTYPE | P0001-SUBTY | Subtype | - |
| OBJECTID | P0001-OBJPS | Object identification | - |
| LOCKINDICATOR | P0001-SPRPS | Lock indicator | - |
| VALIDITYEND | P0001-ENDDA | Valid to | - |
| VALIDITYBEGIN | P0001-BEGDA | Valid from | - |
| RECORDNUMBER | P0001-SEQNR | Record number | - |
| RECORD | - | Infotype record (Pnnnn structure) | Yes |
| OPERATION | PSPAR-ACTIO | Operation (INS, MOD, DEL, LIS9, COP ...) | Yes |
| TCLAS | PSPAR-TCLAS | Transaction class (A = employee, B = applicant) | - |
| DIALOG_MODE | C | Dialog mode (0 = background) | - |
| NOCOMMIT | BAPI_STAND-NO_COMMIT | No commit (caller commits) | - |
| VIEW_IDENTIFIER | P0003-VIEKN | View identifier | - |
| SECONDARY_RECORD | - | Secondary infotype record | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| RETURN | BAPIRETURN1 | Return message |
| KEY | BAPIPAKEY | Key of the processed record |

## Call template (ABAP)

```abap
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
  EXPORTING
    infty = lv_infty
    number = lv_number
    record = lv_record
    operation = lv_operation
  IMPORTING
    return = lv_return
    key = lv_key.
```


