BAPI_PERSDATA_CHANGE — BAPI for Changing Employee Personal Data (Infotype 0002)
BAPI_PERSDATA_CHANGE updates infotype 0002 (Personal Data) on an employee master record, the same data maintained through PA30 or PA40. It is typically called from integration middleware, for example when Employee Central sends a changed name, birth date or marital status value to an on-premise HR or Payroll system, and it requires the caller to lock the employee first and commit explicitly afterward.
Covers what BAPI_PERSDATA_CHANGE actually does to infotype 0002, the parameters that carry the new values, and why commit and enqueue sequencing around it is the usual source of failure rather than the BAPI's own logic. Focuses on how the RETURN table gets misread in interface code and the resulting silent data drift between Employee Central and on-premise HR.
Published 16 Sept 2026· 1,054 words
What it does
BAPI_PERSDATA_CHANGE changes infotype 0002 (Personal Data) on an employee master record, the same infotype maintained through PA30 or PA40 when an HR administrator edits name components, birth date, marital status, nationality or similar fields. In a SuccessFactors Employee Central to on-premise Payroll or HR replication scenario, the BAPI is the target-side interface the integration layer calls after Employee Central sends a changed personal data event; it does not read from Employee Central itself, it only writes the resulting values into the SAP HR infotype record. It behaves like any other infotype-maintenance BAPI: it validates incoming values against infotype 0002 field checks and time constraints, then either creates a new delimited record or rejects the change and reports why through its return interface.
Important parameters
- NUMBER - personnel number (PERNR) of the employee whose infotype 0002 record is being changed.
- EFFECTIVE_DATE - the date from which the new personal data record becomes valid, which drives how the existing infotype 0002 record gets delimited.
- PERSDATA - structure carrying the new field values for infotype 0002, including name components, birth date, gender, nationality and marital status.
- PERSDATAX - structure of X-marked flags, one per field in PERSDATA, telling the BAPI which fields were actually supplied and should overwrite the existing record.
- RETURN - standard BAPIRET2 table returning success, warning and error messages generated by the field checks and the database update.
Commit behaviour
BAPI_PERSDATA_CHANGE follows the standard BAPI convention of separating business logic from database commit. It does not issue an implicit commit; the actual record update stays in the calling program's logical unit of work until BAPI_TRANSACTION_COMMIT is called explicitly. If the caller forgets, the change lives only as long as the RFC session or ABAP session that made the call. In a background job or an RFC-based interface, this often shows up as a run that reports RETURN as fully successful, yet PA20 shows no updated record afterward, because the session ended before commit and the update was implicitly rolled back. It is a frequent cause of tickets reading 'the interface says it worked but the field is still old', particularly in custom middleware wrappers built before Employee Central integration went through a more managed framework.
Return handling
RETURN is a BAPIRET2 table, not a single structure, and it can carry more than one line: field-level warnings alongside a final success message, or several error lines each pointing at a different rejected field. Reading only the first line, or checking sy-subrc after the call, both produce false positives, since the BAPI does not set sy-subrc meaningfully on business-logic failure. The correct pattern is to loop over RETURN and treat any line with TYPE E or A as a failed change regardless of what earlier lines said, then decide separately whether TYPE W lines are acceptable for the process. The recurring integration bug is a wrapper that checks RETURN is not initial and stops there; a table containing only an informational message line satisfies that check and the interface logs success even though no field was actually changed, because PERSDATAX was left empty or a value failed a downstream check that was absorbed into a warning. Downstream, this surfaces as HR data drifting out of sync with Employee Central while every integration log for the run shows green.
ECC vs S/4HANA
BAPI_PERSDATA_CHANGE is an older infotype-maintenance BAPI, not something introduced for S/4HANA or for SuccessFactors integration specifically, and SAP has not published a newer BAPI aimed at replacing it for on-premise infotype 0002 maintenance. In Employee Central to SAP Payroll or HR integration built through the point-to-point replication approach, it is still a normal building block on the receiving side because the target system is still classic infotype-based HR, whether that HR runs on ECC or on S/4HANA. Newer integration content built around Employee Central Payroll's own replication framework increasingly hides this BAPI behind standard middleware objects, so a project team may never call it directly even though it still executes underneath.
Common pitfalls
- Calling BAPI_PERSDATA_CHANGE without a prior BAPI_EMPLOYEE_ENQUEUE lock lets a PA30 user and the interface update the same personnel number at nearly the same moment; one of the two changes is silently lost.
- Leaving a PERSDATAX flag off a field that was actually supplied in PERSDATA means the BAPI ignores that field entirely and the old value stays on record, with no error raised because nothing was technically wrong.
- Passing an EFFECTIVE_DATE that falls inside an existing infotype 0002 record's validity period without accounting for how that record gets delimited, producing overlapping or unexpected date splits that only show up when someone opens PA20.
- Forgetting BAPI_TRANSACTION_COMMIT in a custom RFC-enabled wrapper, so a batch interface reports full success and the Employee Central side marks the record as replicated while the SAP HR side never persisted the change.
- Retrying a failed call without first checking whether the previous attempt partially committed, which can double up a change or leave the infotype history with an odd delimited record nobody intended to create.
Whose problem this is
This sits mostly with the interface developer: enqueue, BAPI call, commit and dequeue sequencing is a technical concern and most failures trace to that sequence rather than to the BAPI's own logic. Functional HR owns the infotype 0002 configuration, feature and time constraint setup, and should be the one confirming what the correct end state in PA20 looks like before the developer chases a phantom bug in the call itself.
Related SAP objects
Reviewed pages this object connects to in the ERPClimb knowledge graph.
Source: ERPClimb — https://erpclimb.com/sap-bapis/bapi-persdata-changeERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.