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

BAPI_PERSDATA_GETDETAIL Read Personal Data (Infotype 0002)

Reads one personal data record (infotype 0002) by its full key and returns the individual fields with their texts. It is used when the exact record key is already known, for example from BAPI_PERSDATA_GETDETAILEDLIST. Check RETURN; the standard HR authorization check applies.

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

Importing parameters

ParameterTypeDescriptionRequired
EMPLOYEENUMBERBAPIP0002-PERNRPersonnel numberYes
SUBTYPEBAPIP0002-SUBTYSubtypeYes
OBJECTIDBAPIP0002-OBJPSObject identificationYes
LOCKINDICATORBAPIP0002-SPRPSLock indicatorYes
VALIDITYBEGINBAPIP0002-BEGDAValid fromYes
VALIDITYENDBAPIP0002-ENDDAValid toYes
RECORDNUMBERBAPIP0002-SEQNRRecord numberYes

Exporting parameters

ParameterTypeDescription
RETURNBAPIRETURN1Return message
FORMOFADDRESSBAPIP0002-ANREDForm of address
FIRSTNAMEBAPIP0002-VORNAFirst name
LASTNAMEBAPIP0002-NACHNLast name
MIDDLENAMEBAPIP0002-MIDNMMiddle name
SECONDNAMEBAPIP0002-NACH2Second last name
NAMEATBIRTHBAPIP0002-NAME2Name at birth
KNOWNASBAPIP0002-RUFNMKnown as
INITIALSBAPIP0002-INITSInitials
FULLNAMEBAPIP0002-CNAMEFull name
ACADEMICGRADEBAPIP0002-TITELAcademic title
DATEOFBIRTHBAPIP0002-GBDATDate of birth
BIRTHPLACEBAPIP0002-GBORTPlace of birth
STATEOFBIRTHBAPIP0002-GBDEPRegion of birth
COUNTRYOFBIRTHBAPIP0002-GBLNDCountry of birth
GENDERBAPIP0002-GESCHGender key
NATIONALITYBAPIP0002-NATIONationality
SECONDNATIONALITYBAPIP0002-NATI2Second nationality
LANGUAGEBAPIP0002-SPRSLCommunication language
LANGUAGE_ISOBAPIP0002-SPRSL_ISOCommunication language (ISO code)
MARITALSTATUSBAPIP0002-FAMSTMarital status key
MARITALSTATUSSINCEBAPIP0002-FAMDTMarital status since
NUMBEROFCHILDRENBAPIP0002-ANZKDNumber of children

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_GETDETAIL'
  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
    formofaddress = lv_formofaddress
    firstname = lv_firstname
    lastname = lv_lastname
    middlename = lv_middlename
    secondname = lv_secondname
    nameatbirth = lv_nameatbirth
    knownas = lv_knownas
    initials = lv_initials
    fullname = lv_fullname.

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