SAP BAPI_EMPPREVIER_GETDETAIL Function Module for Read Previous Employer









BAPI_EMPPREVIER_GETDETAIL is a standard bapi empprevier getdetail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Previous Employer 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 empprevier getdetail FM, simply by entering the name BAPI_EMPPREVIER_GETDETAIL into the relevant SAP transaction such as SE37 or SE38.

Function Group: PPER
Program Name: SAPLPPER
Main Program:
Appliation area: P
Release date: 03-Feb-2000
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BAPI_EMPPREVIER_GETDETAIL 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_EMPPREVIER_GETDETAIL'"Read Previous Employer
EXPORTING
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
RETURN = "Structure for return code
EMPLOYER = "Name of employer
CITY = "City
COUNTRY = "Country key
INDUSTRY = "Industry key
JOB = "Job at former employer(s)
NAMEOFCOUNTRY = "Country name
NAMEOFINDUSTRY = "Industry name
NAMEOFJOB = "Job name
.



IMPORTING Parameters details for BAPI_EMPPREVIER_GETDETAIL

EMPLOYEENUMBER - Personnel number

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

SUBTYPE - Subtype

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

OBJECTID - Object identification

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

LOCKINDICATOR - Lock indicator for HR master record

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

VALIDITYBEGIN - Valid from date

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

VALIDITYEND - Valid to date

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

RECORDNUMBER - Number of infotype record

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

EXPORTING Parameters details for BAPI_EMPPREVIER_GETDETAIL

RETURN - Structure for return code

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

EMPLOYER - Name of employer

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

CITY - City

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

COUNTRY - Country key

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

INDUSTRY - Industry key

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

JOB - Job at former employer(s)

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

NAMEOFCOUNTRY - Country name

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

NAMEOFINDUSTRY - Industry name

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

NAMEOFJOB - Job name

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

Copy and paste ABAP code example for BAPI_EMPPREVIER_GETDETAIL 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 BAPIP0023-PERNR, "   
lv_subtype  TYPE BAPIP0023-SUBTY, "   
lv_employer  TYPE BAPIP0023-ARBGB, "   
lv_city  TYPE BAPIP0023-ORT01, "   
lv_objectid  TYPE BAPIP0023-OBJPS, "   
lv_country  TYPE BAPIP0023-LAND1, "   
lv_lockindicator  TYPE BAPIP0023-SPRPS, "   
lv_industry  TYPE BAPIP0023-BRANC, "   
lv_validitybegin  TYPE BAPIP0023-BEGDA, "   
lv_job  TYPE BAPIP0023-TAETE, "   
lv_validityend  TYPE BAPIP0023-ENDDA, "   
lv_recordnumber  TYPE BAPIP0023-SEQNR, "   
lv_nameofcountry  TYPE BAPIP0023-NAMEOFCOUNTRY, "   
lv_nameofindustry  TYPE BAPIP0023-NAMEOFINDUSTRY, "   
lv_nameofjob  TYPE BAPIP0023-NAMEOFJOB. "   

  CALL FUNCTION 'BAPI_EMPPREVIER_GETDETAIL'  "Read Previous Employer
    EXPORTING
         EMPLOYEENUMBER = lv_employeenumber
         SUBTYPE = lv_subtype
         OBJECTID = lv_objectid
         LOCKINDICATOR = lv_lockindicator
         VALIDITYBEGIN = lv_validitybegin
         VALIDITYEND = lv_validityend
         RECORDNUMBER = lv_recordnumber
    IMPORTING
         RETURN = lv_return
         EMPLOYER = lv_employer
         CITY = lv_city
         COUNTRY = lv_country
         INDUSTRY = lv_industry
         JOB = lv_job
         NAMEOFCOUNTRY = lv_nameofcountry
         NAMEOFINDUSTRY = lv_nameofindustry
         NAMEOFJOB = lv_nameofjob
. " BAPI_EMPPREVIER_GETDETAIL




ABAP code using 7.40 inline data declarations to call FM BAPI_EMPPREVIER_GETDETAIL

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 BAPIP0023 INTO @DATA(ld_employeenumber).
 
"SELECT single SUBTY FROM BAPIP0023 INTO @DATA(ld_subtype).
 
"SELECT single ARBGB FROM BAPIP0023 INTO @DATA(ld_employer).
 
"SELECT single ORT01 FROM BAPIP0023 INTO @DATA(ld_city).
 
"SELECT single OBJPS FROM BAPIP0023 INTO @DATA(ld_objectid).
 
"SELECT single LAND1 FROM BAPIP0023 INTO @DATA(ld_country).
 
"SELECT single SPRPS FROM BAPIP0023 INTO @DATA(ld_lockindicator).
 
"SELECT single BRANC FROM BAPIP0023 INTO @DATA(ld_industry).
 
"SELECT single BEGDA FROM BAPIP0023 INTO @DATA(ld_validitybegin).
 
"SELECT single TAETE FROM BAPIP0023 INTO @DATA(ld_job).
 
"SELECT single ENDDA FROM BAPIP0023 INTO @DATA(ld_validityend).
 
"SELECT single SEQNR FROM BAPIP0023 INTO @DATA(ld_recordnumber).
 
"SELECT single NAMEOFCOUNTRY FROM BAPIP0023 INTO @DATA(ld_nameofcountry).
 
"SELECT single NAMEOFINDUSTRY FROM BAPIP0023 INTO @DATA(ld_nameofindustry).
 
"SELECT single NAMEOFJOB FROM BAPIP0023 INTO @DATA(ld_nameofjob).
 


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!