SAP HR_SPQ_PAYROLL_INFO_GET Function Module for Benefit Eligibility: Payroll Information
HR_SPQ_PAYROLL_INFO_GET is a standard hr spq payroll info 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 Benefit Eligibility: Payroll 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 spq payroll info get FM, simply by entering the name HR_SPQ_PAYROLL_INFO_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRPADQASP
Program Name: SAPLHRPADQASP
Main Program: SAPLHRPADQASP
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HR_SPQ_PAYROLL_INFO_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_SPQ_PAYROLL_INFO_GET'"Benefit Eligibility: Payroll Information.
EXPORTING
PERNR = "
DATE = "
IMPORTING
PAYROLL_AREA = "
PERIOD_MOD = "
PAYROLL_PERIOD = "
PERIOD_BEGDA = "
PERIOD_ENDDA = "
EXCEPTIONS
NO_PAYROLL_INFO = 1
IMPORTING Parameters details for HR_SPQ_PAYROLL_INFO_GET
PERNR -
Data type: PERNR-PERNROptional: No
Call by Reference: No ( called with pass by value option)
DATE -
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HR_SPQ_PAYROLL_INFO_GET
PAYROLL_AREA -
Data type: T549A-ABKRSOptional: No
Call by Reference: Yes
PERIOD_MOD -
Data type: T549R-PERMOOptional: No
Call by Reference: Yes
PAYROLL_PERIOD -
Data type: PC231-INPEROptional: No
Call by Reference: Yes
PERIOD_BEGDA -
Data type: SY-DATUMOptional: No
Call by Reference: Yes
PERIOD_ENDDA -
Data type: SY-DATUMOptional: No
Call by Reference: Yes
EXCEPTIONS details
NO_PAYROLL_INFO -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HR_SPQ_PAYROLL_INFO_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_pernr | TYPE PERNR-PERNR, " | |||
| lv_payroll_area | TYPE T549A-ABKRS, " | |||
| lv_no_payroll_info | TYPE T549A, " | |||
| lv_date | TYPE SY-DATUM, " | |||
| lv_period_mod | TYPE T549R-PERMO, " | |||
| lv_payroll_period | TYPE PC231-INPER, " | |||
| lv_period_begda | TYPE SY-DATUM, " | |||
| lv_period_endda | TYPE SY-DATUM. " |
|   CALL FUNCTION 'HR_SPQ_PAYROLL_INFO_GET' "Benefit Eligibility: Payroll Information |
| EXPORTING | ||
| PERNR | = lv_pernr | |
| DATE | = lv_date | |
| IMPORTING | ||
| PAYROLL_AREA | = lv_payroll_area | |
| PERIOD_MOD | = lv_period_mod | |
| PAYROLL_PERIOD | = lv_payroll_period | |
| PERIOD_BEGDA | = lv_period_begda | |
| PERIOD_ENDDA | = lv_period_endda | |
| EXCEPTIONS | ||
| NO_PAYROLL_INFO = 1 | ||
| . " HR_SPQ_PAYROLL_INFO_GET | ||
ABAP code using 7.40 inline data declarations to call FM HR_SPQ_PAYROLL_INFO_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_pernr). | ||||
| "SELECT single ABKRS FROM T549A INTO @DATA(ld_payroll_area). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_date). | ||||
| "SELECT single PERMO FROM T549R INTO @DATA(ld_period_mod). | ||||
| "SELECT single INPER FROM PC231 INTO @DATA(ld_payroll_period). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_period_begda). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_period_endda). | ||||
Search for further information about these or an SAP related objects