SAP Function Modules

BAPI_FAMILYID_REQUEST SAP Function module - Family ID: Create locked record







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

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


Pattern for FM BAPI_FAMILYID_REQUEST - BAPI FAMILYID REQUEST





CALL FUNCTION 'BAPI_FAMILYID_REQUEST' "Family ID: Create locked 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
*   completename =              " bapip0021-fcnam  Complete name
*   titel =                     " bapip0021-titel  Title
*   addltitle =                 " bapip0021-fnmzu  Other Title
*   nameformat =                " bapip0021-fknzn  Name format indicator for employee in a list
*   gender =                    " bapip0021-fasex  Gender key
*   birthplace =                " bapip0021-fgbot  Birthplace
*   dateofbirth =               " bapip0021-fgbdt  Date of birth
*   nationality =               " bapip0021-fanat  Nationality
*   countryofbirth =            " bapip0021-fgbld  Country of birth
*   marriagecert =              " bapip0021id-marriagecert  Marriage certificate
*   jobtitle =                  " bapip0021id-jobtitle  Job title
*   employername =              " bapip0021id-employername  Employer of family member (Indonesia)
*   taxdependent =              " bapip0021id-taxdependent  Dependent for Tax purposes (Yes/No)  (Indonesia)
*   idnumber =                  " bapip0021id-idnumber  Identity Card Number
*   idtype =                    " bapip0021id-idtype  Type of Identity Card (Indonesia)
*   idissuedate =               " bapip0021id-idissuedate  Date of Issue of Identity Card (Indonesia)
*   idissueplace =              " bapip0021id-idissueplace  Place of Issue of Identity Card
*   idexpirydate =              " bapip0021id-idexpirydate  Expiry Date of Identity Card (Indonesia)
*   phonenumber =               " bapip0021id-phonenumber  Telephone number
*   street =                    " bapip0021id-street  House number and street
*   2ndstreet =                 " bapip0021id-2ndstreet  2nd address line
*   city =                      " bapip0021id-city  City
*   postalcode =                " bapip0021id-postalcode  Postal code
*   district =                  " bapip0021id-district  District
*   addrcountrykey =            " bapip0021id-addrcountrykey  Country key
*   passportnumber =            " bapip0021id-passportnumber  Passport Number
*   passporttype =              " bapip0021id-passporttype  Passport Type
*   passissuedate =             " bapip0021id-passissuedate  Date of issue of Passport (Indonesia)
*   passexpirydate =            " bapip0021id-passexpirydate  Date of expiry of Passport (Indonesia)
*   passissueplace =            " bapip0021id-passissueplace  Place of Issue of Passport
*   passcountrykey =            " bapip0021id-passcountrykey  Country key
*   nocommit =                  " bapi_stand-no_commit  COMMIT control at BAPI interface
  IMPORTING
    return =                    " bapireturn1   Return messages
    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_FAMILYID_REQUEST

ABAP code example for Function Module BAPI_FAMILYID_REQUEST





The ABAP code below is a full code listing to execute function module BAPI_FAMILYID_REQUEST 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_completename) = some text here

DATA(ld_titel) = some text here

DATA(ld_addltitle) = some text here

DATA(ld_nameformat) = Check type of data required

DATA(ld_gender) = some text here

DATA(ld_birthplace) = some text here

DATA(ld_dateofbirth) = 20210129

DATA(ld_nationality) = some text here

DATA(ld_countryofbirth) = some text here

DATA(ld_marriagecert) = some text here

DATA(ld_jobtitle) = some text here

DATA(ld_employername) = some text here

DATA(ld_taxdependent) = some text here

DATA(ld_idnumber) = some text here

DATA(ld_idtype) = some text here

DATA(ld_idissuedate) = 20210129

DATA(ld_idissueplace) = some text here

DATA(ld_idexpirydate) = 20210129

DATA(ld_phonenumber) = some text here

DATA(ld_street) = some text here

DATA(ld_2ndstreet) = some text here

DATA(ld_city) = some text here

DATA(ld_postalcode) = some text here

DATA(ld_district) = some text here

DATA(ld_addrcountrykey) = some text here

DATA(ld_passportnumber) = some text here

DATA(ld_passporttype) = some text here

DATA(ld_passissuedate) = 20210129

DATA(ld_passexpirydate) = 20210129

DATA(ld_passissueplace) = some text here

DATA(ld_passcountrykey) = some text here

DATA(ld_nocommit) = some text here . CALL FUNCTION 'BAPI_FAMILYID_REQUEST' EXPORTING employeenumber = ld_employeenumber validitybegin = ld_validitybegin validityend = ld_validityend * membertype = ld_membertype * completename = ld_completename * titel = ld_titel * addltitle = ld_addltitle * nameformat = ld_nameformat * gender = ld_gender * birthplace = ld_birthplace * dateofbirth = ld_dateofbirth * nationality = ld_nationality * countryofbirth = ld_countryofbirth * marriagecert = ld_marriagecert * jobtitle = ld_jobtitle * employername = ld_employername * taxdependent = ld_taxdependent * idnumber = ld_idnumber * idtype = ld_idtype * idissuedate = ld_idissuedate * idissueplace = ld_idissueplace * idexpirydate = ld_idexpirydate * phonenumber = ld_phonenumber * street = ld_street * 2ndstreet = ld_2ndstreet * city = ld_city * postalcode = ld_postalcode * district = ld_district * addrcountrykey = ld_addrcountrykey * passportnumber = ld_passportnumber * passporttype = ld_passporttype * passissuedate = ld_passissuedate * passexpirydate = ld_passexpirydate * passissueplace = ld_passissueplace * passcountrykey = ld_passcountrykey * 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_FAMILYID_REQUEST
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_completename  TYPE BAPIP0021-FCNAM ,
ld_validitybegin  TYPE BAPIP0021-BEGDA ,
ld_titel  TYPE BAPIP0021-TITEL ,
ld_validityend  TYPE BAPIP0021-ENDDA ,
ld_addltitle  TYPE BAPIP0021-FNMZU ,
ld_recordnumber  TYPE BAPIP0021-SEQNR ,
ld_nameformat  TYPE BAPIP0021-FKNZN ,
ld_gender  TYPE BAPIP0021-FASEX ,
ld_birthplace  TYPE BAPIP0021-FGBOT ,
ld_dateofbirth  TYPE BAPIP0021-FGBDT ,
ld_nationality  TYPE BAPIP0021-FANAT ,
ld_countryofbirth  TYPE BAPIP0021-FGBLD ,
ld_marriagecert  TYPE BAPIP0021ID-MARRIAGECERT ,
ld_jobtitle  TYPE BAPIP0021ID-JOBTITLE ,
ld_employername  TYPE BAPIP0021ID-EMPLOYERNAME ,
ld_taxdependent  TYPE BAPIP0021ID-TAXDEPENDENT ,
ld_idnumber  TYPE BAPIP0021ID-IDNUMBER ,
ld_idtype  TYPE BAPIP0021ID-IDTYPE ,
ld_idissuedate  TYPE BAPIP0021ID-IDISSUEDATE ,
ld_idissueplace  TYPE BAPIP0021ID-IDISSUEPLACE ,
ld_idexpirydate  TYPE BAPIP0021ID-IDEXPIRYDATE ,
ld_phonenumber  TYPE BAPIP0021ID-PHONENUMBER ,
ld_street  TYPE BAPIP0021ID-STREET ,
ld_2ndstreet  TYPE BAPIP0021ID-2NDSTREET ,
ld_city  TYPE BAPIP0021ID-CITY ,
ld_postalcode  TYPE BAPIP0021ID-POSTALCODE ,
ld_district  TYPE BAPIP0021ID-DISTRICT ,
ld_addrcountrykey  TYPE BAPIP0021ID-ADDRCOUNTRYKEY ,
ld_passportnumber  TYPE BAPIP0021ID-PASSPORTNUMBER ,
ld_passporttype  TYPE BAPIP0021ID-PASSPORTTYPE ,
ld_passissuedate  TYPE BAPIP0021ID-PASSISSUEDATE ,
ld_passexpirydate  TYPE BAPIP0021ID-PASSEXPIRYDATE ,
ld_passissueplace  TYPE BAPIP0021ID-PASSISSUEPLACE ,
ld_passcountrykey  TYPE BAPIP0021ID-PASSCOUNTRYKEY ,
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_completename = some text here

ld_titel = some text here

ld_addltitle = some text here

ld_nameformat = Check type of data required

ld_gender = some text here

ld_birthplace = some text here

ld_dateofbirth = 20210129

ld_nationality = some text here

ld_countryofbirth = some text here

ld_marriagecert = some text here

ld_jobtitle = some text here

ld_employername = some text here

ld_taxdependent = some text here

ld_idnumber = some text here

ld_idtype = some text here

ld_idissuedate = 20210129

ld_idissueplace = some text here

ld_idexpirydate = 20210129

ld_phonenumber = some text here

ld_street = some text here

ld_2ndstreet = some text here

ld_city = some text here

ld_postalcode = some text here

ld_district = some text here

ld_addrcountrykey = some text here

ld_passportnumber = some text here

ld_passporttype = some text here

ld_passissuedate = 20210129

ld_passexpirydate = 20210129

ld_passissueplace = some text here

ld_passcountrykey = some text here

ld_nocommit = some text here

SAP Documentation for FM BAPI_FAMILYID_REQUEST


You can use this method to create locked family/related-person records for ID employees (infotypes 0021/0318). ...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_FAMILYID_REQUEST or its description.