# BAPI_PERSDATA_CHANGE — Change Personal Data (Infotype 0002)

> Changes an existing personal data record (infotype 0002) identified by its full key. The key fields (subtype, object ID, lock indicator, validity dates, record number) must match the existing record; read them with BAPI_PERSDATA_GETDETAILEDLIST first. Lock the employee with BAPI_EMPLOYEE_ENQUEUE before the call.

- Modules: HCM
- Type: BAPI
- Function group: PERS
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-persdata-change/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| EMPLOYEENUMBER | BAPIP0002-PERNR | Personnel number | Yes |
| SUBTYPE | BAPIP0002-SUBTY | Subtype | Yes |
| OBJECTID | BAPIP0002-OBJPS | Object identification | Yes |
| LOCKINDICATOR | BAPIP0002-SPRPS | Lock indicator | Yes |
| VALIDITYBEGIN | BAPIP0002-BEGDA | Valid from | Yes |
| VALIDITYEND | BAPIP0002-ENDDA | Valid to | Yes |
| RECORDNUMBER | BAPIP0002-SEQNR | Record number | Yes |
| FORMOFADDRESS | BAPIP0002-ANRED | Form of address | - |
| FIRSTNAME | BAPIP0002-VORNA | First name | - |
| LASTNAME | BAPIP0002-NACHN | Last name | - |
| NAMEATBIRTH | BAPIP0002-NAME2 | Name at birth | - |
| KNOWNAS | BAPIP0002-RUFNM | Known as | - |
| DATEOFBIRTH | BAPIP0002-GBDAT | Date of birth | - |
| BIRTHPLACE | BAPIP0002-GBORT | Place of birth | - |
| GENDER | BAPIP0002-GESCH | Gender key | - |
| NATIONALITY | BAPIP0002-NATIO | Nationality | - |
| LANGUAGE | BAPIP0002-SPRSL | Communication language | - |
| MARITALSTATUS | BAPIP0002-FAMST | Marital status key | - |
| MARITALSTATUSSINCE | BAPIP0002-FAMDT | Marital status since | - |
| NUMBEROFCHILDREN | BAPIP0002-ANZKD | Number of children | - |
| IDNUMBER | BAPIP0002-PERID | Personal ID number | - |
| NOCOMMIT | BAPI_STAND-NO_COMMIT | No commit (caller commits) | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| RETURN | BAPIRETURN1 | Return message |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_PERSDATA_CHANGE'
  EXPORTING
    employeenumber = lv_employeenumber
    subtype = lv_subtype
    objectid = lv_objectid
    lockindicator = lv_lockindicator
    validitybegin = lv_validitybegin
    validityend = lv_validityend
    recordnumber = lv_recordnumber
  IMPORTING
    return = lv_return.
```

## Related tables

PA0002

