SAP BAPI_FAMILY_REQUEST Function Module for Create locked family record









BAPI_FAMILY_REQUEST is a standard bapi family request SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create locked family record processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for bapi family request FM, simply by entering the name BAPI_FAMILY_REQUEST into the relevant SAP transaction such as SE37 or SE38.

Function Group: PFAM
Program Name: SAPLPFAM
Main Program: SAPLPFAM
Appliation area: P
Release date: 16-Sep-1997
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_FAMILY_REQUEST pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'BAPI_FAMILY_REQUEST'"Create locked family record
EXPORTING
EMPLOYEENUMBER = "Personnel number
* SECONDSURNAMEPREFIX = "Name Prefix
* ARISTOCRATICTITLE = "Other title
* FULLNAME = "Full employee name
* MAIDENNAME = "Name at Birth
* INITIALS = "Employee's Initials
* GENDER = "Gender key
* DATEOFBIRTH = "Date of birth
* PLACEOFBIRTH = "Birthplace
* STATEOFBIRTH = "State
* LANDOFBIRTH = "Country of Birth
VALIDITYBEGIN = "Valid from date
* NATIONALITY = "Nationality
* NATIONALITY2 = "Second nationality
* NATIONALITY3 = "Third nationality
* NOCOMMIT = "COMMIT control at BAPI interface
VALIDITYEND = "Valid To Date
* MEMBERTYPE = "Type of family record
* FIRSTNAME = "First name
* LASTNAME = "Last name
* SECONDNAME = "Second name
* ACADEMICTITLE = "Title
* SURNAMEPREFIX = "Name Prefix

IMPORTING
RETURN = "Structure for return code
EMPLOYEENUMBER = "Personnel number
SUBTYPE = "Subtype
OBJECTID = "Object identification
LOCKINDICATOR = "Lock indicator for HR master record
VALIDITYBEGIN = "Valid from date
VALIDITYEND = "Valid To Date
RECORDNUMBER = "Number of Infotype Record
.



IMPORTING Parameters details for BAPI_FAMILY_REQUEST

EMPLOYEENUMBER - Personnel number

Data type: BAPIP0021-PERNR
Optional: No
Call by Reference: No ( called with pass by value option)

SECONDSURNAMEPREFIX - Name Prefix

Data type: BAPIP0021-FVRS2
Optional: Yes
Call by Reference: No ( called with pass by value option)

ARISTOCRATICTITLE - Other title

Data type: BAPIP0021-FNMZU
Optional: Yes
Call by Reference: No ( called with pass by value option)

FULLNAME - Full employee name

Data type: BAPIP0021-FCNAM
Optional: Yes
Call by Reference: No ( called with pass by value option)

MAIDENNAME - Name at Birth

Data type: BAPIP0021-FGBNA
Optional: Yes
Call by Reference: No ( called with pass by value option)

INITIALS - Employee's Initials

Data type: BAPIP0021-FINIT
Optional: Yes
Call by Reference: No ( called with pass by value option)

GENDER - Gender key

Data type: BAPIP0021-FASEX
Optional: Yes
Call by Reference: No ( called with pass by value option)

DATEOFBIRTH - Date of birth

Data type: BAPIP0021-FGBDT
Optional: Yes
Call by Reference: No ( called with pass by value option)

PLACEOFBIRTH - Birthplace

Data type: BAPIP0021-FGBOT
Optional: Yes
Call by Reference: No ( called with pass by value option)

STATEOFBIRTH - State

Data type: BAPIP0021-FGDEP
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANDOFBIRTH - Country of Birth

Data type: BAPIP0021-FGBLD
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALIDITYBEGIN - Valid from date

Data type: BAPIP0021-BEGDA
Optional: No
Call by Reference: No ( called with pass by value option)

NATIONALITY - Nationality

Data type: BAPIP0021-FANAT
Optional: Yes
Call by Reference: No ( called with pass by value option)

NATIONALITY2 - Second nationality

Data type: BAPIP0021-FANA2
Optional: Yes
Call by Reference: No ( called with pass by value option)

NATIONALITY3 - Third nationality

Data type: BAPIP0021-FANA3
Optional: Yes
Call by Reference: No ( called with pass by value option)

NOCOMMIT - COMMIT control at BAPI interface

Data type: BAPI_STAND-NO_COMMIT
Optional: Yes
Call by Reference: No ( called with pass by value option)

VALIDITYEND - Valid To Date

Data type: BAPIP0021-ENDDA
Optional: No
Call by Reference: No ( called with pass by value option)

MEMBERTYPE - Type of family record

Data type: BAPIP0021-FAMSA
Optional: Yes
Call by Reference: No ( called with pass by value option)

FIRSTNAME - First name

Data type: BAPIP0021-FAVOR
Optional: Yes
Call by Reference: No ( called with pass by value option)

LASTNAME - Last name

Data type: BAPIP0021-FANAM
Optional: Yes
Call by Reference: No ( called with pass by value option)

SECONDNAME - Second name

Data type: BAPIP0021-FNAC2
Optional: Yes
Call by Reference: No ( called with pass by value option)

ACADEMICTITLE - Title

Data type: BAPIP0021-TITEL
Optional: Yes
Call by Reference: No ( called with pass by value option)

SURNAMEPREFIX - Name Prefix

Data type: BAPIP0021-FVRSW
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BAPI_FAMILY_REQUEST

RETURN - Structure for return code

Data type: BAPIRETURN1
Optional: No
Call by Reference: No ( called with pass by value option)

EMPLOYEENUMBER - Personnel number

Data type: BAPIP0021-PERNR
Optional: No
Call by Reference: No ( called with pass by value option)

SUBTYPE - Subtype

Data type: BAPIP0021-SUBTY
Optional: No
Call by Reference: No ( called with pass by value option)

OBJECTID - Object identification

Data type: BAPIP0021-OBJPS
Optional: No
Call by Reference: No ( called with pass by value option)

LOCKINDICATOR - Lock indicator for HR master record

Data type: BAPIP0021-SPRPS
Optional: No
Call by Reference: No ( called with pass by value option)

VALIDITYBEGIN - Valid from date

Data type: BAPIP0021-BEGDA
Optional: No
Call by Reference: No ( called with pass by value option)

VALIDITYEND - Valid To Date

Data type: BAPIP0021-ENDDA
Optional: No
Call by Reference: No ( called with pass by value option)

RECORDNUMBER - Number of Infotype Record

Data type: BAPIP0021-SEQNR
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for BAPI_FAMILY_REQUEST Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_return  TYPE BAPIRETURN1, "   
lv_employeenumber  TYPE BAPIP0021-PERNR, "   
lv_secondsurnameprefix  TYPE BAPIP0021-FVRS2, "   
lv_aristocratictitle  TYPE BAPIP0021-FNMZU, "   
lv_fullname  TYPE BAPIP0021-FCNAM, "   
lv_maidenname  TYPE BAPIP0021-FGBNA, "   
lv_initials  TYPE BAPIP0021-FINIT, "   
lv_gender  TYPE BAPIP0021-FASEX, "   
lv_dateofbirth  TYPE BAPIP0021-FGBDT, "   
lv_placeofbirth  TYPE BAPIP0021-FGBOT, "   
lv_stateofbirth  TYPE BAPIP0021-FGDEP, "   
lv_landofbirth  TYPE BAPIP0021-FGBLD, "   
lv_validitybegin  TYPE BAPIP0021-BEGDA, "   
lv_employeenumber  TYPE BAPIP0021-PERNR, "   
lv_nationality  TYPE BAPIP0021-FANAT, "   
lv_nationality2  TYPE BAPIP0021-FANA2, "   
lv_nationality3  TYPE BAPIP0021-FANA3, "   
lv_nocommit  TYPE BAPI_STAND-NO_COMMIT, "   
lv_subtype  TYPE BAPIP0021-SUBTY, "   
lv_validityend  TYPE BAPIP0021-ENDDA, "   
lv_objectid  TYPE BAPIP0021-OBJPS, "   
lv_membertype  TYPE BAPIP0021-FAMSA, "   
lv_firstname  TYPE BAPIP0021-FAVOR, "   
lv_lockindicator  TYPE BAPIP0021-SPRPS, "   
lv_lastname  TYPE BAPIP0021-FANAM, "   
lv_validitybegin  TYPE BAPIP0021-BEGDA, "   
lv_secondname  TYPE BAPIP0021-FNAC2, "   
lv_validityend  TYPE BAPIP0021-ENDDA, "   
lv_recordnumber  TYPE BAPIP0021-SEQNR, "   
lv_academictitle  TYPE BAPIP0021-TITEL, "   
lv_surnameprefix  TYPE BAPIP0021-FVRSW. "   

  CALL FUNCTION 'BAPI_FAMILY_REQUEST'  "Create locked family record
    EXPORTING
         EMPLOYEENUMBER = lv_employeenumber
         SECONDSURNAMEPREFIX = lv_secondsurnameprefix
         ARISTOCRATICTITLE = lv_aristocratictitle
         FULLNAME = lv_fullname
         MAIDENNAME = lv_maidenname
         INITIALS = lv_initials
         GENDER = lv_gender
         DATEOFBIRTH = lv_dateofbirth
         PLACEOFBIRTH = lv_placeofbirth
         STATEOFBIRTH = lv_stateofbirth
         LANDOFBIRTH = lv_landofbirth
         VALIDITYBEGIN = lv_validitybegin
         NATIONALITY = lv_nationality
         NATIONALITY2 = lv_nationality2
         NATIONALITY3 = lv_nationality3
         NOCOMMIT = lv_nocommit
         VALIDITYEND = lv_validityend
         MEMBERTYPE = lv_membertype
         FIRSTNAME = lv_firstname
         LASTNAME = lv_lastname
         SECONDNAME = lv_secondname
         ACADEMICTITLE = lv_academictitle
         SURNAMEPREFIX = lv_surnameprefix
    IMPORTING
         RETURN = lv_return
         EMPLOYEENUMBER = lv_employeenumber
         SUBTYPE = lv_subtype
         OBJECTID = lv_objectid
         LOCKINDICATOR = lv_lockindicator
         VALIDITYBEGIN = lv_validitybegin
         VALIDITYEND = lv_validityend
         RECORDNUMBER = lv_recordnumber
. " BAPI_FAMILY_REQUEST




ABAP code using 7.40 inline data declarations to call FM BAPI_FAMILY_REQUEST

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single PERNR FROM BAPIP0021 INTO @DATA(ld_employeenumber).
 
"SELECT single FVRS2 FROM BAPIP0021 INTO @DATA(ld_secondsurnameprefix).
 
"SELECT single FNMZU FROM BAPIP0021 INTO @DATA(ld_aristocratictitle).
 
"SELECT single FCNAM FROM BAPIP0021 INTO @DATA(ld_fullname).
 
"SELECT single FGBNA FROM BAPIP0021 INTO @DATA(ld_maidenname).
 
"SELECT single FINIT FROM BAPIP0021 INTO @DATA(ld_initials).
 
"SELECT single FASEX FROM BAPIP0021 INTO @DATA(ld_gender).
 
"SELECT single FGBDT FROM BAPIP0021 INTO @DATA(ld_dateofbirth).
 
"SELECT single FGBOT FROM BAPIP0021 INTO @DATA(ld_placeofbirth).
 
"SELECT single FGDEP FROM BAPIP0021 INTO @DATA(ld_stateofbirth).
 
"SELECT single FGBLD FROM BAPIP0021 INTO @DATA(ld_landofbirth).
 
"SELECT single BEGDA FROM BAPIP0021 INTO @DATA(ld_validitybegin).
 
"SELECT single PERNR FROM BAPIP0021 INTO @DATA(ld_employeenumber).
 
"SELECT single FANAT FROM BAPIP0021 INTO @DATA(ld_nationality).
 
"SELECT single FANA2 FROM BAPIP0021 INTO @DATA(ld_nationality2).
 
"SELECT single FANA3 FROM BAPIP0021 INTO @DATA(ld_nationality3).
 
"SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit).
 
"SELECT single SUBTY FROM BAPIP0021 INTO @DATA(ld_subtype).
 
"SELECT single ENDDA FROM BAPIP0021 INTO @DATA(ld_validityend).
 
"SELECT single OBJPS FROM BAPIP0021 INTO @DATA(ld_objectid).
 
"SELECT single FAMSA FROM BAPIP0021 INTO @DATA(ld_membertype).
 
"SELECT single FAVOR FROM BAPIP0021 INTO @DATA(ld_firstname).
 
"SELECT single SPRPS FROM BAPIP0021 INTO @DATA(ld_lockindicator).
 
"SELECT single FANAM FROM BAPIP0021 INTO @DATA(ld_lastname).
 
"SELECT single BEGDA FROM BAPIP0021 INTO @DATA(ld_validitybegin).
 
"SELECT single FNAC2 FROM BAPIP0021 INTO @DATA(ld_secondname).
 
"SELECT single ENDDA FROM BAPIP0021 INTO @DATA(ld_validityend).
 
"SELECT single SEQNR FROM BAPIP0021 INTO @DATA(ld_recordnumber).
 
"SELECT single TITEL FROM BAPIP0021 INTO @DATA(ld_academictitle).
 
"SELECT single FVRSW FROM BAPIP0021 INTO @DATA(ld_surnameprefix).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!