SAP Function Modules

BAPI_FAMILYZA_CREATE SAP Function module - Create family







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

Associated Function Group: PFAM_ZA
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_FAMILYZA_CREATE - BAPI FAMILYZA CREATE





CALL FUNCTION 'BAPI_FAMILYZA_CREATE' "Create family
  EXPORTING
    employeenumber =            " bapip0021-pernr  Personnel number
    validitybegin =             " bapip0021-begda  Start date
    validityend =               " bapip0021-endda  End date
*   membertype =                " bapip0021-famsa  Type of family record
*   firstname =                 " bapip0021-favor  First name
*   lastname =                  " bapip0021-fanam  Last name
*   secondname =                " bapip0021-fnac2  Second name
*   academictitle =             " bapip0021-titel  Title
*   surnameprefix =             " bapip0021-fvrsw  Name affix
*   secondsurnameprefix =       " bapip0021-fvrs2  Name affix
*   aristocratictitle =         " bapip0021-fnmzu  Title
*   fullname =                  " bapip0021-fcnam  Full employee name
*   maidenname =                " bapip0021-fgbna  Name at birth
*   initials =                  " bapip0021-finit  Employee's initials
*   gender =                    " bapip0021-fasex  Gender key
*   dateofbirth =               " bapip0021-fgbdt  Date of birth
*   placeofbirth =              " bapip0021-fgbot  Birthplace
*   stateofbirth =              " bapip0021-fgdep  State
*   landofbirth =               " bapip0021-fgbld  Country of birth
*   nationality =               " bapip0021-fanat  Nationality
*   nationality2 =              " bapip0021-fana2  Second nationality
*   nationality3 =              " bapip0021-fana3  Third nationality
*   memberemployer =            " bapip0021-egaga  Employer of family member
*   memberrefnumber =           " bapip0021-erbnr  Reference personnel number of family member
*   name_format_indicator =     " bapip0021-fknzn  COMMIT control at BAPI interface
*   nocommit =                  " bapi_stand-no_commit  COMMIT control at BAPI interface
  IMPORTING
    return =                    " bapireturn1   Structure for return code
    subtype =                   " bapip0021-subty  Subtype
    objectid =                  " bapip0021-objps  Object identification
    lockindicator =             " bapip0021-sprps  Lock indicator for HR master record
    recordnumber =              " bapip0021-seqnr  Number of infotype record with same key
    .  "  BAPI_FAMILYZA_CREATE

ABAP code example for Function Module BAPI_FAMILYZA_CREATE





The ABAP code below is a full code listing to execute function module BAPI_FAMILYZA_CREATE 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_subtype  TYPE BAPIP0021-SUBTY ,
ld_objectid  TYPE BAPIP0021-OBJPS ,
ld_lockindicator  TYPE BAPIP0021-SPRPS ,
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_firstname) = some text here

DATA(ld_lastname) = some text here

DATA(ld_secondname) = some text here

DATA(ld_academictitle) = some text here

DATA(ld_surnameprefix) = some text here

DATA(ld_secondsurnameprefix) = some text here

DATA(ld_aristocratictitle) = some text here

DATA(ld_fullname) = some text here

DATA(ld_maidenname) = some text here

DATA(ld_initials) = 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_nationality2) = some text here

DATA(ld_nationality3) = some text here

DATA(ld_memberemployer) = some text here

DATA(ld_memberrefnumber) = some text here

DATA(ld_name_format_indicator) = Check type of data required

DATA(ld_nocommit) = some text here . CALL FUNCTION 'BAPI_FAMILYZA_CREATE' EXPORTING employeenumber = ld_employeenumber validitybegin = ld_validitybegin validityend = ld_validityend * membertype = ld_membertype * firstname = ld_firstname * lastname = ld_lastname * secondname = ld_secondname * academictitle = ld_academictitle * surnameprefix = ld_surnameprefix * secondsurnameprefix = ld_secondsurnameprefix * aristocratictitle = ld_aristocratictitle * fullname = ld_fullname * maidenname = ld_maidenname * initials = ld_initials * gender = ld_gender * dateofbirth = ld_dateofbirth * placeofbirth = ld_placeofbirth * stateofbirth = ld_stateofbirth * landofbirth = ld_landofbirth * nationality = ld_nationality * nationality2 = ld_nationality2 * nationality3 = ld_nationality3 * memberemployer = ld_memberemployer * memberrefnumber = ld_memberrefnumber * name_format_indicator = ld_name_format_indicator * nocommit = ld_nocommit IMPORTING return = ld_return subtype = ld_subtype objectid = ld_objectid lockindicator = ld_lockindicator recordnumber = ld_recordnumber . " BAPI_FAMILYZA_CREATE
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_subtype  TYPE BAPIP0021-SUBTY ,
ld_validitybegin  TYPE BAPIP0021-BEGDA ,
ld_objectid  TYPE BAPIP0021-OBJPS ,
ld_validityend  TYPE BAPIP0021-ENDDA ,
ld_lockindicator  TYPE BAPIP0021-SPRPS ,
ld_membertype  TYPE BAPIP0021-FAMSA ,
ld_recordnumber  TYPE BAPIP0021-SEQNR ,
ld_firstname  TYPE BAPIP0021-FAVOR ,
ld_lastname  TYPE BAPIP0021-FANAM ,
ld_secondname  TYPE BAPIP0021-FNAC2 ,
ld_academictitle  TYPE BAPIP0021-TITEL ,
ld_surnameprefix  TYPE BAPIP0021-FVRSW ,
ld_secondsurnameprefix  TYPE BAPIP0021-FVRS2 ,
ld_aristocratictitle  TYPE BAPIP0021-FNMZU ,
ld_fullname  TYPE BAPIP0021-FCNAM ,
ld_maidenname  TYPE BAPIP0021-FGBNA ,
ld_initials  TYPE BAPIP0021-FINIT ,
ld_gender  TYPE BAPIP0021-FASEX ,
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_nationality2  TYPE BAPIP0021-FANA2 ,
ld_nationality3  TYPE BAPIP0021-FANA3 ,
ld_memberemployer  TYPE BAPIP0021-EGAGA ,
ld_memberrefnumber  TYPE BAPIP0021-ERBNR ,
ld_name_format_indicator  TYPE BAPIP0021-FKNZN ,
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_secondname = some text here

ld_academictitle = some text here

ld_surnameprefix = some text here

ld_secondsurnameprefix = some text here

ld_aristocratictitle = some text here

ld_fullname = some text here

ld_maidenname = some text here

ld_initials = 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_nationality2 = some text here

ld_nationality3 = some text here

ld_memberemployer = some text here

ld_memberrefnumber = some text here

ld_name_format_indicator = Check type of data required

ld_nocommit = some text here

SAP Documentation for FM BAPI_FAMILYZA_CREATE


You can use this method to change a Family/Related Person (0021) record. ...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_FAMILYZA_CREATE or its description.