SAP BAPI_PERSDATA_CHANGE Function Module for Change personal data
BAPI_PERSDATA_CHANGE is a standard bapi persdata change SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Change personal data processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for bapi persdata change FM, simply by entering the name BAPI_PERSDATA_CHANGE into the relevant SAP transaction such as SE37 or SE38.
Function Group: PERS
Program Name: SAPLPERS
Main Program: SAPLPERS
Appliation area: P
Release date: 16-Sep-1997
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_PERSDATA_CHANGE pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'BAPI_PERSDATA_CHANGE'"Change personal data.
EXPORTING
EMPLOYEENUMBER = "Personnel number
* LASTNAME = "Last name
* NAMEATBIRTH = "Name at Birth
* SECONDNAME = "Second name
* MIDDLENAME = "Middle name
* FULLNAME = "Full employee name
* KNOWNAS = "Known As
* ACADEMICGRADE = "Title
* SECONDACADGRADE = "Second title
* ARISTROCRATICTITLE = "Other title
* SURNAMEPREFIX = "Name Prefix
SUBTYPE = "Subtype
* SECONDNAMEPREFIX = "Second name prefix
* INITIALS = "Employee's Initials
* GENDER = "Gender key
* DATEOFBIRTH = "Date of birth
* UPDATE_ONLY_GBDAT = "Flag: Only Update on GBDAT
* BIRTHPLACE = "Birthplace
* STATEOFBIRTH = "State
* COUNTRYOFBIRTH = "Country of Birth
* MARITALSTATUS = "Marital status key
* MARITALSTATUSSINCE = "Valid from date of current marital status
OBJECTID = "Object ID
* NUMBEROFCHILDREN = "Number of children
* RELIGION = "Religious denomination key
* LANGUAGE = "Language key
* LANGUAGE_ISO = "Language according to ISO 639
* NATIONALITY = "Nationality
* SECONDNATIONALITY = "Second nationality
* THIRDNATIONALITY = "Third nationality
* IDNUMBER = "Personnel ID number
* NOCOMMIT = "COMMIT control at BAPI interface
* NAME_FORMAT_INDICATOR = "
LOCKINDICATOR = "Lock indicator for HR master record
* SECONDARISTROTITLE = "Other Title for Birth Name
VALIDITYBEGIN = "Valid from date
VALIDITYEND = "Valid To Date
RECORDNUMBER = "Number of Infotype Record
* FORMOFADDRESS = "Form-of-address key
* FIRSTNAME = "First name
IMPORTING
RETURN = "Structure for return code
IMPORTING Parameters details for BAPI_PERSDATA_CHANGE
EMPLOYEENUMBER - Personnel number
Data type: BAPIP0002-PERNROptional: No
Call by Reference: No ( called with pass by value option)
LASTNAME - Last name
Data type: BAPIP0002-NACHNOptional: Yes
Call by Reference: No ( called with pass by value option)
NAMEATBIRTH - Name at Birth
Data type: BAPIP0002-NAME2Optional: Yes
Call by Reference: No ( called with pass by value option)
SECONDNAME - Second name
Data type: BAPIP0002-NACH2Optional: Yes
Call by Reference: No ( called with pass by value option)
MIDDLENAME - Middle name
Data type: BAPIP0002-MIDNMOptional: Yes
Call by Reference: No ( called with pass by value option)
FULLNAME - Full employee name
Data type: BAPIP0002-CNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
KNOWNAS - Known As
Data type: BAPIP0002-RUFNMOptional: Yes
Call by Reference: No ( called with pass by value option)
ACADEMICGRADE - Title
Data type: BAPIP0002-TITELOptional: Yes
Call by Reference: No ( called with pass by value option)
SECONDACADGRADE - Second title
Data type: BAPIP0002-TITL2Optional: Yes
Call by Reference: No ( called with pass by value option)
ARISTROCRATICTITLE - Other title
Data type: BAPIP0002-NAMZUOptional: Yes
Call by Reference: No ( called with pass by value option)
SURNAMEPREFIX - Name Prefix
Data type: BAPIP0002-VORSWOptional: Yes
Call by Reference: No ( called with pass by value option)
SUBTYPE - Subtype
Data type: BAPIP0002-SUBTYOptional: No
Call by Reference: No ( called with pass by value option)
SECONDNAMEPREFIX - Second name prefix
Data type: BAPIP0002-VORS2Optional: Yes
Call by Reference: No ( called with pass by value option)
INITIALS - Employee's Initials
Data type: BAPIP0002-INITSOptional: Yes
Call by Reference: No ( called with pass by value option)
GENDER - Gender key
Data type: BAPIP0002-GESCHOptional: Yes
Call by Reference: No ( called with pass by value option)
DATEOFBIRTH - Date of birth
Data type: BAPIP0002-GBDATOptional: Yes
Call by Reference: No ( called with pass by value option)
UPDATE_ONLY_GBDAT - Flag: Only Update on GBDAT
Data type: BAPIP0002-ONLY_GBDATOptional: Yes
Call by Reference: No ( called with pass by value option)
BIRTHPLACE - Birthplace
Data type: BAPIP0002-GBORTOptional: Yes
Call by Reference: No ( called with pass by value option)
STATEOFBIRTH - State
Data type: BAPIP0002-GBDEPOptional: Yes
Call by Reference: No ( called with pass by value option)
COUNTRYOFBIRTH - Country of Birth
Data type: BAPIP0002-GBLNDOptional: Yes
Call by Reference: No ( called with pass by value option)
MARITALSTATUS - Marital status key
Data type: BAPIP0002-FAMSTOptional: Yes
Call by Reference: No ( called with pass by value option)
MARITALSTATUSSINCE - Valid from date of current marital status
Data type: BAPIP0002-FAMDTOptional: Yes
Call by Reference: No ( called with pass by value option)
OBJECTID - Object ID
Data type: BAPIP0002-OBJPSOptional: No
Call by Reference: No ( called with pass by value option)
NUMBEROFCHILDREN - Number of children
Data type: BAPIP0002-ANZKDOptional: Yes
Call by Reference: No ( called with pass by value option)
RELIGION - Religious denomination key
Data type: BAPIP0002-KONFEOptional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE - Language key
Data type: BAPIP0002-SPRSLOptional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE_ISO - Language according to ISO 639
Data type: BAPIP0002-SPRSL_ISOOptional: Yes
Call by Reference: No ( called with pass by value option)
NATIONALITY - Nationality
Data type: BAPIP0002-NATIOOptional: Yes
Call by Reference: No ( called with pass by value option)
SECONDNATIONALITY - Second nationality
Data type: BAPIP0002-NATI2Optional: Yes
Call by Reference: No ( called with pass by value option)
THIRDNATIONALITY - Third nationality
Data type: BAPIP0002-NATI3Optional: Yes
Call by Reference: No ( called with pass by value option)
IDNUMBER - Personnel ID number
Data type: BAPIP0002-PERIDOptional: Yes
Call by Reference: No ( called with pass by value option)
NOCOMMIT - COMMIT control at BAPI interface
Data type: BAPI_STAND-NO_COMMITOptional: Yes
Call by Reference: No ( called with pass by value option)
NAME_FORMAT_INDICATOR -
Data type: BAPIP0002-KNZNMOptional: Yes
Call by Reference: No ( called with pass by value option)
LOCKINDICATOR - Lock indicator for HR master record
Data type: BAPIP0002-SPRPSOptional: No
Call by Reference: No ( called with pass by value option)
SECONDARISTROTITLE - Other Title for Birth Name
Data type: BAPIP0002-NAMZ2Optional: Yes
Call by Reference: No ( called with pass by value option)
VALIDITYBEGIN - Valid from date
Data type: BAPIP0002-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
VALIDITYEND - Valid To Date
Data type: BAPIP0002-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
RECORDNUMBER - Number of Infotype Record
Data type: BAPIP0002-SEQNROptional: No
Call by Reference: No ( called with pass by value option)
FORMOFADDRESS - Form-of-address key
Data type: BAPIP0002-ANREDOptional: Yes
Call by Reference: No ( called with pass by value option)
FIRSTNAME - First name
Data type: BAPIP0002-VORNAOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_PERSDATA_CHANGE
RETURN - Structure for return code
Data type: BAPIRETURN1Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_PERSDATA_CHANGE Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_return | TYPE BAPIRETURN1, " | |||
| lv_employeenumber | TYPE BAPIP0002-PERNR, " | |||
| lv_lastname | TYPE BAPIP0002-NACHN, " | |||
| lv_nameatbirth | TYPE BAPIP0002-NAME2, " | |||
| lv_secondname | TYPE BAPIP0002-NACH2, " | |||
| lv_middlename | TYPE BAPIP0002-MIDNM, " | |||
| lv_fullname | TYPE BAPIP0002-CNAME, " | |||
| lv_knownas | TYPE BAPIP0002-RUFNM, " | |||
| lv_academicgrade | TYPE BAPIP0002-TITEL, " | |||
| lv_secondacadgrade | TYPE BAPIP0002-TITL2, " | |||
| lv_aristrocratictitle | TYPE BAPIP0002-NAMZU, " | |||
| lv_surnameprefix | TYPE BAPIP0002-VORSW, " | |||
| lv_subtype | TYPE BAPIP0002-SUBTY, " | |||
| lv_secondnameprefix | TYPE BAPIP0002-VORS2, " | |||
| lv_initials | TYPE BAPIP0002-INITS, " | |||
| lv_gender | TYPE BAPIP0002-GESCH, " | |||
| lv_dateofbirth | TYPE BAPIP0002-GBDAT, " | |||
| lv_update_only_gbdat | TYPE BAPIP0002-ONLY_GBDAT, " | |||
| lv_birthplace | TYPE BAPIP0002-GBORT, " | |||
| lv_stateofbirth | TYPE BAPIP0002-GBDEP, " | |||
| lv_countryofbirth | TYPE BAPIP0002-GBLND, " | |||
| lv_maritalstatus | TYPE BAPIP0002-FAMST, " | |||
| lv_maritalstatussince | TYPE BAPIP0002-FAMDT, " | |||
| lv_objectid | TYPE BAPIP0002-OBJPS, " | |||
| lv_numberofchildren | TYPE BAPIP0002-ANZKD, " | |||
| lv_religion | TYPE BAPIP0002-KONFE, " | |||
| lv_language | TYPE BAPIP0002-SPRSL, " | |||
| lv_language_iso | TYPE BAPIP0002-SPRSL_ISO, " | |||
| lv_nationality | TYPE BAPIP0002-NATIO, " | |||
| lv_secondnationality | TYPE BAPIP0002-NATI2, " | |||
| lv_thirdnationality | TYPE BAPIP0002-NATI3, " | |||
| lv_idnumber | TYPE BAPIP0002-PERID, " | |||
| lv_nocommit | TYPE BAPI_STAND-NO_COMMIT, " | |||
| lv_name_format_indicator | TYPE BAPIP0002-KNZNM, " | |||
| lv_lockindicator | TYPE BAPIP0002-SPRPS, " | |||
| lv_secondaristrotitle | TYPE BAPIP0002-NAMZ2, " | |||
| lv_validitybegin | TYPE BAPIP0002-BEGDA, " | |||
| lv_validityend | TYPE BAPIP0002-ENDDA, " | |||
| lv_recordnumber | TYPE BAPIP0002-SEQNR, " | |||
| lv_formofaddress | TYPE BAPIP0002-ANRED, " | |||
| lv_firstname | TYPE BAPIP0002-VORNA. " |
|   CALL FUNCTION 'BAPI_PERSDATA_CHANGE' "Change personal data |
| EXPORTING | ||
| EMPLOYEENUMBER | = lv_employeenumber | |
| LASTNAME | = lv_lastname | |
| NAMEATBIRTH | = lv_nameatbirth | |
| SECONDNAME | = lv_secondname | |
| MIDDLENAME | = lv_middlename | |
| FULLNAME | = lv_fullname | |
| KNOWNAS | = lv_knownas | |
| ACADEMICGRADE | = lv_academicgrade | |
| SECONDACADGRADE | = lv_secondacadgrade | |
| ARISTROCRATICTITLE | = lv_aristrocratictitle | |
| SURNAMEPREFIX | = lv_surnameprefix | |
| SUBTYPE | = lv_subtype | |
| SECONDNAMEPREFIX | = lv_secondnameprefix | |
| INITIALS | = lv_initials | |
| GENDER | = lv_gender | |
| DATEOFBIRTH | = lv_dateofbirth | |
| UPDATE_ONLY_GBDAT | = lv_update_only_gbdat | |
| BIRTHPLACE | = lv_birthplace | |
| STATEOFBIRTH | = lv_stateofbirth | |
| COUNTRYOFBIRTH | = lv_countryofbirth | |
| MARITALSTATUS | = lv_maritalstatus | |
| MARITALSTATUSSINCE | = lv_maritalstatussince | |
| OBJECTID | = lv_objectid | |
| NUMBEROFCHILDREN | = lv_numberofchildren | |
| RELIGION | = lv_religion | |
| LANGUAGE | = lv_language | |
| LANGUAGE_ISO | = lv_language_iso | |
| NATIONALITY | = lv_nationality | |
| SECONDNATIONALITY | = lv_secondnationality | |
| THIRDNATIONALITY | = lv_thirdnationality | |
| IDNUMBER | = lv_idnumber | |
| NOCOMMIT | = lv_nocommit | |
| NAME_FORMAT_INDICATOR | = lv_name_format_indicator | |
| LOCKINDICATOR | = lv_lockindicator | |
| SECONDARISTROTITLE | = lv_secondaristrotitle | |
| VALIDITYBEGIN | = lv_validitybegin | |
| VALIDITYEND | = lv_validityend | |
| RECORDNUMBER | = lv_recordnumber | |
| FORMOFADDRESS | = lv_formofaddress | |
| FIRSTNAME | = lv_firstname | |
| IMPORTING | ||
| RETURN | = lv_return | |
| . " BAPI_PERSDATA_CHANGE | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_PERSDATA_CHANGE
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single PERNR FROM BAPIP0002 INTO @DATA(ld_employeenumber). | ||||
| "SELECT single NACHN FROM BAPIP0002 INTO @DATA(ld_lastname). | ||||
| "SELECT single NAME2 FROM BAPIP0002 INTO @DATA(ld_nameatbirth). | ||||
| "SELECT single NACH2 FROM BAPIP0002 INTO @DATA(ld_secondname). | ||||
| "SELECT single MIDNM FROM BAPIP0002 INTO @DATA(ld_middlename). | ||||
| "SELECT single CNAME FROM BAPIP0002 INTO @DATA(ld_fullname). | ||||
| "SELECT single RUFNM FROM BAPIP0002 INTO @DATA(ld_knownas). | ||||
| "SELECT single TITEL FROM BAPIP0002 INTO @DATA(ld_academicgrade). | ||||
| "SELECT single TITL2 FROM BAPIP0002 INTO @DATA(ld_secondacadgrade). | ||||
| "SELECT single NAMZU FROM BAPIP0002 INTO @DATA(ld_aristrocratictitle). | ||||
| "SELECT single VORSW FROM BAPIP0002 INTO @DATA(ld_surnameprefix). | ||||
| "SELECT single SUBTY FROM BAPIP0002 INTO @DATA(ld_subtype). | ||||
| "SELECT single VORS2 FROM BAPIP0002 INTO @DATA(ld_secondnameprefix). | ||||
| "SELECT single INITS FROM BAPIP0002 INTO @DATA(ld_initials). | ||||
| "SELECT single GESCH FROM BAPIP0002 INTO @DATA(ld_gender). | ||||
| "SELECT single GBDAT FROM BAPIP0002 INTO @DATA(ld_dateofbirth). | ||||
| "SELECT single ONLY_GBDAT FROM BAPIP0002 INTO @DATA(ld_update_only_gbdat). | ||||
| "SELECT single GBORT FROM BAPIP0002 INTO @DATA(ld_birthplace). | ||||
| "SELECT single GBDEP FROM BAPIP0002 INTO @DATA(ld_stateofbirth). | ||||
| "SELECT single GBLND FROM BAPIP0002 INTO @DATA(ld_countryofbirth). | ||||
| "SELECT single FAMST FROM BAPIP0002 INTO @DATA(ld_maritalstatus). | ||||
| "SELECT single FAMDT FROM BAPIP0002 INTO @DATA(ld_maritalstatussince). | ||||
| "SELECT single OBJPS FROM BAPIP0002 INTO @DATA(ld_objectid). | ||||
| "SELECT single ANZKD FROM BAPIP0002 INTO @DATA(ld_numberofchildren). | ||||
| "SELECT single KONFE FROM BAPIP0002 INTO @DATA(ld_religion). | ||||
| "SELECT single SPRSL FROM BAPIP0002 INTO @DATA(ld_language). | ||||
| "SELECT single SPRSL_ISO FROM BAPIP0002 INTO @DATA(ld_language_iso). | ||||
| "SELECT single NATIO FROM BAPIP0002 INTO @DATA(ld_nationality). | ||||
| "SELECT single NATI2 FROM BAPIP0002 INTO @DATA(ld_secondnationality). | ||||
| "SELECT single NATI3 FROM BAPIP0002 INTO @DATA(ld_thirdnationality). | ||||
| "SELECT single PERID FROM BAPIP0002 INTO @DATA(ld_idnumber). | ||||
| "SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit). | ||||
| "SELECT single KNZNM FROM BAPIP0002 INTO @DATA(ld_name_format_indicator). | ||||
| "SELECT single SPRPS FROM BAPIP0002 INTO @DATA(ld_lockindicator). | ||||
| "SELECT single NAMZ2 FROM BAPIP0002 INTO @DATA(ld_secondaristrotitle). | ||||
| "SELECT single BEGDA FROM BAPIP0002 INTO @DATA(ld_validitybegin). | ||||
| "SELECT single ENDDA FROM BAPIP0002 INTO @DATA(ld_validityend). | ||||
| "SELECT single SEQNR FROM BAPIP0002 INTO @DATA(ld_recordnumber). | ||||
| "SELECT single ANRED FROM BAPIP0002 INTO @DATA(ld_formofaddress). | ||||
| "SELECT single VORNA FROM BAPIP0002 INTO @DATA(ld_firstname). | ||||
Search for further information about these or an SAP related objects