HCM BAPI RFC Used the same way in S/4HANA

BAPI_PERSDATA_CREATE Create Personal Data (Infotype 0002)

Creates a personal data record (infotype 0002) for an existing personnel number. It is used in data transfer or hiring interfaces after the personnel number exists. Lock the employee with BAPI_EMPLOYEE_ENQUEUE first, check RETURN, and unlock with BAPI_EMPLOYEE_DEQUEUE.

Function group
PERS
Remote-enabled (RFC)
Yes
Type
BAPI

Importing parameters

ParameterTypeDescriptionRequired
EMPLOYEENUMBERBAPIP0002-PERNRPersonnel numberYes
VALIDITYBEGINBAPIP0002-BEGDAValid fromYes
VALIDITYENDBAPIP0002-ENDDAValid toYes
FORMOFADDRESSBAPIP0002-ANREDForm of address—
FIRSTNAMEBAPIP0002-VORNAFirst name—
LASTNAMEBAPIP0002-NACHNLast name—
NAMEATBIRTHBAPIP0002-NAME2Name at birth—
KNOWNASBAPIP0002-RUFNMKnown as—
DATEOFBIRTHBAPIP0002-GBDATDate of birth—
BIRTHPLACEBAPIP0002-GBORTPlace of birth—
COUNTRYOFBIRTHBAPIP0002-GBLNDCountry of birth—
GENDERBAPIP0002-GESCHGender key—
NATIONALITYBAPIP0002-NATIONationality—
LANGUAGEBAPIP0002-SPRSLCommunication language—
MARITALSTATUSBAPIP0002-FAMSTMarital status key—
MARITALSTATUSSINCEBAPIP0002-FAMDTMarital status since—
NUMBEROFCHILDRENBAPIP0002-ANZKDNumber of children—
IDNUMBERBAPIP0002-PERIDPersonal ID number—
NOCOMMITBAPI_STAND-NO_COMMITNo commit (caller commits)—

Exporting parameters

ParameterTypeDescription
RETURNBAPIRETURN1Return message
EMPLOYEENUMBERBAPIP0002-PERNRPersonnel number
SUBTYPEBAPIP0002-SUBTYSubtype
OBJECTIDBAPIP0002-OBJPSObject identification
LOCKINDICATORBAPIP0002-SPRPSLock indicator
VALIDITYBEGINBAPIP0002-BEGDAValid from
VALIDITYENDBAPIP0002-ENDDAValid to
RECORDNUMBERBAPIP0002-SEQNRRecord number

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

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

Related tables

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report