SAP PAYDAY_DETERMINATION Function Module for Determine probable date of outflow or inflow funds
PAYDAY_DETERMINATION is a standard payday determination SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine probable date of outflow or inflow funds 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 payday determination FM, simply by entering the name PAYDAY_DETERMINATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: FIPD
Program Name: SAPLFIPD
Main Program: SAPLFIPD
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function PAYDAY_DETERMINATION 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 'PAYDAY_DETERMINATION'"Determine probable date of outflow or inflow funds.
EXPORTING
I_RF40D = "Transfer structure (fields from BKPF and BSEG)
* I_T001 = "
* PAYMENT_HISTORY = ' ' "X customer payment history is recorded
IMPORTING
PAYDAY = "probable date of the inflow and outflow of funds
XDISCOUNT = "X cash discount percent 1 is to be subtracted from amount
EXCEPTIONS
NOT_FOUND_T001 = 1 NOT_FOUND_LFB1 = 2
IMPORTING Parameters details for PAYDAY_DETERMINATION
I_RF40D - Transfer structure (fields from BKPF and BSEG)
Data type: RF40DOptional: No
Call by Reference: Yes
I_T001 -
Data type: T001Optional: Yes
Call by Reference: Yes
PAYMENT_HISTORY - X customer payment history is recorded
Data type: KNB1-XZVERDefault: SPACE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for PAYDAY_DETERMINATION
PAYDAY - probable date of the inflow and outflow of funds
Data type: RF40D-VALUTOptional: No
Call by Reference: Yes
XDISCOUNT - X cash discount percent 1 is to be subtracted from amount
Data type: T001-XFDISOptional: No
Call by Reference: Yes
EXCEPTIONS details
NOT_FOUND_T001 - Entry not in table 001
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND_LFB1 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PAYDAY_DETERMINATION 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_payday | TYPE RF40D-VALUT, " | |||
| lv_i_rf40d | TYPE RF40D, " | |||
| lv_not_found_t001 | TYPE RF40D, " | |||
| lv_i_t001 | TYPE T001, " | |||
| lv_xdiscount | TYPE T001-XFDIS, " | |||
| lv_not_found_lfb1 | TYPE T001, " | |||
| lv_payment_history | TYPE KNB1-XZVER. " SPACE |
|   CALL FUNCTION 'PAYDAY_DETERMINATION' "Determine probable date of outflow or inflow funds |
| EXPORTING | ||
| I_RF40D | = lv_i_rf40d | |
| I_T001 | = lv_i_t001 | |
| PAYMENT_HISTORY | = lv_payment_history | |
| IMPORTING | ||
| PAYDAY | = lv_payday | |
| XDISCOUNT | = lv_xdiscount | |
| EXCEPTIONS | ||
| NOT_FOUND_T001 = 1 | ||
| NOT_FOUND_LFB1 = 2 | ||
| . " PAYDAY_DETERMINATION | ||
ABAP code using 7.40 inline data declarations to call FM PAYDAY_DETERMINATION
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 VALUT FROM RF40D INTO @DATA(ld_payday). | ||||
| "SELECT single XFDIS FROM T001 INTO @DATA(ld_xdiscount). | ||||
| "SELECT single XZVER FROM KNB1 INTO @DATA(ld_payment_history). | ||||
| DATA(ld_payment_history) | = ' '. | |||
Search for further information about these or an SAP related objects