SAP HR_SPA_INITIAL_VALUES_GET Function Module for Salary packaging: get the initial package figures









HR_SPA_INITIAL_VALUES_GET is a standard hr spa initial values get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Salary packaging: get the initial package figures 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 spa initial values get FM, simply by entering the name HR_SPA_INITIAL_VALUES_GET into the relevant SAP transaction such as SE37 or SE38.

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



Function HR_SPA_INITIAL_VALUES_GET 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_SPA_INITIAL_VALUES_GET'"Salary packaging: get the initial package figures
EXPORTING
PERSNR = "Personnel number
DATE = "Date and time, current (application server) date
PAY_FREQU = "Payroll time units
EMP_INFO = "HR-CM: Employee Data for Compensation Administration

TABLES
INITIAL_VALUES = "Salary packaging package table
IPREL = "Salary packaging: Iprel table

EXCEPTIONS
ERROR = 1
.



IMPORTING Parameters details for HR_SPA_INITIAL_VALUES_GET

PERSNR - Personnel number

Data type: PERNR-PERNR
Optional: No
Call by Reference: Yes

DATE - Date and time, current (application server) date

Data type: DATUM
Optional: No
Call by Reference: Yes

PAY_FREQU - Payroll time units

Data type: T549R-ZEINH
Optional: No
Call by Reference: Yes

EMP_INFO - HR-CM: Employee Data for Compensation Administration

Data type: HRCM_EMPINFO
Optional: No
Call by Reference: Yes

TABLES Parameters details for HR_SPA_INITIAL_VALUES_GET

INITIAL_VALUES - Salary packaging package table

Data type: SPA_PACKAGE_COMPONENT
Optional: No
Call by Reference: Yes

IPREL - Salary packaging: Iprel table

Data type: SPA_IPREL_TABLE
Optional: No
Call by Reference: Yes

EXCEPTIONS details

ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for HR_SPA_INITIAL_VALUES_GET 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_error  TYPE STRING, "   
lv_persnr  TYPE PERNR-PERNR, "   
lt_initial_values  TYPE STANDARD TABLE OF SPA_PACKAGE_COMPONENT, "   
lv_date  TYPE DATUM, "   
lt_iprel  TYPE STANDARD TABLE OF SPA_IPREL_TABLE, "   
lv_pay_frequ  TYPE T549R-ZEINH, "   
lv_emp_info  TYPE HRCM_EMPINFO. "   

  CALL FUNCTION 'HR_SPA_INITIAL_VALUES_GET'  "Salary packaging: get the initial package figures
    EXPORTING
         PERSNR = lv_persnr
         DATE = lv_date
         PAY_FREQU = lv_pay_frequ
         EMP_INFO = lv_emp_info
    TABLES
         INITIAL_VALUES = lt_initial_values
         IPREL = lt_iprel
    EXCEPTIONS
        ERROR = 1
. " HR_SPA_INITIAL_VALUES_GET




ABAP code using 7.40 inline data declarations to call FM HR_SPA_INITIAL_VALUES_GET

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 PERNR INTO @DATA(ld_persnr).
 
 
 
 
"SELECT single ZEINH FROM T549R INTO @DATA(ld_pay_frequ).
 
 


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!