SAP Function Modules

BAPI_FAMILYTW_SIMULATECREATION SAP Function module - Family Taiwan: Simulate Create record







BAPI_FAMILYTW_SIMULATECREATION is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BAPI_FAMILYTW_SIMULATECREATION into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: PFAM_TW
Released Date: 28.01.2000
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_FAMILYTW_SIMULATECREATION - BAPI FAMILYTW SIMULATECREATION





CALL FUNCTION 'BAPI_FAMILYTW_SIMULATECREATION' "Family Taiwan: Simulate Create record
  EXPORTING
    employeenumber =            " bapip0021tw-employeeno  Personnel number
    validitybegin =             " bapip0021tw-validbegin  Valid from date
    validityend =               " bapip0021tw-validend  Valid to date
    membertype =                " bapip0021tw-membertype  Type of family record
*   firstname =                 " bapip0021tw-firstname  First name
*   lastname =                  " bapip0021tw-lastname  Last name
*   chinesename =               " bapip0021tw-chinesename  Chinese name
*   gender =                    " bapip0021tw-gender  Gender
*   nationality =               " bapip0021tw-nationality  Nationality
*   dateofbirth =               " bapip0021tw-dateofbirth  Date of birth
*   placeofbirth =              " bapip0021tw-placeofbirth  Place of birth
*   landofcountry =             " bapip0021tw-country  Land of country
*   zipcode =                   " bapip0021tw-zipcode  Zip code for Taiwan
*   streetandhouse =            " bapip0021tw-street  Street and house number
*   telephoneno =               " bapip0021tw-telephoneno  Telephone number
*   idnumber =                  " bapip0021tw-idnumber  ID number
*   idcheck =                   " bapip0021tw-idcheck  ID number check error flag
*   village =                   " bapip0021tw-village  Village
*   neighborhood =              " bapip0021tw-neighbor  Neighborhood
*   region =                    " bapip0021tw-region  Region (State, Province, County)
*   countycode =                " bapip0021tw-countycode  County code
*   relationship =              " bapip0021tw-relationship  Relationship to employee
*   nameformatind =             " bapip0021tw-nameformatind  Name Format Indicator for Employee in a List
*   nameinpassport =            " bapip0021tw-nameinpassport  Complete Name
*   nhiforfamily =              " bapip0021tw-nhiforfamily  NHI for family member
*   nhivaliddate =              " bapip0021tw-nhivaliddate  NHI contribution from
*   nhistatus =                 " bapip0021tw-nhistatus  NHI status
*   nhistatusreason =           " bapip0021tw-nhistreason  NHI status reason
*   nhiexempt =                 " bapip0021tw-nhiexempt  NHI exempt by law
*   nhiexemptreason =           " bapip0021tw-exemptreason  Reason for exemption
*   disabilitylevel =           " bapip0021tw-disabilitylev  Disability grade
*   town =                      " bapip0021tw-town  Town
*   nocommit =                  " bapi_stand-no_commit  COMMIT control at BAPI interface
  IMPORTING
    return =                    " bapireturn1   Structure for return code
    employeenumber =            " bapip0021tw-employeeno  Personnel number
    subtype =                   " bapip0021tw-subtype  Subtype
    objectid =                  " bapip0021tw-objectid  Object identification
    lockindicator =             " bapip0021tw-lockindic  Lock indicator for HR master record
    validitybegin =             " bapip0021tw-validbegin  Valid from date
    validityend =               " bapip0021tw-validend  Valid to date
    recordnumber =              " bapip0021tw-recordnr  Number of infotype record
    .  "  BAPI_FAMILYTW_SIMULATECREATION

ABAP code example for Function Module BAPI_FAMILYTW_SIMULATECREATION





The ABAP code below is a full code listing to execute function module BAPI_FAMILYTW_SIMULATECREATION including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_return  TYPE BAPIRETURN1 ,
ld_employeenumber  TYPE BAPIP0021TW-EMPLOYEENO ,
ld_subtype  TYPE BAPIP0021TW-SUBTYPE ,
ld_objectid  TYPE BAPIP0021TW-OBJECTID ,
ld_lockindicator  TYPE BAPIP0021TW-LOCKINDIC ,
ld_validitybegin  TYPE BAPIP0021TW-VALIDBEGIN ,
ld_validityend  TYPE BAPIP0021TW-VALIDEND ,
ld_recordnumber  TYPE BAPIP0021TW-RECORDNR .


DATA(ld_employeenumber) = Check type of data required

DATA(ld_validitybegin) = 20210129

DATA(ld_validityend) = 20210129

DATA(ld_membertype) = some text here

DATA(ld_firstname) = some text here

DATA(ld_lastname) = some text here

DATA(ld_chinesename) = some text here

DATA(ld_gender) = some text here

DATA(ld_nationality) = some text here

DATA(ld_dateofbirth) = 20210129

DATA(ld_placeofbirth) = some text here

DATA(ld_landofcountry) = some text here

DATA(ld_zipcode) = some text here

DATA(ld_streetandhouse) = some text here

DATA(ld_telephoneno) = some text here

DATA(ld_idnumber) = some text here

DATA(ld_idcheck) = some text here

DATA(ld_village) = some text here

DATA(ld_neighborhood) = some text here

DATA(ld_region) = some text here

DATA(ld_countycode) = some text here

DATA(ld_relationship) = some text here

DATA(ld_nameformatind) = Check type of data required

DATA(ld_nameinpassport) = some text here

DATA(ld_nhiforfamily) = some text here

DATA(ld_nhivaliddate) = 20210129

DATA(ld_nhistatus) = some text here

DATA(ld_nhistatusreason) = some text here

DATA(ld_nhiexempt) = some text here

DATA(ld_nhiexemptreason) = some text here

DATA(ld_disabilitylevel) = some text here

DATA(ld_town) = some text here

DATA(ld_nocommit) = some text here . CALL FUNCTION 'BAPI_FAMILYTW_SIMULATECREATION' EXPORTING employeenumber = ld_employeenumber validitybegin = ld_validitybegin validityend = ld_validityend membertype = ld_membertype * firstname = ld_firstname * lastname = ld_lastname * chinesename = ld_chinesename * gender = ld_gender * nationality = ld_nationality * dateofbirth = ld_dateofbirth * placeofbirth = ld_placeofbirth * landofcountry = ld_landofcountry * zipcode = ld_zipcode * streetandhouse = ld_streetandhouse * telephoneno = ld_telephoneno * idnumber = ld_idnumber * idcheck = ld_idcheck * village = ld_village * neighborhood = ld_neighborhood * region = ld_region * countycode = ld_countycode * relationship = ld_relationship * nameformatind = ld_nameformatind * nameinpassport = ld_nameinpassport * nhiforfamily = ld_nhiforfamily * nhivaliddate = ld_nhivaliddate * nhistatus = ld_nhistatus * nhistatusreason = ld_nhistatusreason * nhiexempt = ld_nhiexempt * nhiexemptreason = ld_nhiexemptreason * disabilitylevel = ld_disabilitylevel * town = ld_town * nocommit = ld_nocommit IMPORTING return = ld_return employeenumber = ld_employeenumber subtype = ld_subtype objectid = ld_objectid lockindicator = ld_lockindicator validitybegin = ld_validitybegin validityend = ld_validityend recordnumber = ld_recordnumber . " BAPI_FAMILYTW_SIMULATECREATION
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_return  TYPE BAPIRETURN1 ,
ld_employeenumber  TYPE BAPIP0021TW-EMPLOYEENO ,
ld_employeenumber  TYPE BAPIP0021TW-EMPLOYEENO ,
ld_validitybegin  TYPE BAPIP0021TW-VALIDBEGIN ,
ld_subtype  TYPE BAPIP0021TW-SUBTYPE ,
ld_validityend  TYPE BAPIP0021TW-VALIDEND ,
ld_objectid  TYPE BAPIP0021TW-OBJECTID ,
ld_membertype  TYPE BAPIP0021TW-MEMBERTYPE ,
ld_lockindicator  TYPE BAPIP0021TW-LOCKINDIC ,
ld_firstname  TYPE BAPIP0021TW-FIRSTNAME ,
ld_validitybegin  TYPE BAPIP0021TW-VALIDBEGIN ,
ld_lastname  TYPE BAPIP0021TW-LASTNAME ,
ld_validityend  TYPE BAPIP0021TW-VALIDEND ,
ld_chinesename  TYPE BAPIP0021TW-CHINESENAME ,
ld_recordnumber  TYPE BAPIP0021TW-RECORDNR ,
ld_gender  TYPE BAPIP0021TW-GENDER ,
ld_nationality  TYPE BAPIP0021TW-NATIONALITY ,
ld_dateofbirth  TYPE BAPIP0021TW-DATEOFBIRTH ,
ld_placeofbirth  TYPE BAPIP0021TW-PLACEOFBIRTH ,
ld_landofcountry  TYPE BAPIP0021TW-COUNTRY ,
ld_zipcode  TYPE BAPIP0021TW-ZIPCODE ,
ld_streetandhouse  TYPE BAPIP0021TW-STREET ,
ld_telephoneno  TYPE BAPIP0021TW-TELEPHONENO ,
ld_idnumber  TYPE BAPIP0021TW-IDNUMBER ,
ld_idcheck  TYPE BAPIP0021TW-IDCHECK ,
ld_village  TYPE BAPIP0021TW-VILLAGE ,
ld_neighborhood  TYPE BAPIP0021TW-NEIGHBOR ,
ld_region  TYPE BAPIP0021TW-REGION ,
ld_countycode  TYPE BAPIP0021TW-COUNTYCODE ,
ld_relationship  TYPE BAPIP0021TW-RELATIONSHIP ,
ld_nameformatind  TYPE BAPIP0021TW-NAMEFORMATIND ,
ld_nameinpassport  TYPE BAPIP0021TW-NAMEINPASSPORT ,
ld_nhiforfamily  TYPE BAPIP0021TW-NHIFORFAMILY ,
ld_nhivaliddate  TYPE BAPIP0021TW-NHIVALIDDATE ,
ld_nhistatus  TYPE BAPIP0021TW-NHISTATUS ,
ld_nhistatusreason  TYPE BAPIP0021TW-NHISTREASON ,
ld_nhiexempt  TYPE BAPIP0021TW-NHIEXEMPT ,
ld_nhiexemptreason  TYPE BAPIP0021TW-EXEMPTREASON ,
ld_disabilitylevel  TYPE BAPIP0021TW-DISABILITYLEV ,
ld_town  TYPE BAPIP0021TW-TOWN ,
ld_nocommit  TYPE BAPI_STAND-NO_COMMIT .


ld_employeenumber = Check type of data required

ld_validitybegin = 20210129

ld_validityend = 20210129

ld_membertype = some text here

ld_firstname = some text here

ld_lastname = some text here

ld_chinesename = some text here

ld_gender = some text here

ld_nationality = some text here

ld_dateofbirth = 20210129

ld_placeofbirth = some text here

ld_landofcountry = some text here

ld_zipcode = some text here

ld_streetandhouse = some text here

ld_telephoneno = some text here

ld_idnumber = some text here

ld_idcheck = some text here

ld_village = some text here

ld_neighborhood = some text here

ld_region = some text here

ld_countycode = some text here

ld_relationship = some text here

ld_nameformatind = Check type of data required

ld_nameinpassport = some text here

ld_nhiforfamily = some text here

ld_nhivaliddate = 20210129

ld_nhistatus = some text here

ld_nhistatusreason = some text here

ld_nhiexempt = some text here

ld_nhiexemptreason = some text here

ld_disabilitylevel = some text here

ld_town = some text here

ld_nocommit = some text here

SAP Documentation for FM BAPI_FAMILYTW_SIMULATECREATION


You can use this method to simulate the creation of Family/Related Person Records (0021 and 0352) for an employee in Taiwan. ...See here for full SAP fm documentation




Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_FAMILYTW_SIMULATECREATION or its description.