SAP BAPI_PERSDATAHK_SIMULACREATION Function Module for Simulation: Create personal data









BAPI_PERSDATAHK_SIMULACREATION is a standard bapi persdatahk simulacreation SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Simulation: Create 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 persdatahk simulacreation FM, simply by entering the name BAPI_PERSDATAHK_SIMULACREATION into the relevant SAP transaction such as SE37 or SE38.

Function Group: PERS_HK
Program Name: SAPLPERS_HK
Main Program:
Appliation area: P
Release date: 05-Apr-2000
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_PERSDATAHK_SIMULACREATION 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_PERSDATAHK_SIMULACREATION'"Simulation: Create personal data
EXPORTING
EMPLOYEENUMBER = "Personnel number
* SURNAMEPREFIX = "Name affix
* INITIALS = "Employee's initials
* GENDER = "Gender key
* DATEOFBIRTH = "Date of birth
* BIRTHPLACE = "Birthplace
* STATEOFBIRTH = "State
* COUNTRYOFBIRTH = "Country of birth
* MARITALSTATUS = "Marital status key
* MARITALSTATUSSINCE = "Valid from date of current marital status
* NUMBEROFCHILDREN = "Number of children
VALIDITYBEGIN = "Valid from date
* LANGUAGE = "Language key
* LANGUAGE_ISO = "Language according to ISO 639
* NATIONALITY = "Nationality
* SECONDNATIONALITY = "Second nationality
* THIRDNATIONALITY = "Third nationality
* NOCOMMIT = "COMMIT control at BAPI interface
* NAME_FORMAT_INDICATOR = "Name format indicator for employee in a list
* MARRIAGENUMBER = "Marriage certificate number
VALIDITYEND = "Valid to date
* FORMOFADDRESS = "Form-of-address key
* FIRSTNAME = "First name
* LASTNAME = "Last name
* NAMEATBIRTH = "Name at birth
* KNOWNAS = "Known as
* SECONDACADGRADE = "Second title

IMPORTING
RETURN = "Structure for return code
EMPLOYEENUMBER = "Personnel number
SUBTYPE = "Subtype
OBJECTID = "Object ID
LOCKINDICATOR = "Lock indicator for HR master record
VALIDITYBEGIN = "Valid from date
VALIDITYEND = "Valid to date
RECORDNUMBER = "Number of infotype record
.



IMPORTING Parameters details for BAPI_PERSDATAHK_SIMULACREATION

EMPLOYEENUMBER - Personnel number

Data type: BAPIP0002HK-EMPLOYEENO
Optional: No
Call by Reference: No ( called with pass by value option)

SURNAMEPREFIX - Name affix

Data type: BAPIP0002HK-SURNAMEPREFIX
Optional: Yes
Call by Reference: No ( called with pass by value option)

INITIALS - Employee's initials

Data type: BAPIP0002HK-INITIALS
Optional: Yes
Call by Reference: No ( called with pass by value option)

GENDER - Gender key

Data type: BAPIP0002HK-GENDER
Optional: Yes
Call by Reference: No ( called with pass by value option)

DATEOFBIRTH - Date of birth

Data type: BAPIP0002HK-DATEOFBIRTH
Optional: Yes
Call by Reference: No ( called with pass by value option)

BIRTHPLACE - Birthplace

Data type: BAPIP0002HK-BIRTHPLACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

STATEOFBIRTH - State

Data type: BAPIP0002HK-STATEOFBIRTH
Optional: Yes
Call by Reference: No ( called with pass by value option)

COUNTRYOFBIRTH - Country of birth

Data type: BAPIP0002HK-COUNTRYOFBIRTH
Optional: Yes
Call by Reference: No ( called with pass by value option)

MARITALSTATUS - Marital status key

Data type: BAPIP0002HK-MARITALSTATUS
Optional: Yes
Call by Reference: No ( called with pass by value option)

MARITALSTATUSSINCE - Valid from date of current marital status

Data type: BAPIP0002HK-MARITALSINCE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NUMBEROFCHILDREN - Number of children

Data type: BAPIP0002HK-NUMBEROFCHILD
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALIDITYBEGIN - Valid from date

Data type: BAPIP0002HK-VALIDBEGIN
Optional: No
Call by Reference: No ( called with pass by value option)

LANGUAGE - Language key

Data type: BAPIP0002HK-LANGUAGE
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGUAGE_ISO - Language according to ISO 639

Data type: BAPIP0002HK-LANGUAGE_ISO
Optional: Yes
Call by Reference: No ( called with pass by value option)

NATIONALITY - Nationality

Data type: BAPIP0002HK-NATIONALITY
Optional: Yes
Call by Reference: No ( called with pass by value option)

SECONDNATIONALITY - Second nationality

Data type: BAPIP0002HK-SECONDNATIO
Optional: Yes
Call by Reference: No ( called with pass by value option)

THIRDNATIONALITY - Third nationality

Data type: BAPIP0002HK-THIRDNATIO
Optional: Yes
Call by Reference: No ( called with pass by value option)

NOCOMMIT - COMMIT control at BAPI interface

Data type: BAPI_STAND-NO_COMMIT
Optional: Yes
Call by Reference: No ( called with pass by value option)

NAME_FORMAT_INDICATOR - Name format indicator for employee in a list

Data type: BAPIP0002HK-NAMEFORMATINDI
Optional: Yes
Call by Reference: No ( called with pass by value option)

MARRIAGENUMBER - Marriage certificate number

Data type: BAPIP0002HK-MARRIAGENUMBER
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALIDITYEND - Valid to date

Data type: BAPIP0002HK-VALIDEND
Optional: No
Call by Reference: No ( called with pass by value option)

FORMOFADDRESS - Form-of-address key

Data type: BAPIP0002HK-FORMOFADDRESS
Optional: Yes
Call by Reference: No ( called with pass by value option)

FIRSTNAME - First name

Data type: BAPIP0002HK-FIRSTNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

LASTNAME - Last name

Data type: BAPIP0002HK-LASTNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

NAMEATBIRTH - Name at birth

Data type: BAPIP0002HK-NAMEATBIRTH
Optional: Yes
Call by Reference: No ( called with pass by value option)

KNOWNAS - Known as

Data type: BAPIP0002HK-KNOWNAS
Optional: Yes
Call by Reference: No ( called with pass by value option)

SECONDACADGRADE - Second title

Data type: BAPIP0002HK-SECONDTITLE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BAPI_PERSDATAHK_SIMULACREATION

RETURN - Structure for return code

Data type: BAPIRETURN1
Optional: No
Call by Reference: No ( called with pass by value option)

EMPLOYEENUMBER - Personnel number

Data type: BAPIP0002HK-EMPLOYEENO
Optional: No
Call by Reference: No ( called with pass by value option)

SUBTYPE - Subtype

Data type: BAPIP0002HK-SUBTYPE
Optional: No
Call by Reference: No ( called with pass by value option)

OBJECTID - Object ID

Data type: BAPIP0002HK-OBJECTID
Optional: No
Call by Reference: No ( called with pass by value option)

LOCKINDICATOR - Lock indicator for HR master record

Data type: BAPIP0002HK-LOCKINDIC
Optional: No
Call by Reference: No ( called with pass by value option)

VALIDITYBEGIN - Valid from date

Data type: BAPIP0002HK-VALIDBEGIN
Optional: No
Call by Reference: No ( called with pass by value option)

VALIDITYEND - Valid to date

Data type: BAPIP0002HK-VALIDEND
Optional: No
Call by Reference: No ( called with pass by value option)

RECORDNUMBER - Number of infotype record

Data type: BAPIP0002HK-RECORDNR
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for BAPI_PERSDATAHK_SIMULACREATION 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 BAPIP0002HK-EMPLOYEENO, "   
lv_surnameprefix  TYPE BAPIP0002HK-SURNAMEPREFIX, "   
lv_initials  TYPE BAPIP0002HK-INITIALS, "   
lv_gender  TYPE BAPIP0002HK-GENDER, "   
lv_dateofbirth  TYPE BAPIP0002HK-DATEOFBIRTH, "   
lv_birthplace  TYPE BAPIP0002HK-BIRTHPLACE, "   
lv_stateofbirth  TYPE BAPIP0002HK-STATEOFBIRTH, "   
lv_countryofbirth  TYPE BAPIP0002HK-COUNTRYOFBIRTH, "   
lv_maritalstatus  TYPE BAPIP0002HK-MARITALSTATUS, "   
lv_maritalstatussince  TYPE BAPIP0002HK-MARITALSINCE, "   
lv_numberofchildren  TYPE BAPIP0002HK-NUMBEROFCHILD, "   
lv_validitybegin  TYPE BAPIP0002HK-VALIDBEGIN, "   
lv_employeenumber  TYPE BAPIP0002HK-EMPLOYEENO, "   
lv_language  TYPE BAPIP0002HK-LANGUAGE, "   
lv_language_iso  TYPE BAPIP0002HK-LANGUAGE_ISO, "   
lv_nationality  TYPE BAPIP0002HK-NATIONALITY, "   
lv_secondnationality  TYPE BAPIP0002HK-SECONDNATIO, "   
lv_thirdnationality  TYPE BAPIP0002HK-THIRDNATIO, "   
lv_nocommit  TYPE BAPI_STAND-NO_COMMIT, "   
lv_name_format_indicator  TYPE BAPIP0002HK-NAMEFORMATINDI, "   
lv_marriagenumber  TYPE BAPIP0002HK-MARRIAGENUMBER, "   
lv_subtype  TYPE BAPIP0002HK-SUBTYPE, "   
lv_validityend  TYPE BAPIP0002HK-VALIDEND, "   
lv_objectid  TYPE BAPIP0002HK-OBJECTID, "   
lv_formofaddress  TYPE BAPIP0002HK-FORMOFADDRESS, "   
lv_firstname  TYPE BAPIP0002HK-FIRSTNAME, "   
lv_lockindicator  TYPE BAPIP0002HK-LOCKINDIC, "   
lv_lastname  TYPE BAPIP0002HK-LASTNAME, "   
lv_validitybegin  TYPE BAPIP0002HK-VALIDBEGIN, "   
lv_nameatbirth  TYPE BAPIP0002HK-NAMEATBIRTH, "   
lv_validityend  TYPE BAPIP0002HK-VALIDEND, "   
lv_knownas  TYPE BAPIP0002HK-KNOWNAS, "   
lv_recordnumber  TYPE BAPIP0002HK-RECORDNR, "   
lv_secondacadgrade  TYPE BAPIP0002HK-SECONDTITLE. "   

  CALL FUNCTION 'BAPI_PERSDATAHK_SIMULACREATION'  "Simulation: Create personal data
    EXPORTING
         EMPLOYEENUMBER = lv_employeenumber
         SURNAMEPREFIX = lv_surnameprefix
         INITIALS = lv_initials
         GENDER = lv_gender
         DATEOFBIRTH = lv_dateofbirth
         BIRTHPLACE = lv_birthplace
         STATEOFBIRTH = lv_stateofbirth
         COUNTRYOFBIRTH = lv_countryofbirth
         MARITALSTATUS = lv_maritalstatus
         MARITALSTATUSSINCE = lv_maritalstatussince
         NUMBEROFCHILDREN = lv_numberofchildren
         VALIDITYBEGIN = lv_validitybegin
         LANGUAGE = lv_language
         LANGUAGE_ISO = lv_language_iso
         NATIONALITY = lv_nationality
         SECONDNATIONALITY = lv_secondnationality
         THIRDNATIONALITY = lv_thirdnationality
         NOCOMMIT = lv_nocommit
         NAME_FORMAT_INDICATOR = lv_name_format_indicator
         MARRIAGENUMBER = lv_marriagenumber
         VALIDITYEND = lv_validityend
         FORMOFADDRESS = lv_formofaddress
         FIRSTNAME = lv_firstname
         LASTNAME = lv_lastname
         NAMEATBIRTH = lv_nameatbirth
         KNOWNAS = lv_knownas
         SECONDACADGRADE = lv_secondacadgrade
    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
. " BAPI_PERSDATAHK_SIMULACREATION




ABAP code using 7.40 inline data declarations to call FM BAPI_PERSDATAHK_SIMULACREATION

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 EMPLOYEENO FROM BAPIP0002HK INTO @DATA(ld_employeenumber).
 
"SELECT single SURNAMEPREFIX FROM BAPIP0002HK INTO @DATA(ld_surnameprefix).
 
"SELECT single INITIALS FROM BAPIP0002HK INTO @DATA(ld_initials).
 
"SELECT single GENDER FROM BAPIP0002HK INTO @DATA(ld_gender).
 
"SELECT single DATEOFBIRTH FROM BAPIP0002HK INTO @DATA(ld_dateofbirth).
 
"SELECT single BIRTHPLACE FROM BAPIP0002HK INTO @DATA(ld_birthplace).
 
"SELECT single STATEOFBIRTH FROM BAPIP0002HK INTO @DATA(ld_stateofbirth).
 
"SELECT single COUNTRYOFBIRTH FROM BAPIP0002HK INTO @DATA(ld_countryofbirth).
 
"SELECT single MARITALSTATUS FROM BAPIP0002HK INTO @DATA(ld_maritalstatus).
 
"SELECT single MARITALSINCE FROM BAPIP0002HK INTO @DATA(ld_maritalstatussince).
 
"SELECT single NUMBEROFCHILD FROM BAPIP0002HK INTO @DATA(ld_numberofchildren).
 
"SELECT single VALIDBEGIN FROM BAPIP0002HK INTO @DATA(ld_validitybegin).
 
"SELECT single EMPLOYEENO FROM BAPIP0002HK INTO @DATA(ld_employeenumber).
 
"SELECT single LANGUAGE FROM BAPIP0002HK INTO @DATA(ld_language).
 
"SELECT single LANGUAGE_ISO FROM BAPIP0002HK INTO @DATA(ld_language_iso).
 
"SELECT single NATIONALITY FROM BAPIP0002HK INTO @DATA(ld_nationality).
 
"SELECT single SECONDNATIO FROM BAPIP0002HK INTO @DATA(ld_secondnationality).
 
"SELECT single THIRDNATIO FROM BAPIP0002HK INTO @DATA(ld_thirdnationality).
 
"SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit).
 
"SELECT single NAMEFORMATINDI FROM BAPIP0002HK INTO @DATA(ld_name_format_indicator).
 
"SELECT single MARRIAGENUMBER FROM BAPIP0002HK INTO @DATA(ld_marriagenumber).
 
"SELECT single SUBTYPE FROM BAPIP0002HK INTO @DATA(ld_subtype).
 
"SELECT single VALIDEND FROM BAPIP0002HK INTO @DATA(ld_validityend).
 
"SELECT single OBJECTID FROM BAPIP0002HK INTO @DATA(ld_objectid).
 
"SELECT single FORMOFADDRESS FROM BAPIP0002HK INTO @DATA(ld_formofaddress).
 
"SELECT single FIRSTNAME FROM BAPIP0002HK INTO @DATA(ld_firstname).
 
"SELECT single LOCKINDIC FROM BAPIP0002HK INTO @DATA(ld_lockindicator).
 
"SELECT single LASTNAME FROM BAPIP0002HK INTO @DATA(ld_lastname).
 
"SELECT single VALIDBEGIN FROM BAPIP0002HK INTO @DATA(ld_validitybegin).
 
"SELECT single NAMEATBIRTH FROM BAPIP0002HK INTO @DATA(ld_nameatbirth).
 
"SELECT single VALIDEND FROM BAPIP0002HK INTO @DATA(ld_validityend).
 
"SELECT single KNOWNAS FROM BAPIP0002HK INTO @DATA(ld_knownas).
 
"SELECT single RECORDNR FROM BAPIP0002HK INTO @DATA(ld_recordnumber).
 
"SELECT single SECONDTITLE FROM BAPIP0002HK INTO @DATA(ld_secondacadgrade).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!