SAP BAPI_FAMILYUS_SIMULATECREATION Function Module for Family US: Simulate record creation
BAPI_FAMILYUS_SIMULATECREATION is a standard bapi familyus simulatecreation SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Family US: Simulate record creation 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 familyus simulatecreation FM, simply by entering the name BAPI_FAMILYUS_SIMULATECREATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: PFAM_US
Program Name: SAPLPFAM_US
Main Program: SAPLPFAM_US
Appliation area: P
Release date: 08-May-1998
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_FAMILYUS_SIMULATECREATION 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_FAMILYUS_SIMULATECREATION'"Family US: Simulate record creation.
EXPORTING
EMPLOYEENUMBER = "Personnel number
* NATIONALITY = "Nationality
* NATIONALITY2 = "Second nationality
* NATIONALITY3 = "Third nationality
* REFPERSNO = "Reference personnel number
* IDNUMBER = "ID number
* PHONENUMBER = "Telephone number
* STREETANDHOUSENO = "Street and house number
* SECONDADDRESSLINE = "Second address line
* CITY = "City
* STATE = "State
VALIDITYBEGIN = "Valid from date
* POSTALCODE = "Postal code
* COUNTRY = "Country
* DATEOFSEPARATION = "Legal separation date
* NAMEOFPHYSICIAN1 = "Name of physician 1
* PHYSICIANID1 = "ID of physician1
* NAMEOFPHYSICIAN2 = "Name of physician 2
* PHYSICIANID2 = "ID of physician2
* STUDENT = "Student indicator
* COBRA = "COBRA indicator
* MEDICARE = "Medicare indicator
VALIDITYEND = "Valid to date
* SMOKER = "Smoker indicator
* DISABILITY = "Disability indicator
* DATEOFDISABILITY = "Date of disability
* DATEDISABLEARNED = "Date employer learned of employee's disability
* NOCOMMIT = "COMMIT control at BAPI interface
* MARITAL_STATUS = "Marital Status Key
* MEMBERTYPE = "Type of family record
* FIRSTNAME = "First name
* LASTNAME = "Last name
* MAIDENNAME = "Name at birth
* GENDER = "Gender key
* DATEOFBIRTH = "Date of birth
IMPORTING
RETURN = "Return messages
EMPLOYEENUMBER = "Personnel number
SUBTYPE = "Subtype
OBJECTID = "Object identification
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_FAMILYUS_SIMULATECREATION
EMPLOYEENUMBER - Personnel number
Data type: BAPIP0021-PERNROptional: No
Call by Reference: No ( called with pass by value option)
NATIONALITY - Nationality
Data type: BAPIP0021-FANATOptional: Yes
Call by Reference: No ( called with pass by value option)
NATIONALITY2 - Second nationality
Data type: BAPIP0021-FANA2Optional: Yes
Call by Reference: No ( called with pass by value option)
NATIONALITY3 - Third nationality
Data type: BAPIP0021-FANA3Optional: Yes
Call by Reference: No ( called with pass by value option)
REFPERSNO - Reference personnel number
Data type: BAPIP0021US-REFPERSNOOptional: Yes
Call by Reference: No ( called with pass by value option)
IDNUMBER - ID number
Data type: BAPIP0021US-IDNUMBEROptional: Yes
Call by Reference: No ( called with pass by value option)
PHONENUMBER - Telephone number
Data type: BAPIP0021US-PHONENUMBEROptional: Yes
Call by Reference: No ( called with pass by value option)
STREETANDHOUSENO - Street and house number
Data type: BAPIP0021US-STREETANDHOUSEOptional: Yes
Call by Reference: No ( called with pass by value option)
SECONDADDRESSLINE - Second address line
Data type: BAPIP0021US-SECONDADDRLINEOptional: Yes
Call by Reference: No ( called with pass by value option)
CITY - City
Data type: BAPIP0021US-CITYOptional: Yes
Call by Reference: No ( called with pass by value option)
STATE - State
Data type: BAPIP0021US-STATEOptional: Yes
Call by Reference: No ( called with pass by value option)
VALIDITYBEGIN - Valid from date
Data type: BAPIP0021-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
POSTALCODE - Postal code
Data type: BAPIP0021US-POSTALCODEOptional: Yes
Call by Reference: No ( called with pass by value option)
COUNTRY - Country
Data type: BAPIP0021US-COUNTRYOptional: Yes
Call by Reference: No ( called with pass by value option)
DATEOFSEPARATION - Legal separation date
Data type: BAPIP0021US-DATEOFSEPOptional: Yes
Call by Reference: No ( called with pass by value option)
NAMEOFPHYSICIAN1 - Name of physician 1
Data type: BAPIP0021US-NAMEOFPHYS1Optional: Yes
Call by Reference: No ( called with pass by value option)
PHYSICIANID1 - ID of physician1
Data type: BAPIP0021US-PHYSICIANID1Optional: Yes
Call by Reference: No ( called with pass by value option)
NAMEOFPHYSICIAN2 - Name of physician 2
Data type: BAPIP0021US-NAMEOFPHYS2Optional: Yes
Call by Reference: No ( called with pass by value option)
PHYSICIANID2 - ID of physician2
Data type: BAPIP0021US-PHYSICIANID2Optional: Yes
Call by Reference: No ( called with pass by value option)
STUDENT - Student indicator
Data type: BAPIP0021US-STUDENTOptional: Yes
Call by Reference: No ( called with pass by value option)
COBRA - COBRA indicator
Data type: BAPIP0021US-COBRAOptional: Yes
Call by Reference: No ( called with pass by value option)
MEDICARE - Medicare indicator
Data type: BAPIP0021US-MEDICAREOptional: Yes
Call by Reference: No ( called with pass by value option)
VALIDITYEND - Valid to date
Data type: BAPIP0021-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
SMOKER - Smoker indicator
Data type: BAPIP0021US-SMOKEROptional: Yes
Call by Reference: No ( called with pass by value option)
DISABILITY - Disability indicator
Data type: BAPIP0021US-DISABILITYOptional: Yes
Call by Reference: No ( called with pass by value option)
DATEOFDISABILITY - Date of disability
Data type: BAPIP0021US-DATEOFDISABOptional: Yes
Call by Reference: No ( called with pass by value option)
DATEDISABLEARNED - Date employer learned of employee's disability
Data type: BAPIP0021US-DATEDISABLEARNOptional: 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)
MARITAL_STATUS - Marital Status Key
Data type: BAPIP0021US-MARITAL_STATUSOptional: Yes
Call by Reference: No ( called with pass by value option)
MEMBERTYPE - Type of family record
Data type: BAPIP0021-FAMSAOptional: Yes
Call by Reference: No ( called with pass by value option)
FIRSTNAME - First name
Data type: BAPIP0021-FAVOROptional: Yes
Call by Reference: No ( called with pass by value option)
LASTNAME - Last name
Data type: BAPIP0021-FANAMOptional: Yes
Call by Reference: No ( called with pass by value option)
MAIDENNAME - Name at birth
Data type: BAPIP0021-FGBNAOptional: Yes
Call by Reference: No ( called with pass by value option)
GENDER - Gender key
Data type: BAPIP0021-FASEXOptional: Yes
Call by Reference: No ( called with pass by value option)
DATEOFBIRTH - Date of birth
Data type: BAPIP0021-FGBDTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_FAMILYUS_SIMULATECREATION
RETURN - Return messages
Data type: BAPIRETURN1Optional: No
Call by Reference: No ( called with pass by value option)
EMPLOYEENUMBER - Personnel number
Data type: BAPIP0021-PERNROptional: No
Call by Reference: No ( called with pass by value option)
SUBTYPE - Subtype
Data type: BAPIP0021-SUBTYOptional: No
Call by Reference: No ( called with pass by value option)
OBJECTID - Object identification
Data type: BAPIP0021-OBJPSOptional: No
Call by Reference: No ( called with pass by value option)
LOCKINDICATOR - Lock indicator for HR master record
Data type: BAPIP0021-SPRPSOptional: No
Call by Reference: No ( called with pass by value option)
VALIDITYBEGIN - Valid from date
Data type: BAPIP0021-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
VALIDITYEND - Valid to date
Data type: BAPIP0021-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
RECORDNUMBER - Number of infotype record
Data type: BAPIP0021-SEQNROptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_FAMILYUS_SIMULATECREATION 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 BAPIP0021-PERNR, " | |||
| lv_nationality | TYPE BAPIP0021-FANAT, " | |||
| lv_nationality2 | TYPE BAPIP0021-FANA2, " | |||
| lv_nationality3 | TYPE BAPIP0021-FANA3, " | |||
| lv_refpersno | TYPE BAPIP0021US-REFPERSNO, " | |||
| lv_idnumber | TYPE BAPIP0021US-IDNUMBER, " | |||
| lv_phonenumber | TYPE BAPIP0021US-PHONENUMBER, " | |||
| lv_streetandhouseno | TYPE BAPIP0021US-STREETANDHOUSE, " | |||
| lv_secondaddressline | TYPE BAPIP0021US-SECONDADDRLINE, " | |||
| lv_city | TYPE BAPIP0021US-CITY, " | |||
| lv_state | TYPE BAPIP0021US-STATE, " | |||
| lv_validitybegin | TYPE BAPIP0021-BEGDA, " | |||
| lv_employeenumber | TYPE BAPIP0021-PERNR, " | |||
| lv_postalcode | TYPE BAPIP0021US-POSTALCODE, " | |||
| lv_country | TYPE BAPIP0021US-COUNTRY, " | |||
| lv_dateofseparation | TYPE BAPIP0021US-DATEOFSEP, " | |||
| lv_nameofphysician1 | TYPE BAPIP0021US-NAMEOFPHYS1, " | |||
| lv_physicianid1 | TYPE BAPIP0021US-PHYSICIANID1, " | |||
| lv_nameofphysician2 | TYPE BAPIP0021US-NAMEOFPHYS2, " | |||
| lv_physicianid2 | TYPE BAPIP0021US-PHYSICIANID2, " | |||
| lv_student | TYPE BAPIP0021US-STUDENT, " | |||
| lv_cobra | TYPE BAPIP0021US-COBRA, " | |||
| lv_medicare | TYPE BAPIP0021US-MEDICARE, " | |||
| lv_subtype | TYPE BAPIP0021-SUBTY, " | |||
| lv_validityend | TYPE BAPIP0021-ENDDA, " | |||
| lv_smoker | TYPE BAPIP0021US-SMOKER, " | |||
| lv_disability | TYPE BAPIP0021US-DISABILITY, " | |||
| lv_dateofdisability | TYPE BAPIP0021US-DATEOFDISAB, " | |||
| lv_datedisablearned | TYPE BAPIP0021US-DATEDISABLEARN, " | |||
| lv_nocommit | TYPE BAPI_STAND-NO_COMMIT, " | |||
| lv_marital_status | TYPE BAPIP0021US-MARITAL_STATUS, " | |||
| lv_objectid | TYPE BAPIP0021-OBJPS, " | |||
| lv_membertype | TYPE BAPIP0021-FAMSA, " | |||
| lv_firstname | TYPE BAPIP0021-FAVOR, " | |||
| lv_lockindicator | TYPE BAPIP0021-SPRPS, " | |||
| lv_lastname | TYPE BAPIP0021-FANAM, " | |||
| lv_validitybegin | TYPE BAPIP0021-BEGDA, " | |||
| lv_maidenname | TYPE BAPIP0021-FGBNA, " | |||
| lv_validityend | TYPE BAPIP0021-ENDDA, " | |||
| lv_gender | TYPE BAPIP0021-FASEX, " | |||
| lv_recordnumber | TYPE BAPIP0021-SEQNR, " | |||
| lv_dateofbirth | TYPE BAPIP0021-FGBDT. " |
|   CALL FUNCTION 'BAPI_FAMILYUS_SIMULATECREATION' "Family US: Simulate record creation |
| EXPORTING | ||
| EMPLOYEENUMBER | = lv_employeenumber | |
| NATIONALITY | = lv_nationality | |
| NATIONALITY2 | = lv_nationality2 | |
| NATIONALITY3 | = lv_nationality3 | |
| REFPERSNO | = lv_refpersno | |
| IDNUMBER | = lv_idnumber | |
| PHONENUMBER | = lv_phonenumber | |
| STREETANDHOUSENO | = lv_streetandhouseno | |
| SECONDADDRESSLINE | = lv_secondaddressline | |
| CITY | = lv_city | |
| STATE | = lv_state | |
| VALIDITYBEGIN | = lv_validitybegin | |
| POSTALCODE | = lv_postalcode | |
| COUNTRY | = lv_country | |
| DATEOFSEPARATION | = lv_dateofseparation | |
| NAMEOFPHYSICIAN1 | = lv_nameofphysician1 | |
| PHYSICIANID1 | = lv_physicianid1 | |
| NAMEOFPHYSICIAN2 | = lv_nameofphysician2 | |
| PHYSICIANID2 | = lv_physicianid2 | |
| STUDENT | = lv_student | |
| COBRA | = lv_cobra | |
| MEDICARE | = lv_medicare | |
| VALIDITYEND | = lv_validityend | |
| SMOKER | = lv_smoker | |
| DISABILITY | = lv_disability | |
| DATEOFDISABILITY | = lv_dateofdisability | |
| DATEDISABLEARNED | = lv_datedisablearned | |
| NOCOMMIT | = lv_nocommit | |
| MARITAL_STATUS | = lv_marital_status | |
| MEMBERTYPE | = lv_membertype | |
| FIRSTNAME | = lv_firstname | |
| LASTNAME | = lv_lastname | |
| MAIDENNAME | = lv_maidenname | |
| GENDER | = lv_gender | |
| DATEOFBIRTH | = lv_dateofbirth | |
| 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_FAMILYUS_SIMULATECREATION | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_FAMILYUS_SIMULATECREATION
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 BAPIP0021 INTO @DATA(ld_employeenumber). | ||||
| "SELECT single FANAT FROM BAPIP0021 INTO @DATA(ld_nationality). | ||||
| "SELECT single FANA2 FROM BAPIP0021 INTO @DATA(ld_nationality2). | ||||
| "SELECT single FANA3 FROM BAPIP0021 INTO @DATA(ld_nationality3). | ||||
| "SELECT single REFPERSNO FROM BAPIP0021US INTO @DATA(ld_refpersno). | ||||
| "SELECT single IDNUMBER FROM BAPIP0021US INTO @DATA(ld_idnumber). | ||||
| "SELECT single PHONENUMBER FROM BAPIP0021US INTO @DATA(ld_phonenumber). | ||||
| "SELECT single STREETANDHOUSE FROM BAPIP0021US INTO @DATA(ld_streetandhouseno). | ||||
| "SELECT single SECONDADDRLINE FROM BAPIP0021US INTO @DATA(ld_secondaddressline). | ||||
| "SELECT single CITY FROM BAPIP0021US INTO @DATA(ld_city). | ||||
| "SELECT single STATE FROM BAPIP0021US INTO @DATA(ld_state). | ||||
| "SELECT single BEGDA FROM BAPIP0021 INTO @DATA(ld_validitybegin). | ||||
| "SELECT single PERNR FROM BAPIP0021 INTO @DATA(ld_employeenumber). | ||||
| "SELECT single POSTALCODE FROM BAPIP0021US INTO @DATA(ld_postalcode). | ||||
| "SELECT single COUNTRY FROM BAPIP0021US INTO @DATA(ld_country). | ||||
| "SELECT single DATEOFSEP FROM BAPIP0021US INTO @DATA(ld_dateofseparation). | ||||
| "SELECT single NAMEOFPHYS1 FROM BAPIP0021US INTO @DATA(ld_nameofphysician1). | ||||
| "SELECT single PHYSICIANID1 FROM BAPIP0021US INTO @DATA(ld_physicianid1). | ||||
| "SELECT single NAMEOFPHYS2 FROM BAPIP0021US INTO @DATA(ld_nameofphysician2). | ||||
| "SELECT single PHYSICIANID2 FROM BAPIP0021US INTO @DATA(ld_physicianid2). | ||||
| "SELECT single STUDENT FROM BAPIP0021US INTO @DATA(ld_student). | ||||
| "SELECT single COBRA FROM BAPIP0021US INTO @DATA(ld_cobra). | ||||
| "SELECT single MEDICARE FROM BAPIP0021US INTO @DATA(ld_medicare). | ||||
| "SELECT single SUBTY FROM BAPIP0021 INTO @DATA(ld_subtype). | ||||
| "SELECT single ENDDA FROM BAPIP0021 INTO @DATA(ld_validityend). | ||||
| "SELECT single SMOKER FROM BAPIP0021US INTO @DATA(ld_smoker). | ||||
| "SELECT single DISABILITY FROM BAPIP0021US INTO @DATA(ld_disability). | ||||
| "SELECT single DATEOFDISAB FROM BAPIP0021US INTO @DATA(ld_dateofdisability). | ||||
| "SELECT single DATEDISABLEARN FROM BAPIP0021US INTO @DATA(ld_datedisablearned). | ||||
| "SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit). | ||||
| "SELECT single MARITAL_STATUS FROM BAPIP0021US INTO @DATA(ld_marital_status). | ||||
| "SELECT single OBJPS FROM BAPIP0021 INTO @DATA(ld_objectid). | ||||
| "SELECT single FAMSA FROM BAPIP0021 INTO @DATA(ld_membertype). | ||||
| "SELECT single FAVOR FROM BAPIP0021 INTO @DATA(ld_firstname). | ||||
| "SELECT single SPRPS FROM BAPIP0021 INTO @DATA(ld_lockindicator). | ||||
| "SELECT single FANAM FROM BAPIP0021 INTO @DATA(ld_lastname). | ||||
| "SELECT single BEGDA FROM BAPIP0021 INTO @DATA(ld_validitybegin). | ||||
| "SELECT single FGBNA FROM BAPIP0021 INTO @DATA(ld_maidenname). | ||||
| "SELECT single ENDDA FROM BAPIP0021 INTO @DATA(ld_validityend). | ||||
| "SELECT single FASEX FROM BAPIP0021 INTO @DATA(ld_gender). | ||||
| "SELECT single SEQNR FROM BAPIP0021 INTO @DATA(ld_recordnumber). | ||||
| "SELECT single FGBDT FROM BAPIP0021 INTO @DATA(ld_dateofbirth). | ||||
Search for further information about these or an SAP related objects