SAP BAPI_FAMILYTW_CREATE Function Module for Family Taiwan: Create record
BAPI_FAMILYTW_CREATE is a standard bapi familytw 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 Taiwan: 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 familytw create FM, simply by entering the name BAPI_FAMILYTW_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: PFAM_TW
Program Name: SAPLPFAM_TW
Main Program:
Appliation area: P
Release date: 28-Jan-2000
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_FAMILYTW_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_FAMILYTW_CREATE'"Family Taiwan: Create record.
EXPORTING
EMPLOYEENUMBER = "Personnel number
* DATEOFBIRTH = "Date of birth
* PLACEOFBIRTH = "Place of birth
* LANDOFCOUNTRY = "Land of country
* ZIPCODE = "Zip code
* STREETANDHOUSE = "Street and house number
* TELEPHONENO = "Telephone number
* IDNUMBER = "ID number
* IDCHECK = "ID number check error flag
* VILLAGE = "Village
* NEIGHBORHOOD = "Neighborhood
VALIDITYBEGIN = "Valid from date
* REGION = "Region (State, Province, County)
* COUNTYCODE = "County code
* RELATIONSHIP = "Relationship to employee
* NAMEFORMATIND = "Name Format Indicator for Employee in a List
* NAMEINPASSPORT = "Complete Name
* NHIFORFAMILY = "NHI for family member
* NHIVALIDDATE = "NHI contribution from
* NHISTATUS = "NHI status
* NHISTATUSREASON = "NHI status reason
* NHIEXEMPT = "NHI exempt by law
VALIDITYEND = "Valid to date
* NHIEXEMPTREASON = "Reason for exemption
* DISABILITYLEVEL = "Disability grade
* TOWN = "Town
* NOCOMMIT = "COMMIT control at BAPI interface
MEMBERTYPE = "Type of family record
* FIRSTNAME = "First name
* LASTNAME = "Last name
* CHINESENAME = "Chinese name
* GENDER = "Gender
* NATIONALITY = "Nationality
IMPORTING
RETURN = "Structure for return code
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_FAMILYTW_CREATE
EMPLOYEENUMBER - Personnel number
Data type: BAPIP0021TW-EMPLOYEENOOptional: No
Call by Reference: No ( called with pass by value option)
DATEOFBIRTH - Date of birth
Data type: BAPIP0021TW-DATEOFBIRTHOptional: Yes
Call by Reference: No ( called with pass by value option)
PLACEOFBIRTH - Place of birth
Data type: BAPIP0021TW-PLACEOFBIRTHOptional: Yes
Call by Reference: No ( called with pass by value option)
LANDOFCOUNTRY - Land of country
Data type: BAPIP0021TW-COUNTRYOptional: Yes
Call by Reference: No ( called with pass by value option)
ZIPCODE - Zip code
Data type: BAPIP0021TW-ZIPCODEOptional: Yes
Call by Reference: No ( called with pass by value option)
STREETANDHOUSE - Street and house number
Data type: BAPIP0021TW-STREETOptional: Yes
Call by Reference: No ( called with pass by value option)
TELEPHONENO - Telephone number
Data type: BAPIP0021TW-TELEPHONENOOptional: Yes
Call by Reference: No ( called with pass by value option)
IDNUMBER - ID number
Data type: BAPIP0021TW-IDNUMBEROptional: Yes
Call by Reference: No ( called with pass by value option)
IDCHECK - ID number check error flag
Data type: BAPIP0021TW-IDCHECKOptional: Yes
Call by Reference: No ( called with pass by value option)
VILLAGE - Village
Data type: BAPIP0021TW-VILLAGEOptional: Yes
Call by Reference: No ( called with pass by value option)
NEIGHBORHOOD - Neighborhood
Data type: BAPIP0021TW-NEIGHBOROptional: Yes
Call by Reference: No ( called with pass by value option)
VALIDITYBEGIN - Valid from date
Data type: BAPIP0021TW-VALIDBEGINOptional: No
Call by Reference: No ( called with pass by value option)
REGION - Region (State, Province, County)
Data type: BAPIP0021TW-REGIONOptional: Yes
Call by Reference: No ( called with pass by value option)
COUNTYCODE - County code
Data type: BAPIP0021TW-COUNTYCODEOptional: Yes
Call by Reference: No ( called with pass by value option)
RELATIONSHIP - Relationship to employee
Data type: BAPIP0021TW-RELATIONSHIPOptional: Yes
Call by Reference: No ( called with pass by value option)
NAMEFORMATIND - Name Format Indicator for Employee in a List
Data type: BAPIP0021TW-NAMEFORMATINDOptional: Yes
Call by Reference: No ( called with pass by value option)
NAMEINPASSPORT - Complete Name
Data type: BAPIP0021TW-NAMEINPASSPORTOptional: Yes
Call by Reference: No ( called with pass by value option)
NHIFORFAMILY - NHI for family member
Data type: BAPIP0021TW-NHIFORFAMILYOptional: Yes
Call by Reference: No ( called with pass by value option)
NHIVALIDDATE - NHI contribution from
Data type: BAPIP0021TW-NHIVALIDDATEOptional: Yes
Call by Reference: No ( called with pass by value option)
NHISTATUS - NHI status
Data type: BAPIP0021TW-NHISTATUSOptional: Yes
Call by Reference: No ( called with pass by value option)
NHISTATUSREASON - NHI status reason
Data type: BAPIP0021TW-NHISTREASONOptional: Yes
Call by Reference: No ( called with pass by value option)
NHIEXEMPT - NHI exempt by law
Data type: BAPIP0021TW-NHIEXEMPTOptional: Yes
Call by Reference: No ( called with pass by value option)
VALIDITYEND - Valid to date
Data type: BAPIP0021TW-VALIDENDOptional: No
Call by Reference: No ( called with pass by value option)
NHIEXEMPTREASON - Reason for exemption
Data type: BAPIP0021TW-EXEMPTREASONOptional: Yes
Call by Reference: No ( called with pass by value option)
DISABILITYLEVEL - Disability grade
Data type: BAPIP0021TW-DISABILITYLEVOptional: Yes
Call by Reference: No ( called with pass by value option)
TOWN - Town
Data type: BAPIP0021TW-TOWNOptional: 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: BAPIP0021TW-MEMBERTYPEOptional: No
Call by Reference: No ( called with pass by value option)
FIRSTNAME - First name
Data type: BAPIP0021TW-FIRSTNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
LASTNAME - Last name
Data type: BAPIP0021TW-LASTNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
CHINESENAME - Chinese name
Data type: BAPIP0021TW-CHINESENAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
GENDER - Gender
Data type: BAPIP0021TW-GENDEROptional: Yes
Call by Reference: No ( called with pass by value option)
NATIONALITY - Nationality
Data type: BAPIP0021TW-NATIONALITYOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_FAMILYTW_CREATE
RETURN - Structure for return code
Data type: BAPIRETURN1Optional: No
Call by Reference: No ( called with pass by value option)
EMPLOYEENUMBER - Personnel number
Data type: BAPIP0021TW-EMPLOYEENOOptional: No
Call by Reference: No ( called with pass by value option)
SUBTYPE - Subtype
Data type: BAPIP0021TW-SUBTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJECTID - Object identification
Data type: BAPIP0021TW-OBJECTIDOptional: No
Call by Reference: No ( called with pass by value option)
LOCKINDICATOR - Lock indicator for HR master record
Data type: BAPIP0021TW-LOCKINDICOptional: No
Call by Reference: No ( called with pass by value option)
VALIDITYBEGIN - Valid from date
Data type: BAPIP0021TW-VALIDBEGINOptional: No
Call by Reference: No ( called with pass by value option)
VALIDITYEND - Valid to date
Data type: BAPIP0021TW-VALIDENDOptional: No
Call by Reference: No ( called with pass by value option)
RECORDNUMBER - Number of infotype record
Data type: BAPIP0021TW-RECORDNROptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_FAMILYTW_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 BAPIP0021TW-EMPLOYEENO, " | |||
| lv_dateofbirth | TYPE BAPIP0021TW-DATEOFBIRTH, " | |||
| lv_placeofbirth | TYPE BAPIP0021TW-PLACEOFBIRTH, " | |||
| lv_landofcountry | TYPE BAPIP0021TW-COUNTRY, " | |||
| lv_zipcode | TYPE BAPIP0021TW-ZIPCODE, " | |||
| lv_streetandhouse | TYPE BAPIP0021TW-STREET, " | |||
| lv_telephoneno | TYPE BAPIP0021TW-TELEPHONENO, " | |||
| lv_idnumber | TYPE BAPIP0021TW-IDNUMBER, " | |||
| lv_idcheck | TYPE BAPIP0021TW-IDCHECK, " | |||
| lv_village | TYPE BAPIP0021TW-VILLAGE, " | |||
| lv_neighborhood | TYPE BAPIP0021TW-NEIGHBOR, " | |||
| lv_validitybegin | TYPE BAPIP0021TW-VALIDBEGIN, " | |||
| lv_employeenumber | TYPE BAPIP0021TW-EMPLOYEENO, " | |||
| lv_region | TYPE BAPIP0021TW-REGION, " | |||
| lv_countycode | TYPE BAPIP0021TW-COUNTYCODE, " | |||
| lv_relationship | TYPE BAPIP0021TW-RELATIONSHIP, " | |||
| lv_nameformatind | TYPE BAPIP0021TW-NAMEFORMATIND, " | |||
| lv_nameinpassport | TYPE BAPIP0021TW-NAMEINPASSPORT, " | |||
| lv_nhiforfamily | TYPE BAPIP0021TW-NHIFORFAMILY, " | |||
| lv_nhivaliddate | TYPE BAPIP0021TW-NHIVALIDDATE, " | |||
| lv_nhistatus | TYPE BAPIP0021TW-NHISTATUS, " | |||
| lv_nhistatusreason | TYPE BAPIP0021TW-NHISTREASON, " | |||
| lv_nhiexempt | TYPE BAPIP0021TW-NHIEXEMPT, " | |||
| lv_subtype | TYPE BAPIP0021TW-SUBTYPE, " | |||
| lv_validityend | TYPE BAPIP0021TW-VALIDEND, " | |||
| lv_nhiexemptreason | TYPE BAPIP0021TW-EXEMPTREASON, " | |||
| lv_disabilitylevel | TYPE BAPIP0021TW-DISABILITYLEV, " | |||
| lv_town | TYPE BAPIP0021TW-TOWN, " | |||
| lv_nocommit | TYPE BAPI_STAND-NO_COMMIT, " | |||
| lv_objectid | TYPE BAPIP0021TW-OBJECTID, " | |||
| lv_membertype | TYPE BAPIP0021TW-MEMBERTYPE, " | |||
| lv_firstname | TYPE BAPIP0021TW-FIRSTNAME, " | |||
| lv_lockindicator | TYPE BAPIP0021TW-LOCKINDIC, " | |||
| lv_lastname | TYPE BAPIP0021TW-LASTNAME, " | |||
| lv_validitybegin | TYPE BAPIP0021TW-VALIDBEGIN, " | |||
| lv_chinesename | TYPE BAPIP0021TW-CHINESENAME, " | |||
| lv_validityend | TYPE BAPIP0021TW-VALIDEND, " | |||
| lv_gender | TYPE BAPIP0021TW-GENDER, " | |||
| lv_recordnumber | TYPE BAPIP0021TW-RECORDNR, " | |||
| lv_nationality | TYPE BAPIP0021TW-NATIONALITY. " |
|   CALL FUNCTION 'BAPI_FAMILYTW_CREATE' "Family Taiwan: Create record |
| EXPORTING | ||
| EMPLOYEENUMBER | = lv_employeenumber | |
| DATEOFBIRTH | = lv_dateofbirth | |
| PLACEOFBIRTH | = lv_placeofbirth | |
| LANDOFCOUNTRY | = lv_landofcountry | |
| ZIPCODE | = lv_zipcode | |
| STREETANDHOUSE | = lv_streetandhouse | |
| TELEPHONENO | = lv_telephoneno | |
| IDNUMBER | = lv_idnumber | |
| IDCHECK | = lv_idcheck | |
| VILLAGE | = lv_village | |
| NEIGHBORHOOD | = lv_neighborhood | |
| VALIDITYBEGIN | = lv_validitybegin | |
| REGION | = lv_region | |
| COUNTYCODE | = lv_countycode | |
| RELATIONSHIP | = lv_relationship | |
| NAMEFORMATIND | = lv_nameformatind | |
| NAMEINPASSPORT | = lv_nameinpassport | |
| NHIFORFAMILY | = lv_nhiforfamily | |
| NHIVALIDDATE | = lv_nhivaliddate | |
| NHISTATUS | = lv_nhistatus | |
| NHISTATUSREASON | = lv_nhistatusreason | |
| NHIEXEMPT | = lv_nhiexempt | |
| VALIDITYEND | = lv_validityend | |
| NHIEXEMPTREASON | = lv_nhiexemptreason | |
| DISABILITYLEVEL | = lv_disabilitylevel | |
| TOWN | = lv_town | |
| NOCOMMIT | = lv_nocommit | |
| MEMBERTYPE | = lv_membertype | |
| FIRSTNAME | = lv_firstname | |
| LASTNAME | = lv_lastname | |
| CHINESENAME | = lv_chinesename | |
| GENDER | = lv_gender | |
| NATIONALITY | = lv_nationality | |
| 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_FAMILYTW_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_FAMILYTW_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 EMPLOYEENO FROM BAPIP0021TW INTO @DATA(ld_employeenumber). | ||||
| "SELECT single DATEOFBIRTH FROM BAPIP0021TW INTO @DATA(ld_dateofbirth). | ||||
| "SELECT single PLACEOFBIRTH FROM BAPIP0021TW INTO @DATA(ld_placeofbirth). | ||||
| "SELECT single COUNTRY FROM BAPIP0021TW INTO @DATA(ld_landofcountry). | ||||
| "SELECT single ZIPCODE FROM BAPIP0021TW INTO @DATA(ld_zipcode). | ||||
| "SELECT single STREET FROM BAPIP0021TW INTO @DATA(ld_streetandhouse). | ||||
| "SELECT single TELEPHONENO FROM BAPIP0021TW INTO @DATA(ld_telephoneno). | ||||
| "SELECT single IDNUMBER FROM BAPIP0021TW INTO @DATA(ld_idnumber). | ||||
| "SELECT single IDCHECK FROM BAPIP0021TW INTO @DATA(ld_idcheck). | ||||
| "SELECT single VILLAGE FROM BAPIP0021TW INTO @DATA(ld_village). | ||||
| "SELECT single NEIGHBOR FROM BAPIP0021TW INTO @DATA(ld_neighborhood). | ||||
| "SELECT single VALIDBEGIN FROM BAPIP0021TW INTO @DATA(ld_validitybegin). | ||||
| "SELECT single EMPLOYEENO FROM BAPIP0021TW INTO @DATA(ld_employeenumber). | ||||
| "SELECT single REGION FROM BAPIP0021TW INTO @DATA(ld_region). | ||||
| "SELECT single COUNTYCODE FROM BAPIP0021TW INTO @DATA(ld_countycode). | ||||
| "SELECT single RELATIONSHIP FROM BAPIP0021TW INTO @DATA(ld_relationship). | ||||
| "SELECT single NAMEFORMATIND FROM BAPIP0021TW INTO @DATA(ld_nameformatind). | ||||
| "SELECT single NAMEINPASSPORT FROM BAPIP0021TW INTO @DATA(ld_nameinpassport). | ||||
| "SELECT single NHIFORFAMILY FROM BAPIP0021TW INTO @DATA(ld_nhiforfamily). | ||||
| "SELECT single NHIVALIDDATE FROM BAPIP0021TW INTO @DATA(ld_nhivaliddate). | ||||
| "SELECT single NHISTATUS FROM BAPIP0021TW INTO @DATA(ld_nhistatus). | ||||
| "SELECT single NHISTREASON FROM BAPIP0021TW INTO @DATA(ld_nhistatusreason). | ||||
| "SELECT single NHIEXEMPT FROM BAPIP0021TW INTO @DATA(ld_nhiexempt). | ||||
| "SELECT single SUBTYPE FROM BAPIP0021TW INTO @DATA(ld_subtype). | ||||
| "SELECT single VALIDEND FROM BAPIP0021TW INTO @DATA(ld_validityend). | ||||
| "SELECT single EXEMPTREASON FROM BAPIP0021TW INTO @DATA(ld_nhiexemptreason). | ||||
| "SELECT single DISABILITYLEV FROM BAPIP0021TW INTO @DATA(ld_disabilitylevel). | ||||
| "SELECT single TOWN FROM BAPIP0021TW INTO @DATA(ld_town). | ||||
| "SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit). | ||||
| "SELECT single OBJECTID FROM BAPIP0021TW INTO @DATA(ld_objectid). | ||||
| "SELECT single MEMBERTYPE FROM BAPIP0021TW INTO @DATA(ld_membertype). | ||||
| "SELECT single FIRSTNAME FROM BAPIP0021TW INTO @DATA(ld_firstname). | ||||
| "SELECT single LOCKINDIC FROM BAPIP0021TW INTO @DATA(ld_lockindicator). | ||||
| "SELECT single LASTNAME FROM BAPIP0021TW INTO @DATA(ld_lastname). | ||||
| "SELECT single VALIDBEGIN FROM BAPIP0021TW INTO @DATA(ld_validitybegin). | ||||
| "SELECT single CHINESENAME FROM BAPIP0021TW INTO @DATA(ld_chinesename). | ||||
| "SELECT single VALIDEND FROM BAPIP0021TW INTO @DATA(ld_validityend). | ||||
| "SELECT single GENDER FROM BAPIP0021TW INTO @DATA(ld_gender). | ||||
| "SELECT single RECORDNR FROM BAPIP0021TW INTO @DATA(ld_recordnumber). | ||||
| "SELECT single NATIONALITY FROM BAPIP0021TW INTO @DATA(ld_nationality). | ||||
Search for further information about these or an SAP related objects