SAP Function Modules

BAPI_FAMILYPL_REQUEST SAP Function module







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

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


Pattern for FM BAPI_FAMILYPL_REQUEST - BAPI FAMILYPL REQUEST





CALL FUNCTION 'BAPI_FAMILYPL_REQUEST' "
  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
*   firstname =                 " bapip0021-favor  First name
*   lastname =                  " bapip0021-fanam  Last name
*   maidenname =                " bapip0021-fgbna  Name at birth
*   gender =                    " bapip0021-fasex  Gender key
*   dateofbirth =               " bapip0021-fgbdt  Date of birth
*   nationality =               " bapip0021-fanat  Nationality
*   nationality2 =              " bapip0021-fana2  Second nationality
*   nationality3 =              " bapip0021-fana3  Third nationality
*   refpersno =                 " bapip0021us-refpersno  Reference personnel number
*   idnumber =                  " bapip0021us-idnumber  ID number
*   phonenumber =               " bapip0021us-phonenumber  Telephone number
*   streetandhouseno =          " bapip0021us-streetandhouse  Street and house number
*   secondaddressline =         " bapip0021us-secondaddrline  Second address line
*   city =                      " bapip0021us-city  City
*   state =                     " bapip0021us-state  State
*   postalcode =                " bapip0021us-postalcode  Postal code
*   country =                   " bapip0021us-country  Country
*   dateofseparation =          " bapip0021us-dateofsep  Legal separation date
*   nameofphysician1 =          " bapip0021us-nameofphys1  Name of physician 1
*   physicianid1 =              " bapip0021us-physicianid1  ID of physician1
*   nameofphysician2 =          " bapip0021us-nameofphys2  Name of physician 2
*   physicianid2 =              " bapip0021us-physicianid2  ID of physician2
*   student =                   " bapip0021us-student  Student indicator
*   cobra =                     " bapip0021us-cobra  COBRA indicator
*   medicare =                  " bapip0021us-medicare  Medicare indicator
*   smoker =                    " bapip0021us-smoker  Smoker indicator
*   disability =                " bapip0021us-disability  Disability indicator
*   dateofdisability =          " bapip0021us-dateofdisab  Date of disability
*   datedisablearned =          " bapip0021us-datedisablearn  Date employer learned of employee's disability
*   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_FAMILYPL_REQUEST

ABAP code example for Function Module BAPI_FAMILYPL_REQUEST





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

DATA(ld_lastname) = some text here

DATA(ld_maidenname) = some text here

DATA(ld_gender) = some text here

DATA(ld_dateofbirth) = 20210129

DATA(ld_nationality) = some text here

DATA(ld_nationality2) = some text here

DATA(ld_nationality3) = some text here

DATA(ld_refpersno) = some text here

DATA(ld_idnumber) = some text here

DATA(ld_phonenumber) = some text here

DATA(ld_streetandhouseno) = some text here

DATA(ld_secondaddressline) = some text here

DATA(ld_city) = some text here

DATA(ld_state) = some text here

DATA(ld_postalcode) = some text here

DATA(ld_country) = some text here

DATA(ld_dateofseparation) = 20210129

DATA(ld_nameofphysician1) = some text here

DATA(ld_physicianid1) = some text here

DATA(ld_nameofphysician2) = some text here

DATA(ld_physicianid2) = some text here

DATA(ld_student) = some text here

DATA(ld_cobra) = some text here

DATA(ld_medicare) = some text here

DATA(ld_smoker) = some text here

DATA(ld_disability) = some text here

DATA(ld_dateofdisability) = 20210129

DATA(ld_datedisablearned) = 20210129

DATA(ld_nocommit) = some text here . CALL FUNCTION 'BAPI_FAMILYPL_REQUEST' EXPORTING employeenumber = ld_employeenumber validitybegin = ld_validitybegin validityend = ld_validityend * membertype = ld_membertype * firstname = ld_firstname * lastname = ld_lastname * maidenname = ld_maidenname * gender = ld_gender * dateofbirth = ld_dateofbirth * nationality = ld_nationality * nationality2 = ld_nationality2 * nationality3 = ld_nationality3 * refpersno = ld_refpersno * idnumber = ld_idnumber * phonenumber = ld_phonenumber * streetandhouseno = ld_streetandhouseno * secondaddressline = ld_secondaddressline * city = ld_city * state = ld_state * postalcode = ld_postalcode * country = ld_country * dateofseparation = ld_dateofseparation * nameofphysician1 = ld_nameofphysician1 * physicianid1 = ld_physicianid1 * nameofphysician2 = ld_nameofphysician2 * physicianid2 = ld_physicianid2 * student = ld_student * cobra = ld_cobra * medicare = ld_medicare * smoker = ld_smoker * disability = ld_disability * dateofdisability = ld_dateofdisability * datedisablearned = ld_datedisablearned * 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_FAMILYPL_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_firstname  TYPE BAPIP0021-FAVOR ,
ld_validitybegin  TYPE BAPIP0021-BEGDA ,
ld_lastname  TYPE BAPIP0021-FANAM ,
ld_validityend  TYPE BAPIP0021-ENDDA ,
ld_maidenname  TYPE BAPIP0021-FGBNA ,
ld_recordnumber  TYPE BAPIP0021-SEQNR ,
ld_gender  TYPE BAPIP0021-FASEX ,
ld_dateofbirth  TYPE BAPIP0021-FGBDT ,
ld_nationality  TYPE BAPIP0021-FANAT ,
ld_nationality2  TYPE BAPIP0021-FANA2 ,
ld_nationality3  TYPE BAPIP0021-FANA3 ,
ld_refpersno  TYPE BAPIP0021US-REFPERSNO ,
ld_idnumber  TYPE BAPIP0021US-IDNUMBER ,
ld_phonenumber  TYPE BAPIP0021US-PHONENUMBER ,
ld_streetandhouseno  TYPE BAPIP0021US-STREETANDHOUSE ,
ld_secondaddressline  TYPE BAPIP0021US-SECONDADDRLINE ,
ld_city  TYPE BAPIP0021US-CITY ,
ld_state  TYPE BAPIP0021US-STATE ,
ld_postalcode  TYPE BAPIP0021US-POSTALCODE ,
ld_country  TYPE BAPIP0021US-COUNTRY ,
ld_dateofseparation  TYPE BAPIP0021US-DATEOFSEP ,
ld_nameofphysician1  TYPE BAPIP0021US-NAMEOFPHYS1 ,
ld_physicianid1  TYPE BAPIP0021US-PHYSICIANID1 ,
ld_nameofphysician2  TYPE BAPIP0021US-NAMEOFPHYS2 ,
ld_physicianid2  TYPE BAPIP0021US-PHYSICIANID2 ,
ld_student  TYPE BAPIP0021US-STUDENT ,
ld_cobra  TYPE BAPIP0021US-COBRA ,
ld_medicare  TYPE BAPIP0021US-MEDICARE ,
ld_smoker  TYPE BAPIP0021US-SMOKER ,
ld_disability  TYPE BAPIP0021US-DISABILITY ,
ld_dateofdisability  TYPE BAPIP0021US-DATEOFDISAB ,
ld_datedisablearned  TYPE BAPIP0021US-DATEDISABLEARN ,
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_maidenname = some text here

ld_gender = some text here

ld_dateofbirth = 20210129

ld_nationality = some text here

ld_nationality2 = some text here

ld_nationality3 = some text here

ld_refpersno = some text here

ld_idnumber = some text here

ld_phonenumber = some text here

ld_streetandhouseno = some text here

ld_secondaddressline = some text here

ld_city = some text here

ld_state = some text here

ld_postalcode = some text here

ld_country = some text here

ld_dateofseparation = 20210129

ld_nameofphysician1 = some text here

ld_physicianid1 = some text here

ld_nameofphysician2 = some text here

ld_physicianid2 = some text here

ld_student = some text here

ld_cobra = some text here

ld_medicare = some text here

ld_smoker = some text here

ld_disability = some text here

ld_dateofdisability = 20210129

ld_datedisablearned = 20210129

ld_nocommit = some text here

SAP Documentation for FM BAPI_FAMILYPL_REQUEST


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