SAP Function Modules

BAPI_FAMILYJP_SIMULATECREATION SAP Function module - Family Japan: Simulate Create record







BAPI_FAMILYJP_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_FAMILYJP_SIMULATECREATION into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: PFAM_JP
Released Date: 16.12.1998
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_FAMILYJP_SIMULATECREATION - BAPI FAMILYJP SIMULATECREATION





CALL FUNCTION 'BAPI_FAMILYJP_SIMULATECREATION' "Family Japan: Simulate Create record
  EXPORTING
    employeenumber =            " bapip0021-pernr  Personnel number
    validitybegin =             " bapip0021-begda  Valid from date
    validityend =               " bapip0021-endda  Valid to date
    membertype =                " bapip0021-famsa  Type of family record
*   firstnameromaji =           " bapip0021-favor  First name (Romaji)
*   lastnameromaji =            " bapip0021-fanam  Last name (Romaji)
*   gender =                    " bapip0021-fasex  Gender
*   dateofbirth =               " bapip0021-fgbdt  Date of birth
*   placeofbirth =              " bapip0021-fgbot  Birthplace
*   stateofbirth =              " bapip0021-fgdep  State
*   landofbirth =               " bapip0021-fgbld  Country of birth
*   nationality =               " bapip0021-fanat  Nationality
*   firstname =                 " bapip0148-firstname  First name
*   lastname =                  " bapip0148-lastname  Last name
*   firstnamekatakana =         " bapip0148-firstnamekana  First name (Katakana)
*   lastnamekatakana =          " bapip0148-lastnamekana  Last name (Katakana)
*   childtype =                 " bapip0148-childtype  Child type
*   reason =                    " bapip0148-reason  Reason for changing record
*   dependent =                 " bapip0148-dependent  Dependent in taxation
*   theold =                    " bapip0148-theold  Old family member in taxation
*   handicap =                  " bapip0148-handicap  Handicapped family member in taxation
*   livewith =                  " bapip0148-livewith  Family member living with in taxation
*   insurance =                 " bapip0148-insurance  Health insurance in taxation
*   allowance =                 " bapip0148-allowance  Family allowance
*   yea =                       " bapip0148-yea  Year End Adjustment
*   death =                     " bapip0148-death  Death in taxation
*   nonresidence =              " bapip0148-nonresidence  Non-residence in taxation
*   nameformat =                " bapip0148-nameformat  Name format
*   nocommit =                  " bapi_stand-no_commit  COMMIT control at BAPI interface
  IMPORTING
    return =                    " bapireturn1   Structure for return code
    employeenumber =            " bapip0021-pernr  Personnel number
    subtype =                   " bapip0021-subty  Subtype
    objectid =                  " bapip0021-objps  Object identification
    lockindicator =             " bapip0021-sprps  Lock indicator for HR master record
    validitybegin =             " bapip0021-begda  Valid from date
    validityend =               " bapip0021-endda  Valid to date
    recordnumber =              " bapip0021-seqnr  Number of infotype record
    .  "  BAPI_FAMILYJP_SIMULATECREATION

ABAP code example for Function Module BAPI_FAMILYJP_SIMULATECREATION





The ABAP code below is a full code listing to execute function module BAPI_FAMILYJP_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 BAPIP0021-PERNR ,
ld_subtype  TYPE BAPIP0021-SUBTY ,
ld_objectid  TYPE BAPIP0021-OBJPS ,
ld_lockindicator  TYPE BAPIP0021-SPRPS ,
ld_validitybegin  TYPE BAPIP0021-BEGDA ,
ld_validityend  TYPE BAPIP0021-ENDDA ,
ld_recordnumber  TYPE BAPIP0021-SEQNR .


DATA(ld_employeenumber) = Check type of data required

DATA(ld_validitybegin) = 20210129

DATA(ld_validityend) = 20210129

DATA(ld_membertype) = some text here

DATA(ld_firstnameromaji) = some text here

DATA(ld_lastnameromaji) = some text here

DATA(ld_gender) = some text here

DATA(ld_dateofbirth) = 20210129

DATA(ld_placeofbirth) = some text here

DATA(ld_stateofbirth) = some text here

DATA(ld_landofbirth) = some text here

DATA(ld_nationality) = some text here

DATA(ld_firstname) = some text here

DATA(ld_lastname) = some text here

DATA(ld_firstnamekatakana) = some text here

DATA(ld_lastnamekatakana) = some text here

DATA(ld_childtype) = some text here

DATA(ld_reason) = some text here

DATA(ld_dependent) = some text here

DATA(ld_theold) = some text here

DATA(ld_handicap) = some text here

DATA(ld_livewith) = some text here

DATA(ld_insurance) = some text here

DATA(ld_allowance) = some text here

DATA(ld_yea) = some text here

DATA(ld_death) = some text here

DATA(ld_nonresidence) = some text here

DATA(ld_nameformat) = Check type of data required

DATA(ld_nocommit) = some text here . CALL FUNCTION 'BAPI_FAMILYJP_SIMULATECREATION' EXPORTING employeenumber = ld_employeenumber validitybegin = ld_validitybegin validityend = ld_validityend membertype = ld_membertype * firstnameromaji = ld_firstnameromaji * lastnameromaji = ld_lastnameromaji * gender = ld_gender * dateofbirth = ld_dateofbirth * placeofbirth = ld_placeofbirth * stateofbirth = ld_stateofbirth * landofbirth = ld_landofbirth * nationality = ld_nationality * firstname = ld_firstname * lastname = ld_lastname * firstnamekatakana = ld_firstnamekatakana * lastnamekatakana = ld_lastnamekatakana * childtype = ld_childtype * reason = ld_reason * dependent = ld_dependent * theold = ld_theold * handicap = ld_handicap * livewith = ld_livewith * insurance = ld_insurance * allowance = ld_allowance * yea = ld_yea * death = ld_death * nonresidence = ld_nonresidence * nameformat = ld_nameformat * 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_FAMILYJP_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 BAPIP0021-PERNR ,
ld_employeenumber  TYPE BAPIP0021-PERNR ,
ld_validitybegin  TYPE BAPIP0021-BEGDA ,
ld_subtype  TYPE BAPIP0021-SUBTY ,
ld_validityend  TYPE BAPIP0021-ENDDA ,
ld_objectid  TYPE BAPIP0021-OBJPS ,
ld_membertype  TYPE BAPIP0021-FAMSA ,
ld_lockindicator  TYPE BAPIP0021-SPRPS ,
ld_firstnameromaji  TYPE BAPIP0021-FAVOR ,
ld_validitybegin  TYPE BAPIP0021-BEGDA ,
ld_lastnameromaji  TYPE BAPIP0021-FANAM ,
ld_validityend  TYPE BAPIP0021-ENDDA ,
ld_gender  TYPE BAPIP0021-FASEX ,
ld_recordnumber  TYPE BAPIP0021-SEQNR ,
ld_dateofbirth  TYPE BAPIP0021-FGBDT ,
ld_placeofbirth  TYPE BAPIP0021-FGBOT ,
ld_stateofbirth  TYPE BAPIP0021-FGDEP ,
ld_landofbirth  TYPE BAPIP0021-FGBLD ,
ld_nationality  TYPE BAPIP0021-FANAT ,
ld_firstname  TYPE BAPIP0148-FIRSTNAME ,
ld_lastname  TYPE BAPIP0148-LASTNAME ,
ld_firstnamekatakana  TYPE BAPIP0148-FIRSTNAMEKANA ,
ld_lastnamekatakana  TYPE BAPIP0148-LASTNAMEKANA ,
ld_childtype  TYPE BAPIP0148-CHILDTYPE ,
ld_reason  TYPE BAPIP0148-REASON ,
ld_dependent  TYPE BAPIP0148-DEPENDENT ,
ld_theold  TYPE BAPIP0148-THEOLD ,
ld_handicap  TYPE BAPIP0148-HANDICAP ,
ld_livewith  TYPE BAPIP0148-LIVEWITH ,
ld_insurance  TYPE BAPIP0148-INSURANCE ,
ld_allowance  TYPE BAPIP0148-ALLOWANCE ,
ld_yea  TYPE BAPIP0148-YEA ,
ld_death  TYPE BAPIP0148-DEATH ,
ld_nonresidence  TYPE BAPIP0148-NONRESIDENCE ,
ld_nameformat  TYPE BAPIP0148-NAMEFORMAT ,
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_firstnameromaji = some text here

ld_lastnameromaji = some text here

ld_gender = some text here

ld_dateofbirth = 20210129

ld_placeofbirth = some text here

ld_stateofbirth = some text here

ld_landofbirth = some text here

ld_nationality = some text here

ld_firstname = some text here

ld_lastname = some text here

ld_firstnamekatakana = some text here

ld_lastnamekatakana = some text here

ld_childtype = some text here

ld_reason = some text here

ld_dependent = some text here

ld_theold = some text here

ld_handicap = some text here

ld_livewith = some text here

ld_insurance = some text here

ld_allowance = some text here

ld_yea = some text here

ld_death = some text here

ld_nonresidence = some text here

ld_nameformat = Check type of data required

ld_nocommit = some text here

SAP Documentation for FM BAPI_FAMILYJP_SIMULATECREATION


You can use this method to create a locked Family/Related Person record (0021 and 0148) for an employee in Japan. ...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_FAMILYJP_SIMULATECREATION or its description.