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-EMPLOYEENO
Optional: No
Call by Reference: No ( called with pass by value option)

DATEOFBIRTH - Date of birth

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

PLACEOFBIRTH - Place of birth

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

LANDOFCOUNTRY - Land of country

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

ZIPCODE - Zip code

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

STREETANDHOUSE - Street and house number

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

TELEPHONENO - Telephone number

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

IDNUMBER - ID number

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

IDCHECK - ID number check error flag

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

VILLAGE - Village

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

NEIGHBORHOOD - Neighborhood

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

VALIDITYBEGIN - Valid from date

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

REGION - Region (State, Province, County)

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

COUNTYCODE - County code

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

RELATIONSHIP - Relationship to employee

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

NAMEFORMATIND - Name Format Indicator for Employee in a List

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

NAMEINPASSPORT - Complete Name

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

NHIFORFAMILY - NHI for family member

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

NHIVALIDDATE - NHI contribution from

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

NHISTATUS - NHI status

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

NHISTATUSREASON - NHI status reason

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

NHIEXEMPT - NHI exempt by law

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

VALIDITYEND - Valid to date

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

NHIEXEMPTREASON - Reason for exemption

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

DISABILITYLEVEL - Disability grade

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

TOWN - Town

Data type: BAPIP0021TW-TOWN
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)

MEMBERTYPE - Type of family record

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

FIRSTNAME - First name

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

LASTNAME - Last name

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

CHINESENAME - Chinese name

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

GENDER - Gender

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

NATIONALITY - Nationality

Data type: BAPIP0021TW-NATIONALITY
Optional: 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: BAPIRETURN1
Optional: No
Call by Reference: No ( called with pass by value option)

EMPLOYEENUMBER - Personnel number

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

SUBTYPE - Subtype

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

OBJECTID - Object identification

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

LOCKINDICATOR - Lock indicator for HR master record

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

VALIDITYBEGIN - Valid from date

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

VALIDITYEND - Valid to date

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

RECORDNUMBER - Number of infotype record

Data type: BAPIP0021TW-RECORDNR
Optional: 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



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!