SAP BAPI_FAMILYID_CREATE Function Module for Family ID: Create record
BAPI_FAMILYID_CREATE is a standard bapi familyid create 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 ID: Create record 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 familyid create FM, simply by entering the name BAPI_FAMILYID_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: PFAM_ID
Program Name: SAPLPFAM_ID
Main Program:
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function BAPI_FAMILYID_CREATE 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_FAMILYID_CREATE'"Family ID: Create record.
EXPORTING
EMPLOYEENUMBER = "Personnel number
* BIRTHPLACE = "Birthplace
* DATEOFBIRTH = "Date of birth
* NATIONALITY = "Nationality
* COUNTRYOFBIRTH = "Country of birth
* MARRIAGECERT = "Marriage certificate
* JOBTITLE = "Job title
* EMPLOYERNAME = "Employer of family member (Indonesia)
* TAXDEPENDENT = "Dependent for Tax purposes (Yes/No) (Indonesia)
* IDNUMBER = "Identity Card Number
* IDTYPE = "Type of Identity Card (Indonesia)
VALIDITYBEGIN = "Valid from date
* IDISSUEDATE = "Date of Issue of Identity Card (Indonesia)
* IDISSUEPLACE = "Place of Issue of Identity Card
* IDEXPIRYDATE = "Expiry Date of Identity Card (Indonesia)
* PHONENUMBER = "Telephone number
* STREET = "House number and street
* 2NDSTREET = "2nd address line
* CITY = "City
* POSTALCODE = "Postal code
* DISTRICT = "District
* ADDRCOUNTRYKEY = "Country key
VALIDITYEND = "Valid to date
* PASSPORTNUMBER = "Passport Number
* PASSPORTTYPE = "Passport Type
* PASSISSUEDATE = "Date of issue of Passport (Indonesia)
* PASSEXPIRYDATE = "Date of expiry of Passport (Indonesia)
* PASSISSUEPLACE = "Place of Issue of Passport
* PASSCOUNTRYKEY = "Country key
* NOCOMMIT = "COMMIT control at BAPI interface
* MEMBERTYPE = "Type of family record
* COMPLETENAME = "Complete name
* TITEL = "Title
* ADDLTITLE = "Other Title
* NAMEFORMAT = "Name format indicator for employee in a list
* GENDER = "Gender key
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_FAMILYID_CREATE
EMPLOYEENUMBER - Personnel number
Data type: BAPIP0021-PERNROptional: No
Call by Reference: No ( called with pass by value option)
BIRTHPLACE - Birthplace
Data type: BAPIP0021-FGBOTOptional: 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)
NATIONALITY - Nationality
Data type: BAPIP0021-FANATOptional: Yes
Call by Reference: No ( called with pass by value option)
COUNTRYOFBIRTH - Country of birth
Data type: BAPIP0021-FGBLDOptional: Yes
Call by Reference: No ( called with pass by value option)
MARRIAGECERT - Marriage certificate
Data type: BAPIP0021ID-MARRIAGECERTOptional: Yes
Call by Reference: No ( called with pass by value option)
JOBTITLE - Job title
Data type: BAPIP0021ID-JOBTITLEOptional: Yes
Call by Reference: No ( called with pass by value option)
EMPLOYERNAME - Employer of family member (Indonesia)
Data type: BAPIP0021ID-EMPLOYERNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
TAXDEPENDENT - Dependent for Tax purposes (Yes/No) (Indonesia)
Data type: BAPIP0021ID-TAXDEPENDENTOptional: Yes
Call by Reference: No ( called with pass by value option)
IDNUMBER - Identity Card Number
Data type: BAPIP0021ID-IDNUMBEROptional: Yes
Call by Reference: No ( called with pass by value option)
IDTYPE - Type of Identity Card (Indonesia)
Data type: BAPIP0021ID-IDTYPEOptional: 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)
IDISSUEDATE - Date of Issue of Identity Card (Indonesia)
Data type: BAPIP0021ID-IDISSUEDATEOptional: Yes
Call by Reference: No ( called with pass by value option)
IDISSUEPLACE - Place of Issue of Identity Card
Data type: BAPIP0021ID-IDISSUEPLACEOptional: Yes
Call by Reference: No ( called with pass by value option)
IDEXPIRYDATE - Expiry Date of Identity Card (Indonesia)
Data type: BAPIP0021ID-IDEXPIRYDATEOptional: Yes
Call by Reference: No ( called with pass by value option)
PHONENUMBER - Telephone number
Data type: BAPIP0021ID-PHONENUMBEROptional: Yes
Call by Reference: No ( called with pass by value option)
STREET - House number and street
Data type: BAPIP0021ID-STREETOptional: Yes
Call by Reference: No ( called with pass by value option)
2NDSTREET - 2nd address line
Data type: BAPIP0021ID-2NDSTREETOptional: Yes
Call by Reference: No ( called with pass by value option)
CITY - City
Data type: BAPIP0021ID-CITYOptional: Yes
Call by Reference: No ( called with pass by value option)
POSTALCODE - Postal code
Data type: BAPIP0021ID-POSTALCODEOptional: Yes
Call by Reference: No ( called with pass by value option)
DISTRICT - District
Data type: BAPIP0021ID-DISTRICTOptional: Yes
Call by Reference: No ( called with pass by value option)
ADDRCOUNTRYKEY - Country key
Data type: BAPIP0021ID-ADDRCOUNTRYKEYOptional: 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)
PASSPORTNUMBER - Passport Number
Data type: BAPIP0021ID-PASSPORTNUMBEROptional: Yes
Call by Reference: No ( called with pass by value option)
PASSPORTTYPE - Passport Type
Data type: BAPIP0021ID-PASSPORTTYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
PASSISSUEDATE - Date of issue of Passport (Indonesia)
Data type: BAPIP0021ID-PASSISSUEDATEOptional: Yes
Call by Reference: No ( called with pass by value option)
PASSEXPIRYDATE - Date of expiry of Passport (Indonesia)
Data type: BAPIP0021ID-PASSEXPIRYDATEOptional: Yes
Call by Reference: No ( called with pass by value option)
PASSISSUEPLACE - Place of Issue of Passport
Data type: BAPIP0021ID-PASSISSUEPLACEOptional: Yes
Call by Reference: No ( called with pass by value option)
PASSCOUNTRYKEY - Country key
Data type: BAPIP0021ID-PASSCOUNTRYKEYOptional: 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)
MEMBERTYPE - Type of family record
Data type: BAPIP0021-FAMSAOptional: Yes
Call by Reference: No ( called with pass by value option)
COMPLETENAME - Complete name
Data type: BAPIP0021-FCNAMOptional: Yes
Call by Reference: No ( called with pass by value option)
TITEL - Title
Data type: BAPIP0021-TITELOptional: Yes
Call by Reference: No ( called with pass by value option)
ADDLTITLE - Other Title
Data type: BAPIP0021-FNMZUOptional: Yes
Call by Reference: No ( called with pass by value option)
NAMEFORMAT - Name format indicator for employee in a list
Data type: BAPIP0021-FKNZNOptional: 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)
EXPORTING Parameters details for BAPI_FAMILYID_CREATE
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_FAMILYID_CREATE 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_birthplace | TYPE BAPIP0021-FGBOT, " | |||
lv_dateofbirth | TYPE BAPIP0021-FGBDT, " | |||
lv_nationality | TYPE BAPIP0021-FANAT, " | |||
lv_countryofbirth | TYPE BAPIP0021-FGBLD, " | |||
lv_marriagecert | TYPE BAPIP0021ID-MARRIAGECERT, " | |||
lv_jobtitle | TYPE BAPIP0021ID-JOBTITLE, " | |||
lv_employername | TYPE BAPIP0021ID-EMPLOYERNAME, " | |||
lv_taxdependent | TYPE BAPIP0021ID-TAXDEPENDENT, " | |||
lv_idnumber | TYPE BAPIP0021ID-IDNUMBER, " | |||
lv_idtype | TYPE BAPIP0021ID-IDTYPE, " | |||
lv_validitybegin | TYPE BAPIP0021-BEGDA, " | |||
lv_employeenumber | TYPE BAPIP0021-PERNR, " | |||
lv_idissuedate | TYPE BAPIP0021ID-IDISSUEDATE, " | |||
lv_idissueplace | TYPE BAPIP0021ID-IDISSUEPLACE, " | |||
lv_idexpirydate | TYPE BAPIP0021ID-IDEXPIRYDATE, " | |||
lv_phonenumber | TYPE BAPIP0021ID-PHONENUMBER, " | |||
lv_street | TYPE BAPIP0021ID-STREET, " | |||
lv_2ndstreet | TYPE BAPIP0021ID-2NDSTREET, " | |||
lv_city | TYPE BAPIP0021ID-CITY, " | |||
lv_postalcode | TYPE BAPIP0021ID-POSTALCODE, " | |||
lv_district | TYPE BAPIP0021ID-DISTRICT, " | |||
lv_addrcountrykey | TYPE BAPIP0021ID-ADDRCOUNTRYKEY, " | |||
lv_subtype | TYPE BAPIP0021-SUBTY, " | |||
lv_validityend | TYPE BAPIP0021-ENDDA, " | |||
lv_passportnumber | TYPE BAPIP0021ID-PASSPORTNUMBER, " | |||
lv_passporttype | TYPE BAPIP0021ID-PASSPORTTYPE, " | |||
lv_passissuedate | TYPE BAPIP0021ID-PASSISSUEDATE, " | |||
lv_passexpirydate | TYPE BAPIP0021ID-PASSEXPIRYDATE, " | |||
lv_passissueplace | TYPE BAPIP0021ID-PASSISSUEPLACE, " | |||
lv_passcountrykey | TYPE BAPIP0021ID-PASSCOUNTRYKEY, " | |||
lv_nocommit | TYPE BAPI_STAND-NO_COMMIT, " | |||
lv_objectid | TYPE BAPIP0021-OBJPS, " | |||
lv_membertype | TYPE BAPIP0021-FAMSA, " | |||
lv_completename | TYPE BAPIP0021-FCNAM, " | |||
lv_lockindicator | TYPE BAPIP0021-SPRPS, " | |||
lv_titel | TYPE BAPIP0021-TITEL, " | |||
lv_validitybegin | TYPE BAPIP0021-BEGDA, " | |||
lv_addltitle | TYPE BAPIP0021-FNMZU, " | |||
lv_validityend | TYPE BAPIP0021-ENDDA, " | |||
lv_nameformat | TYPE BAPIP0021-FKNZN, " | |||
lv_recordnumber | TYPE BAPIP0021-SEQNR, " | |||
lv_gender | TYPE BAPIP0021-FASEX. " |
  CALL FUNCTION 'BAPI_FAMILYID_CREATE' "Family ID: Create record |
EXPORTING | ||
EMPLOYEENUMBER | = lv_employeenumber | |
BIRTHPLACE | = lv_birthplace | |
DATEOFBIRTH | = lv_dateofbirth | |
NATIONALITY | = lv_nationality | |
COUNTRYOFBIRTH | = lv_countryofbirth | |
MARRIAGECERT | = lv_marriagecert | |
JOBTITLE | = lv_jobtitle | |
EMPLOYERNAME | = lv_employername | |
TAXDEPENDENT | = lv_taxdependent | |
IDNUMBER | = lv_idnumber | |
IDTYPE | = lv_idtype | |
VALIDITYBEGIN | = lv_validitybegin | |
IDISSUEDATE | = lv_idissuedate | |
IDISSUEPLACE | = lv_idissueplace | |
IDEXPIRYDATE | = lv_idexpirydate | |
PHONENUMBER | = lv_phonenumber | |
STREET | = lv_street | |
2NDSTREET | = lv_2ndstreet | |
CITY | = lv_city | |
POSTALCODE | = lv_postalcode | |
DISTRICT | = lv_district | |
ADDRCOUNTRYKEY | = lv_addrcountrykey | |
VALIDITYEND | = lv_validityend | |
PASSPORTNUMBER | = lv_passportnumber | |
PASSPORTTYPE | = lv_passporttype | |
PASSISSUEDATE | = lv_passissuedate | |
PASSEXPIRYDATE | = lv_passexpirydate | |
PASSISSUEPLACE | = lv_passissueplace | |
PASSCOUNTRYKEY | = lv_passcountrykey | |
NOCOMMIT | = lv_nocommit | |
MEMBERTYPE | = lv_membertype | |
COMPLETENAME | = lv_completename | |
TITEL | = lv_titel | |
ADDLTITLE | = lv_addltitle | |
NAMEFORMAT | = lv_nameformat | |
GENDER | = lv_gender | |
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_FAMILYID_CREATE |
ABAP code using 7.40 inline data declarations to call FM BAPI_FAMILYID_CREATE
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 FGBOT FROM BAPIP0021 INTO @DATA(ld_birthplace). | ||||
"SELECT single FGBDT FROM BAPIP0021 INTO @DATA(ld_dateofbirth). | ||||
"SELECT single FANAT FROM BAPIP0021 INTO @DATA(ld_nationality). | ||||
"SELECT single FGBLD FROM BAPIP0021 INTO @DATA(ld_countryofbirth). | ||||
"SELECT single MARRIAGECERT FROM BAPIP0021ID INTO @DATA(ld_marriagecert). | ||||
"SELECT single JOBTITLE FROM BAPIP0021ID INTO @DATA(ld_jobtitle). | ||||
"SELECT single EMPLOYERNAME FROM BAPIP0021ID INTO @DATA(ld_employername). | ||||
"SELECT single TAXDEPENDENT FROM BAPIP0021ID INTO @DATA(ld_taxdependent). | ||||
"SELECT single IDNUMBER FROM BAPIP0021ID INTO @DATA(ld_idnumber). | ||||
"SELECT single IDTYPE FROM BAPIP0021ID INTO @DATA(ld_idtype). | ||||
"SELECT single BEGDA FROM BAPIP0021 INTO @DATA(ld_validitybegin). | ||||
"SELECT single PERNR FROM BAPIP0021 INTO @DATA(ld_employeenumber). | ||||
"SELECT single IDISSUEDATE FROM BAPIP0021ID INTO @DATA(ld_idissuedate). | ||||
"SELECT single IDISSUEPLACE FROM BAPIP0021ID INTO @DATA(ld_idissueplace). | ||||
"SELECT single IDEXPIRYDATE FROM BAPIP0021ID INTO @DATA(ld_idexpirydate). | ||||
"SELECT single PHONENUMBER FROM BAPIP0021ID INTO @DATA(ld_phonenumber). | ||||
"SELECT single STREET FROM BAPIP0021ID INTO @DATA(ld_street). | ||||
"SELECT single 2NDSTREET FROM BAPIP0021ID INTO @DATA(ld_2ndstreet). | ||||
"SELECT single CITY FROM BAPIP0021ID INTO @DATA(ld_city). | ||||
"SELECT single POSTALCODE FROM BAPIP0021ID INTO @DATA(ld_postalcode). | ||||
"SELECT single DISTRICT FROM BAPIP0021ID INTO @DATA(ld_district). | ||||
"SELECT single ADDRCOUNTRYKEY FROM BAPIP0021ID INTO @DATA(ld_addrcountrykey). | ||||
"SELECT single SUBTY FROM BAPIP0021 INTO @DATA(ld_subtype). | ||||
"SELECT single ENDDA FROM BAPIP0021 INTO @DATA(ld_validityend). | ||||
"SELECT single PASSPORTNUMBER FROM BAPIP0021ID INTO @DATA(ld_passportnumber). | ||||
"SELECT single PASSPORTTYPE FROM BAPIP0021ID INTO @DATA(ld_passporttype). | ||||
"SELECT single PASSISSUEDATE FROM BAPIP0021ID INTO @DATA(ld_passissuedate). | ||||
"SELECT single PASSEXPIRYDATE FROM BAPIP0021ID INTO @DATA(ld_passexpirydate). | ||||
"SELECT single PASSISSUEPLACE FROM BAPIP0021ID INTO @DATA(ld_passissueplace). | ||||
"SELECT single PASSCOUNTRYKEY FROM BAPIP0021ID INTO @DATA(ld_passcountrykey). | ||||
"SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit). | ||||
"SELECT single OBJPS FROM BAPIP0021 INTO @DATA(ld_objectid). | ||||
"SELECT single FAMSA FROM BAPIP0021 INTO @DATA(ld_membertype). | ||||
"SELECT single FCNAM FROM BAPIP0021 INTO @DATA(ld_completename). | ||||
"SELECT single SPRPS FROM BAPIP0021 INTO @DATA(ld_lockindicator). | ||||
"SELECT single TITEL FROM BAPIP0021 INTO @DATA(ld_titel). | ||||
"SELECT single BEGDA FROM BAPIP0021 INTO @DATA(ld_validitybegin). | ||||
"SELECT single FNMZU FROM BAPIP0021 INTO @DATA(ld_addltitle). | ||||
"SELECT single ENDDA FROM BAPIP0021 INTO @DATA(ld_validityend). | ||||
"SELECT single FKNZN FROM BAPIP0021 INTO @DATA(ld_nameformat). | ||||
"SELECT single SEQNR FROM BAPIP0021 INTO @DATA(ld_recordnumber). | ||||
"SELECT single FASEX FROM BAPIP0021 INTO @DATA(ld_gender). | ||||
Search for further information about these or an SAP related objects