SAP HR_GET_PAYROLL_DATES Function Module for HR-J:Get payroll dates
HR_GET_PAYROLL_DATES is a standard hr get payroll dates SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for HR-J:Get payroll dates 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 get payroll dates FM, simply by entering the name HR_GET_PAYROLL_DATES into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRJE
Program Name: SAPLHRJE
Main Program:
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HR_GET_PAYROLL_DATES 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_GET_PAYROLL_DATES'"HR-J:Get payroll dates.
EXPORTING
P_PAYTY = "Pay type
P_PERNR = "Personnel number
P_PAYID = "Pay ID
P_MOLGA = "Molga
P_ABKRS = "Payroll Area
P_PABRJ = "Payroll year
P_PABRP = "Payroll month
P_BONDT = "Bounus date
P_BEGDA = "
P_ENDDA = "
IMPORTING
PDATE = "Pay date
KKAN2 = "Syoyo period days
CTOUT = "Syukkoku date
CTOBD = "Begin date of Syukkoku
CTOED = "End date of Syukkoku
NAIBD = "Begin date of Kijun-nai
NAIED = "End date of Kihun-nai
GAIBD = "Begin date of Kijun-gai
GAIED = "End date of Kihun-gai
KKAN1 = "Resident days in Syoyo period
IMPORTING Parameters details for HR_GET_PAYROLL_DATES
P_PAYTY - Pay type
Data type: T5J69-PAYTYOptional: No
Call by Reference: No ( called with pass by value option)
P_PERNR - Personnel number
Data type: PERNR-PERNROptional: No
Call by Reference: No ( called with pass by value option)
P_PAYID - Pay ID
Data type: T5J69-PAYIDOptional: No
Call by Reference: No ( called with pass by value option)
P_MOLGA - Molga
Data type: T549S-MOLGAOptional: No
Call by Reference: No ( called with pass by value option)
P_ABKRS - Payroll Area
Data type: T549A-ABKRSOptional: No
Call by Reference: No ( called with pass by value option)
P_PABRJ - Payroll year
Data type: T549Q-PABRJOptional: No
Call by Reference: No ( called with pass by value option)
P_PABRP - Payroll month
Data type: T549Q-PABRPOptional: No
Call by Reference: No ( called with pass by value option)
P_BONDT - Bounus date
Data type: T5J69-BONDTOptional: No
Call by Reference: No ( called with pass by value option)
P_BEGDA -
Data type: T5J69-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
P_ENDDA -
Data type: T5J69-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HR_GET_PAYROLL_DATES
PDATE - Pay date
Data type: T5J69-BONDTOptional: No
Call by Reference: No ( called with pass by value option)
KKAN2 - Syoyo period days
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CTOUT - Syukkoku date
Data type: T5J69-BONDTOptional: No
Call by Reference: No ( called with pass by value option)
CTOBD - Begin date of Syukkoku
Data type: T5J69-BONDTOptional: No
Call by Reference: No ( called with pass by value option)
CTOED - End date of Syukkoku
Data type: T5J69-BONDTOptional: No
Call by Reference: No ( called with pass by value option)
NAIBD - Begin date of Kijun-nai
Data type: T5J69-BONDTOptional: No
Call by Reference: No ( called with pass by value option)
NAIED - End date of Kihun-nai
Data type: T5J69-BONDTOptional: No
Call by Reference: No ( called with pass by value option)
GAIBD - Begin date of Kijun-gai
Data type: T5J69-BONDTOptional: No
Call by Reference: No ( called with pass by value option)
GAIED - End date of Kihun-gai
Data type: T5J69-BONDTOptional: No
Call by Reference: No ( called with pass by value option)
KKAN1 - Resident days in Syoyo period
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HR_GET_PAYROLL_DATES 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_pdate | TYPE T5J69-BONDT, " | |||
| lv_p_payty | TYPE T5J69-PAYTY, " | |||
| lv_kkan2 | TYPE T5J69, " | |||
| lv_p_pernr | TYPE PERNR-PERNR, " | |||
| lv_ctout | TYPE T5J69-BONDT, " | |||
| lv_p_payid | TYPE T5J69-PAYID, " | |||
| lv_ctobd | TYPE T5J69-BONDT, " | |||
| lv_p_molga | TYPE T549S-MOLGA, " | |||
| lv_ctoed | TYPE T5J69-BONDT, " | |||
| lv_p_abkrs | TYPE T549A-ABKRS, " | |||
| lv_naibd | TYPE T5J69-BONDT, " | |||
| lv_p_pabrj | TYPE T549Q-PABRJ, " | |||
| lv_naied | TYPE T5J69-BONDT, " | |||
| lv_p_pabrp | TYPE T549Q-PABRP, " | |||
| lv_gaibd | TYPE T5J69-BONDT, " | |||
| lv_p_bondt | TYPE T5J69-BONDT, " | |||
| lv_gaied | TYPE T5J69-BONDT, " | |||
| lv_p_begda | TYPE T5J69-BEGDA, " | |||
| lv_kkan1 | TYPE T5J69, " | |||
| lv_p_endda | TYPE T5J69-ENDDA. " |
|   CALL FUNCTION 'HR_GET_PAYROLL_DATES' "HR-J:Get payroll dates |
| EXPORTING | ||
| P_PAYTY | = lv_p_payty | |
| P_PERNR | = lv_p_pernr | |
| P_PAYID | = lv_p_payid | |
| P_MOLGA | = lv_p_molga | |
| P_ABKRS | = lv_p_abkrs | |
| P_PABRJ | = lv_p_pabrj | |
| P_PABRP | = lv_p_pabrp | |
| P_BONDT | = lv_p_bondt | |
| P_BEGDA | = lv_p_begda | |
| P_ENDDA | = lv_p_endda | |
| IMPORTING | ||
| PDATE | = lv_pdate | |
| KKAN2 | = lv_kkan2 | |
| CTOUT | = lv_ctout | |
| CTOBD | = lv_ctobd | |
| CTOED | = lv_ctoed | |
| NAIBD | = lv_naibd | |
| NAIED | = lv_naied | |
| GAIBD | = lv_gaibd | |
| GAIED | = lv_gaied | |
| KKAN1 | = lv_kkan1 | |
| . " HR_GET_PAYROLL_DATES | ||
ABAP code using 7.40 inline data declarations to call FM HR_GET_PAYROLL_DATES
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 BONDT FROM T5J69 INTO @DATA(ld_pdate). | ||||
| "SELECT single PAYTY FROM T5J69 INTO @DATA(ld_p_payty). | ||||
| "SELECT single PERNR FROM PERNR INTO @DATA(ld_p_pernr). | ||||
| "SELECT single BONDT FROM T5J69 INTO @DATA(ld_ctout). | ||||
| "SELECT single PAYID FROM T5J69 INTO @DATA(ld_p_payid). | ||||
| "SELECT single BONDT FROM T5J69 INTO @DATA(ld_ctobd). | ||||
| "SELECT single MOLGA FROM T549S INTO @DATA(ld_p_molga). | ||||
| "SELECT single BONDT FROM T5J69 INTO @DATA(ld_ctoed). | ||||
| "SELECT single ABKRS FROM T549A INTO @DATA(ld_p_abkrs). | ||||
| "SELECT single BONDT FROM T5J69 INTO @DATA(ld_naibd). | ||||
| "SELECT single PABRJ FROM T549Q INTO @DATA(ld_p_pabrj). | ||||
| "SELECT single BONDT FROM T5J69 INTO @DATA(ld_naied). | ||||
| "SELECT single PABRP FROM T549Q INTO @DATA(ld_p_pabrp). | ||||
| "SELECT single BONDT FROM T5J69 INTO @DATA(ld_gaibd). | ||||
| "SELECT single BONDT FROM T5J69 INTO @DATA(ld_p_bondt). | ||||
| "SELECT single BONDT FROM T5J69 INTO @DATA(ld_gaied). | ||||
| "SELECT single BEGDA FROM T5J69 INTO @DATA(ld_p_begda). | ||||
| "SELECT single ENDDA FROM T5J69 INTO @DATA(ld_p_endda). | ||||
Search for further information about these or an SAP related objects