SAP HR_EXP_CREATE Function Module for Create for Expense Information









HR_EXP_CREATE is a standard hr exp create 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 for Expense Information 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 hr exp create FM, simply by entering the name HR_EXP_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: PEXP_KR
Program Name: SAPLPEXP_KR
Main Program: SAPLPEXP_KR
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function HR_EXP_CREATE 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 'HR_EXP_CREATE'"Create for Expense Information
EXPORTING
EMPLOYEENUMBER = "Personnel Number
* HAN01 = "Indicator for the handicapped insurance
* ELV01 = "Dependant's education level
* HAE01 = "Indicator for the handicapped education
* SUBTYPE02 = "Subtype
* OBJECTID02 = "Object Identification
* EXPAMTNTS02 = "Expense amount info from NTS
* EXPAMTOTHER02 = "Expense amount info from other source
* EXPCURKEY02 = "Expense currency key
* HAN02 = "Indicator for the handicapped insurance
* ELV02 = "Dependant's education level
VALIDITYBEGIN = "Start Date
* HAE02 = "Indicator for the handicapped education
* SUBTYPE03 = "Subtype
* OBJECTID03 = "Object Identification
* EXPAMTNTS03 = "Expense amount info from NTS
* EXPAMTOTHER03 = "Expense amount info from other source
* EXPCURKEY03 = "Expense currency key
* HAN03 = "Indicator for the handicapped insurance
* ELV03 = "Dependant's education level
* HAE03 = "Indicator for the handicapped education
* SUBTYPE04 = "Subtype
VALIDITYEND = "End Date
* OBJECTID04 = "Object Identification
* EXPAMTNTS04 = "Expense amount info from NTS
* EXPAMTOTHER04 = "Expense amount info from other source
* EXPCURKEY04 = "Expense currency key
* HAN04 = "Indicator for the handicapped insurance
* ELV04 = "Dependant's education level
* HAE04 = "Indicator for the handicapped education
* SUBTYPE05 = "Subtype
* OBJECTID05 = "Object Identification
* EXPAMTNTS05 = "Expense amount info from NTS
EXPENSETYPE = "Subtype
* EXPAMTOTHER05 = "Expense amount info from other source
* EXPCURKEY05 = "Expense currency key
* HAN05 = "Indicator for the handicapped insurance
* ELV05 = "Dependant's education level
* HAE05 = "Indicator for the handicapped education
* SUBTYPE06 = "Subtype
* OBJECTID06 = "Object Identification
* EXPAMTNTS06 = "Expense amount info from NTS
* EXPAMTOTHER06 = "Expense amount info from other source
* EXPCURKEY06 = "Expense currency key
* SUBTYPE01 = "Subtype
* HAN06 = "Indicator for the handicapped insurance
* ELV06 = "Dependant's education level
* HAE06 = "Indicator for the handicapped education
* SUBTYPE07 = "Subtype
* OBJECTID07 = "Object Identification
* EXPAMTNTS07 = "Expense amount info from NTS
* EXPAMTOTHER07 = "Expense amount info from other source
* EXPCURKEY07 = "Expense currency key
* HAN07 = "Indicator for the handicapped insurance
* ELV07 = "Dependant's education level
* OBJECTID01 = "Object Identification
* HAE07 = "Indicator for the handicapped education
* SUBTYPE08 = "Subtype
* OBJECTID08 = "Object Identification
* EXPAMTNTS08 = "Expense amount info from NTS
* EXPAMTOTHER08 = "Expense amount info from other source
* EXPCURKEY08 = "Expense currency key
* HAN08 = "Indicator for the handicapped insurance
* ELV08 = "Dependant's education level
* HAE08 = "Indicator for the handicapped education
* SUBTYPE09 = "Subtype
* EXPAMTNTS01 = "Expense amount info from NTS
* OBJECTID09 = "Object Identification
* EXPAMTNTS09 = "Expense amount info from NTS
* EXPAMTOTHER09 = "Expense amount info from other source
* EXPCURKEY09 = "Expense currency key
* HAN09 = "Indicator for the handicapped insurance
* ELV09 = "Dependant's education level
* HAE09 = "Indicator for the handicapped education
* NOCOMMIT = "COMMIT control at BAPI interface
* EXPAMTOTHER01 = "Expense amount info from other source
* EXPCURKEY01 = "Expense currency key

IMPORTING
RETURN = "Return parameter
EMPLOYEENO = "Personnel Number
SUBTYPE = "Subtype
OBJECTID = "Object Identification
LOCKINDICATOR = "Lock Indicator for HR Master Data Record
VALIDBEGINDA = "Start Date
VALIDENDDA = "End Date
RECORDNUMBER = "Number of Infotype Record With Same Key
.



IMPORTING Parameters details for HR_EXP_CREATE

EMPLOYEENUMBER - Personnel Number

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

HAN01 - Indicator for the handicapped insurance

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

ELV01 - Dependant's education level

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

HAE01 - Indicator for the handicapped education

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

SUBTYPE02 - Subtype

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

OBJECTID02 - Object Identification

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

EXPAMTNTS02 - Expense amount info from NTS

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

EXPAMTOTHER02 - Expense amount info from other source

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

EXPCURKEY02 - Expense currency key

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

HAN02 - Indicator for the handicapped insurance

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

ELV02 - Dependant's education level

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

VALIDITYBEGIN - Start Date

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

HAE02 - Indicator for the handicapped education

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

SUBTYPE03 - Subtype

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

OBJECTID03 - Object Identification

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

EXPAMTNTS03 - Expense amount info from NTS

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

EXPAMTOTHER03 - Expense amount info from other source

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

EXPCURKEY03 - Expense currency key

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

HAN03 - Indicator for the handicapped insurance

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

ELV03 - Dependant's education level

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

HAE03 - Indicator for the handicapped education

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

SUBTYPE04 - Subtype

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

VALIDITYEND - End Date

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

OBJECTID04 - Object Identification

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

EXPAMTNTS04 - Expense amount info from NTS

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

EXPAMTOTHER04 - Expense amount info from other source

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

EXPCURKEY04 - Expense currency key

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

HAN04 - Indicator for the handicapped insurance

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

ELV04 - Dependant's education level

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

HAE04 - Indicator for the handicapped education

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

SUBTYPE05 - Subtype

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

OBJECTID05 - Object Identification

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

EXPAMTNTS05 - Expense amount info from NTS

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

EXPENSETYPE - Subtype

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

EXPAMTOTHER05 - Expense amount info from other source

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

EXPCURKEY05 - Expense currency key

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

HAN05 - Indicator for the handicapped insurance

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

ELV05 - Dependant's education level

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

HAE05 - Indicator for the handicapped education

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

SUBTYPE06 - Subtype

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

OBJECTID06 - Object Identification

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

EXPAMTNTS06 - Expense amount info from NTS

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

EXPAMTOTHER06 - Expense amount info from other source

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

EXPCURKEY06 - Expense currency key

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

SUBTYPE01 - Subtype

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

HAN06 - Indicator for the handicapped insurance

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

ELV06 - Dependant's education level

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

HAE06 - Indicator for the handicapped education

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

SUBTYPE07 - Subtype

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

OBJECTID07 - Object Identification

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

EXPAMTNTS07 - Expense amount info from NTS

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

EXPAMTOTHER07 - Expense amount info from other source

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

EXPCURKEY07 - Expense currency key

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

HAN07 - Indicator for the handicapped insurance

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

ELV07 - Dependant's education level

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

OBJECTID01 - Object Identification

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

HAE07 - Indicator for the handicapped education

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

SUBTYPE08 - Subtype

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

OBJECTID08 - Object Identification

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

EXPAMTNTS08 - Expense amount info from NTS

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

EXPAMTOTHER08 - Expense amount info from other source

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

EXPCURKEY08 - Expense currency key

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

HAN08 - Indicator for the handicapped insurance

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

ELV08 - Dependant's education level

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

HAE08 - Indicator for the handicapped education

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

SUBTYPE09 - Subtype

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

EXPAMTNTS01 - Expense amount info from NTS

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

OBJECTID09 - Object Identification

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

EXPAMTNTS09 - Expense amount info from NTS

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

EXPAMTOTHER09 - Expense amount info from other source

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

EXPCURKEY09 - Expense currency key

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

HAN09 - Indicator for the handicapped insurance

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

ELV09 - Dependant's education level

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

HAE09 - Indicator for the handicapped education

Data type: P41_P0881-HAE09
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)

EXPAMTOTHER01 - Expense amount info from other source

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

EXPCURKEY01 - Expense currency key

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

EXPORTING Parameters details for HR_EXP_CREATE

RETURN - Return parameter

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

EMPLOYEENO - Personnel Number

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

SUBTYPE - Subtype

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

OBJECTID - Object Identification

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

LOCKINDICATOR - Lock Indicator for HR Master Data Record

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

VALIDBEGINDA - Start Date

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

VALIDENDDA - End Date

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

RECORDNUMBER - Number of Infotype Record With Same Key

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

Copy and paste ABAP code example for HR_EXP_CREATE 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 P41_P0881-PERNR, "   
lv_han01  TYPE P41_P0881-HAN01, "   
lv_elv01  TYPE P41_P0881-ELV01, "   
lv_hae01  TYPE P41_P0881-HAE01, "   
lv_subtype02  TYPE P41_P0881-SUBTYPE02, "   
lv_objectid02  TYPE P41_P0881-OBJECTID02, "   
lv_expamtnts02  TYPE P41_P0881-EXPAMTNTS02, "   
lv_expamtother02  TYPE P41_P0881-EXPAMTOTHER02, "   
lv_expcurkey02  TYPE P41_P0881-EXPCURKEY02, "   
lv_han02  TYPE P41_P0881-HAN02, "   
lv_elv02  TYPE P41_P0881-ELV02, "   
lv_employeeno  TYPE P41_P0881-PERNR, "   
lv_validitybegin  TYPE P41_P0881-BEGDA, "   
lv_hae02  TYPE P41_P0881-HAE02, "   
lv_subtype03  TYPE P41_P0881-SUBTYPE03, "   
lv_objectid03  TYPE P41_P0881-OBJECTID03, "   
lv_expamtnts03  TYPE P41_P0881-EXPAMTNTS03, "   
lv_expamtother03  TYPE P41_P0881-EXPAMTOTHER03, "   
lv_expcurkey03  TYPE P41_P0881-EXPCURKEY03, "   
lv_han03  TYPE P41_P0881-HAN03, "   
lv_elv03  TYPE P41_P0881-ELV03, "   
lv_hae03  TYPE P41_P0881-HAE03, "   
lv_subtype04  TYPE P41_P0881-SUBTYPE04, "   
lv_subtype  TYPE P41_P0881-SUBTY, "   
lv_validityend  TYPE P41_P0881-ENDDA, "   
lv_objectid04  TYPE P41_P0881-OBJECTID04, "   
lv_expamtnts04  TYPE P41_P0881-EXPAMTNTS04, "   
lv_expamtother04  TYPE P41_P0881-EXPAMTOTHER04, "   
lv_expcurkey04  TYPE P41_P0881-EXPCURKEY04, "   
lv_han04  TYPE P41_P0881-HAN04, "   
lv_elv04  TYPE P41_P0881-ELV04, "   
lv_hae04  TYPE P41_P0881-HAE04, "   
lv_subtype05  TYPE P41_P0881-SUBTYPE05, "   
lv_objectid05  TYPE P41_P0881-OBJECTID05, "   
lv_expamtnts05  TYPE P41_P0881-EXPAMTNTS05, "   
lv_objectid  TYPE P41_P0881-OBJPS, "   
lv_expensetype  TYPE P41_P0881-SUBTY, "   
lv_expamtother05  TYPE P41_P0881-EXPAMTOTHER05, "   
lv_expcurkey05  TYPE P41_P0881-EXPCURKEY05, "   
lv_han05  TYPE P41_P0881-HAN05, "   
lv_elv05  TYPE P41_P0881-ELV05, "   
lv_hae05  TYPE P41_P0881-HAE05, "   
lv_subtype06  TYPE P41_P0881-SUBTYPE06, "   
lv_objectid06  TYPE P41_P0881-OBJECTID06, "   
lv_expamtnts06  TYPE P41_P0881-EXPAMTNTS06, "   
lv_expamtother06  TYPE P41_P0881-EXPAMTOTHER06, "   
lv_expcurkey06  TYPE P41_P0881-EXPCURKEY06, "   
lv_subtype01  TYPE P41_P0881-SUBTYPE01, "   
lv_lockindicator  TYPE P41_P0881-SPRPS, "   
lv_han06  TYPE P41_P0881-HAN06, "   
lv_elv06  TYPE P41_P0881-ELV06, "   
lv_hae06  TYPE P41_P0881-HAE06, "   
lv_subtype07  TYPE P41_P0881-SUBTYPE07, "   
lv_objectid07  TYPE P41_P0881-OBJECTID07, "   
lv_expamtnts07  TYPE P41_P0881-EXPAMTNTS07, "   
lv_expamtother07  TYPE P41_P0881-EXPAMTOTHER07, "   
lv_expcurkey07  TYPE P41_P0881-EXPCURKEY07, "   
lv_han07  TYPE P41_P0881-HAN07, "   
lv_elv07  TYPE P41_P0881-ELV07, "   
lv_objectid01  TYPE P41_P0881-OBJECTID01, "   
lv_validbeginda  TYPE P41_P0881-BEGDA, "   
lv_hae07  TYPE P41_P0881-HAE07, "   
lv_subtype08  TYPE P41_P0881-SUBTYPE08, "   
lv_objectid08  TYPE P41_P0881-OBJECTID08, "   
lv_expamtnts08  TYPE P41_P0881-EXPAMTNTS08, "   
lv_expamtother08  TYPE P41_P0881-EXPAMTOTHER08, "   
lv_expcurkey08  TYPE P41_P0881-EXPCURKEY08, "   
lv_han08  TYPE P41_P0881-HAN08, "   
lv_elv08  TYPE P41_P0881-ELV08, "   
lv_hae08  TYPE P41_P0881-HAE08, "   
lv_subtype09  TYPE P41_P0881-SUBTYPE09, "   
lv_validendda  TYPE P41_P0881-ENDDA, "   
lv_expamtnts01  TYPE P41_P0881-EXPAMTNTS01, "   
lv_objectid09  TYPE P41_P0881-OBJECTID09, "   
lv_expamtnts09  TYPE P41_P0881-EXPAMTNTS09, "   
lv_expamtother09  TYPE P41_P0881-EXPAMTOTHER09, "   
lv_expcurkey09  TYPE P41_P0881-EXPCURKEY09, "   
lv_han09  TYPE P41_P0881-HAN09, "   
lv_elv09  TYPE P41_P0881-ELV09, "   
lv_hae09  TYPE P41_P0881-HAE09, "   
lv_nocommit  TYPE BAPI_STAND-NO_COMMIT, "   
lv_recordnumber  TYPE P41_P0881-SEQNR, "   
lv_expamtother01  TYPE P41_P0881-EXPAMTOTHER01, "   
lv_expcurkey01  TYPE P41_P0881-EXPCURKEY01. "   

  CALL FUNCTION 'HR_EXP_CREATE'  "Create for Expense Information
    EXPORTING
         EMPLOYEENUMBER = lv_employeenumber
         HAN01 = lv_han01
         ELV01 = lv_elv01
         HAE01 = lv_hae01
         SUBTYPE02 = lv_subtype02
         OBJECTID02 = lv_objectid02
         EXPAMTNTS02 = lv_expamtnts02
         EXPAMTOTHER02 = lv_expamtother02
         EXPCURKEY02 = lv_expcurkey02
         HAN02 = lv_han02
         ELV02 = lv_elv02
         VALIDITYBEGIN = lv_validitybegin
         HAE02 = lv_hae02
         SUBTYPE03 = lv_subtype03
         OBJECTID03 = lv_objectid03
         EXPAMTNTS03 = lv_expamtnts03
         EXPAMTOTHER03 = lv_expamtother03
         EXPCURKEY03 = lv_expcurkey03
         HAN03 = lv_han03
         ELV03 = lv_elv03
         HAE03 = lv_hae03
         SUBTYPE04 = lv_subtype04
         VALIDITYEND = lv_validityend
         OBJECTID04 = lv_objectid04
         EXPAMTNTS04 = lv_expamtnts04
         EXPAMTOTHER04 = lv_expamtother04
         EXPCURKEY04 = lv_expcurkey04
         HAN04 = lv_han04
         ELV04 = lv_elv04
         HAE04 = lv_hae04
         SUBTYPE05 = lv_subtype05
         OBJECTID05 = lv_objectid05
         EXPAMTNTS05 = lv_expamtnts05
         EXPENSETYPE = lv_expensetype
         EXPAMTOTHER05 = lv_expamtother05
         EXPCURKEY05 = lv_expcurkey05
         HAN05 = lv_han05
         ELV05 = lv_elv05
         HAE05 = lv_hae05
         SUBTYPE06 = lv_subtype06
         OBJECTID06 = lv_objectid06
         EXPAMTNTS06 = lv_expamtnts06
         EXPAMTOTHER06 = lv_expamtother06
         EXPCURKEY06 = lv_expcurkey06
         SUBTYPE01 = lv_subtype01
         HAN06 = lv_han06
         ELV06 = lv_elv06
         HAE06 = lv_hae06
         SUBTYPE07 = lv_subtype07
         OBJECTID07 = lv_objectid07
         EXPAMTNTS07 = lv_expamtnts07
         EXPAMTOTHER07 = lv_expamtother07
         EXPCURKEY07 = lv_expcurkey07
         HAN07 = lv_han07
         ELV07 = lv_elv07
         OBJECTID01 = lv_objectid01
         HAE07 = lv_hae07
         SUBTYPE08 = lv_subtype08
         OBJECTID08 = lv_objectid08
         EXPAMTNTS08 = lv_expamtnts08
         EXPAMTOTHER08 = lv_expamtother08
         EXPCURKEY08 = lv_expcurkey08
         HAN08 = lv_han08
         ELV08 = lv_elv08
         HAE08 = lv_hae08
         SUBTYPE09 = lv_subtype09
         EXPAMTNTS01 = lv_expamtnts01
         OBJECTID09 = lv_objectid09
         EXPAMTNTS09 = lv_expamtnts09
         EXPAMTOTHER09 = lv_expamtother09
         EXPCURKEY09 = lv_expcurkey09
         HAN09 = lv_han09
         ELV09 = lv_elv09
         HAE09 = lv_hae09
         NOCOMMIT = lv_nocommit
         EXPAMTOTHER01 = lv_expamtother01
         EXPCURKEY01 = lv_expcurkey01
    IMPORTING
         RETURN = lv_return
         EMPLOYEENO = lv_employeeno
         SUBTYPE = lv_subtype
         OBJECTID = lv_objectid
         LOCKINDICATOR = lv_lockindicator
         VALIDBEGINDA = lv_validbeginda
         VALIDENDDA = lv_validendda
         RECORDNUMBER = lv_recordnumber
. " HR_EXP_CREATE




ABAP code using 7.40 inline data declarations to call FM HR_EXP_CREATE

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 P41_P0881 INTO @DATA(ld_employeenumber).
 
"SELECT single HAN01 FROM P41_P0881 INTO @DATA(ld_han01).
 
"SELECT single ELV01 FROM P41_P0881 INTO @DATA(ld_elv01).
 
"SELECT single HAE01 FROM P41_P0881 INTO @DATA(ld_hae01).
 
"SELECT single SUBTYPE02 FROM P41_P0881 INTO @DATA(ld_subtype02).
 
"SELECT single OBJECTID02 FROM P41_P0881 INTO @DATA(ld_objectid02).
 
"SELECT single EXPAMTNTS02 FROM P41_P0881 INTO @DATA(ld_expamtnts02).
 
"SELECT single EXPAMTOTHER02 FROM P41_P0881 INTO @DATA(ld_expamtother02).
 
"SELECT single EXPCURKEY02 FROM P41_P0881 INTO @DATA(ld_expcurkey02).
 
"SELECT single HAN02 FROM P41_P0881 INTO @DATA(ld_han02).
 
"SELECT single ELV02 FROM P41_P0881 INTO @DATA(ld_elv02).
 
"SELECT single PERNR FROM P41_P0881 INTO @DATA(ld_employeeno).
 
"SELECT single BEGDA FROM P41_P0881 INTO @DATA(ld_validitybegin).
 
"SELECT single HAE02 FROM P41_P0881 INTO @DATA(ld_hae02).
 
"SELECT single SUBTYPE03 FROM P41_P0881 INTO @DATA(ld_subtype03).
 
"SELECT single OBJECTID03 FROM P41_P0881 INTO @DATA(ld_objectid03).
 
"SELECT single EXPAMTNTS03 FROM P41_P0881 INTO @DATA(ld_expamtnts03).
 
"SELECT single EXPAMTOTHER03 FROM P41_P0881 INTO @DATA(ld_expamtother03).
 
"SELECT single EXPCURKEY03 FROM P41_P0881 INTO @DATA(ld_expcurkey03).
 
"SELECT single HAN03 FROM P41_P0881 INTO @DATA(ld_han03).
 
"SELECT single ELV03 FROM P41_P0881 INTO @DATA(ld_elv03).
 
"SELECT single HAE03 FROM P41_P0881 INTO @DATA(ld_hae03).
 
"SELECT single SUBTYPE04 FROM P41_P0881 INTO @DATA(ld_subtype04).
 
"SELECT single SUBTY FROM P41_P0881 INTO @DATA(ld_subtype).
 
"SELECT single ENDDA FROM P41_P0881 INTO @DATA(ld_validityend).
 
"SELECT single OBJECTID04 FROM P41_P0881 INTO @DATA(ld_objectid04).
 
"SELECT single EXPAMTNTS04 FROM P41_P0881 INTO @DATA(ld_expamtnts04).
 
"SELECT single EXPAMTOTHER04 FROM P41_P0881 INTO @DATA(ld_expamtother04).
 
"SELECT single EXPCURKEY04 FROM P41_P0881 INTO @DATA(ld_expcurkey04).
 
"SELECT single HAN04 FROM P41_P0881 INTO @DATA(ld_han04).
 
"SELECT single ELV04 FROM P41_P0881 INTO @DATA(ld_elv04).
 
"SELECT single HAE04 FROM P41_P0881 INTO @DATA(ld_hae04).
 
"SELECT single SUBTYPE05 FROM P41_P0881 INTO @DATA(ld_subtype05).
 
"SELECT single OBJECTID05 FROM P41_P0881 INTO @DATA(ld_objectid05).
 
"SELECT single EXPAMTNTS05 FROM P41_P0881 INTO @DATA(ld_expamtnts05).
 
"SELECT single OBJPS FROM P41_P0881 INTO @DATA(ld_objectid).
 
"SELECT single SUBTY FROM P41_P0881 INTO @DATA(ld_expensetype).
 
"SELECT single EXPAMTOTHER05 FROM P41_P0881 INTO @DATA(ld_expamtother05).
 
"SELECT single EXPCURKEY05 FROM P41_P0881 INTO @DATA(ld_expcurkey05).
 
"SELECT single HAN05 FROM P41_P0881 INTO @DATA(ld_han05).
 
"SELECT single ELV05 FROM P41_P0881 INTO @DATA(ld_elv05).
 
"SELECT single HAE05 FROM P41_P0881 INTO @DATA(ld_hae05).
 
"SELECT single SUBTYPE06 FROM P41_P0881 INTO @DATA(ld_subtype06).
 
"SELECT single OBJECTID06 FROM P41_P0881 INTO @DATA(ld_objectid06).
 
"SELECT single EXPAMTNTS06 FROM P41_P0881 INTO @DATA(ld_expamtnts06).
 
"SELECT single EXPAMTOTHER06 FROM P41_P0881 INTO @DATA(ld_expamtother06).
 
"SELECT single EXPCURKEY06 FROM P41_P0881 INTO @DATA(ld_expcurkey06).
 
"SELECT single SUBTYPE01 FROM P41_P0881 INTO @DATA(ld_subtype01).
 
"SELECT single SPRPS FROM P41_P0881 INTO @DATA(ld_lockindicator).
 
"SELECT single HAN06 FROM P41_P0881 INTO @DATA(ld_han06).
 
"SELECT single ELV06 FROM P41_P0881 INTO @DATA(ld_elv06).
 
"SELECT single HAE06 FROM P41_P0881 INTO @DATA(ld_hae06).
 
"SELECT single SUBTYPE07 FROM P41_P0881 INTO @DATA(ld_subtype07).
 
"SELECT single OBJECTID07 FROM P41_P0881 INTO @DATA(ld_objectid07).
 
"SELECT single EXPAMTNTS07 FROM P41_P0881 INTO @DATA(ld_expamtnts07).
 
"SELECT single EXPAMTOTHER07 FROM P41_P0881 INTO @DATA(ld_expamtother07).
 
"SELECT single EXPCURKEY07 FROM P41_P0881 INTO @DATA(ld_expcurkey07).
 
"SELECT single HAN07 FROM P41_P0881 INTO @DATA(ld_han07).
 
"SELECT single ELV07 FROM P41_P0881 INTO @DATA(ld_elv07).
 
"SELECT single OBJECTID01 FROM P41_P0881 INTO @DATA(ld_objectid01).
 
"SELECT single BEGDA FROM P41_P0881 INTO @DATA(ld_validbeginda).
 
"SELECT single HAE07 FROM P41_P0881 INTO @DATA(ld_hae07).
 
"SELECT single SUBTYPE08 FROM P41_P0881 INTO @DATA(ld_subtype08).
 
"SELECT single OBJECTID08 FROM P41_P0881 INTO @DATA(ld_objectid08).
 
"SELECT single EXPAMTNTS08 FROM P41_P0881 INTO @DATA(ld_expamtnts08).
 
"SELECT single EXPAMTOTHER08 FROM P41_P0881 INTO @DATA(ld_expamtother08).
 
"SELECT single EXPCURKEY08 FROM P41_P0881 INTO @DATA(ld_expcurkey08).
 
"SELECT single HAN08 FROM P41_P0881 INTO @DATA(ld_han08).
 
"SELECT single ELV08 FROM P41_P0881 INTO @DATA(ld_elv08).
 
"SELECT single HAE08 FROM P41_P0881 INTO @DATA(ld_hae08).
 
"SELECT single SUBTYPE09 FROM P41_P0881 INTO @DATA(ld_subtype09).
 
"SELECT single ENDDA FROM P41_P0881 INTO @DATA(ld_validendda).
 
"SELECT single EXPAMTNTS01 FROM P41_P0881 INTO @DATA(ld_expamtnts01).
 
"SELECT single OBJECTID09 FROM P41_P0881 INTO @DATA(ld_objectid09).
 
"SELECT single EXPAMTNTS09 FROM P41_P0881 INTO @DATA(ld_expamtnts09).
 
"SELECT single EXPAMTOTHER09 FROM P41_P0881 INTO @DATA(ld_expamtother09).
 
"SELECT single EXPCURKEY09 FROM P41_P0881 INTO @DATA(ld_expcurkey09).
 
"SELECT single HAN09 FROM P41_P0881 INTO @DATA(ld_han09).
 
"SELECT single ELV09 FROM P41_P0881 INTO @DATA(ld_elv09).
 
"SELECT single HAE09 FROM P41_P0881 INTO @DATA(ld_hae09).
 
"SELECT single NO_COMMIT FROM BAPI_STAND INTO @DATA(ld_nocommit).
 
"SELECT single SEQNR FROM P41_P0881 INTO @DATA(ld_recordnumber).
 
"SELECT single EXPAMTOTHER01 FROM P41_P0881 INTO @DATA(ld_expamtother01).
 
"SELECT single EXPCURKEY01 FROM P41_P0881 INTO @DATA(ld_expcurkey01).
 


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!