SAP DET_VALUE_DATE_FOR_PAYMENT Function Module for Determine value date from tables T012A and T012C
DET_VALUE_DATE_FOR_PAYMENT is a standard det value date for payment 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 value date from tables T012A and T012C 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 det value date for payment FM, simply by entering the name DET_VALUE_DATE_FOR_PAYMENT into the relevant SAP transaction such as SE37 or SE38.
Function Group: FDV1
Program Name: SAPLFDV1
Main Program:
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function DET_VALUE_DATE_FOR_PAYMENT 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 'DET_VALUE_DATE_FOR_PAYMENT'"Determine value date from tables T012A and T012C.
EXPORTING
* I_BLDAT = SY-DATUM "Document date
* I_BUDAT = SY-DATUM "Posting date
I_BUKRS = "Company code
* I_FAEDT = SY-DATUM "Due date
I_HBKID = "House bank key
I_HKTID = "Bank account key
* I_VORGN = ' ' "
* I_WBGRU = ' ' "Bank group of partner
I_ZLSCH = "Payment method
IMPORTING
E_VORGA = "
VALUTA = "Value date
EXCEPTIONS
CAL_ID_ERROR = 1 NOT_FOUND_IN_T012A = 2 NOT_FOUND_IN_T012C = 3 ERROR_IN_T012C = 4
IMPORTING Parameters details for DET_VALUE_DATE_FOR_PAYMENT
I_BLDAT - Document date
Data type: BKPF-BLDATDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BUDAT - Posting date
Data type: BKPF-BUDATDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_BUKRS - Company code
Data type: T001-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_FAEDT - Due date
Data type: BSEG-ZFBDTDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_HBKID - House bank key
Data type: T012A-HBKIDOptional: No
Call by Reference: No ( called with pass by value option)
I_HKTID - Bank account key
Data type: T012C-HKTIDOptional: No
Call by Reference: No ( called with pass by value option)
I_VORGN -
Data type: T012A-VORGNDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_WBGRU - Bank group of partner
Data type: T012A-WBGRUDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ZLSCH - Payment method
Data type: T012A-ZLSCHOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for DET_VALUE_DATE_FOR_PAYMENT
E_VORGA -
Data type: T012A-VORGAOptional: No
Call by Reference: No ( called with pass by value option)
VALUTA - Value date
Data type: BSEG-VALUTOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CAL_ID_ERROR - Error via calendar ID in T012C
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND_IN_T012A - Payment method, Hse bank..not mntned in T012A
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND_IN_T012C - Transaction not maintained in T012C
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_IN_T012C -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for DET_VALUE_DATE_FOR_PAYMENT 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_e_vorga | TYPE T012A-VORGA, " | |||
| lv_i_bldat | TYPE BKPF-BLDAT, " SY-DATUM | |||
| lv_cal_id_error | TYPE BKPF, " | |||
| lv_valuta | TYPE BSEG-VALUT, " | |||
| lv_i_budat | TYPE BKPF-BUDAT, " SY-DATUM | |||
| lv_not_found_in_t012a | TYPE BKPF, " | |||
| lv_i_bukrs | TYPE T001-BUKRS, " | |||
| lv_not_found_in_t012c | TYPE T001, " | |||
| lv_i_faedt | TYPE BSEG-ZFBDT, " SY-DATUM | |||
| lv_error_in_t012c | TYPE BSEG, " | |||
| lv_i_hbkid | TYPE T012A-HBKID, " | |||
| lv_i_hktid | TYPE T012C-HKTID, " | |||
| lv_i_vorgn | TYPE T012A-VORGN, " SPACE | |||
| lv_i_wbgru | TYPE T012A-WBGRU, " SPACE | |||
| lv_i_zlsch | TYPE T012A-ZLSCH. " |
|   CALL FUNCTION 'DET_VALUE_DATE_FOR_PAYMENT' "Determine value date from tables T012A and T012C |
| EXPORTING | ||
| I_BLDAT | = lv_i_bldat | |
| I_BUDAT | = lv_i_budat | |
| I_BUKRS | = lv_i_bukrs | |
| I_FAEDT | = lv_i_faedt | |
| I_HBKID | = lv_i_hbkid | |
| I_HKTID | = lv_i_hktid | |
| I_VORGN | = lv_i_vorgn | |
| I_WBGRU | = lv_i_wbgru | |
| I_ZLSCH | = lv_i_zlsch | |
| IMPORTING | ||
| E_VORGA | = lv_e_vorga | |
| VALUTA | = lv_valuta | |
| EXCEPTIONS | ||
| CAL_ID_ERROR = 1 | ||
| NOT_FOUND_IN_T012A = 2 | ||
| NOT_FOUND_IN_T012C = 3 | ||
| ERROR_IN_T012C = 4 | ||
| . " DET_VALUE_DATE_FOR_PAYMENT | ||
ABAP code using 7.40 inline data declarations to call FM DET_VALUE_DATE_FOR_PAYMENT
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 VORGA FROM T012A INTO @DATA(ld_e_vorga). | ||||
| "SELECT single BLDAT FROM BKPF INTO @DATA(ld_i_bldat). | ||||
| DATA(ld_i_bldat) | = SY-DATUM. | |||
| "SELECT single VALUT FROM BSEG INTO @DATA(ld_valuta). | ||||
| "SELECT single BUDAT FROM BKPF INTO @DATA(ld_i_budat). | ||||
| DATA(ld_i_budat) | = SY-DATUM. | |||
| "SELECT single BUKRS FROM T001 INTO @DATA(ld_i_bukrs). | ||||
| "SELECT single ZFBDT FROM BSEG INTO @DATA(ld_i_faedt). | ||||
| DATA(ld_i_faedt) | = SY-DATUM. | |||
| "SELECT single HBKID FROM T012A INTO @DATA(ld_i_hbkid). | ||||
| "SELECT single HKTID FROM T012C INTO @DATA(ld_i_hktid). | ||||
| "SELECT single VORGN FROM T012A INTO @DATA(ld_i_vorgn). | ||||
| DATA(ld_i_vorgn) | = ' '. | |||
| "SELECT single WBGRU FROM T012A INTO @DATA(ld_i_wbgru). | ||||
| DATA(ld_i_wbgru) | = ' '. | |||
| "SELECT single ZLSCH FROM T012A INTO @DATA(ld_i_zlsch). | ||||
Search for further information about these or an SAP related objects