SAP FI_FIND_PAYMENT_CONDITIONS Function Module for Determine cash discount using ZTERM and document, posting, CPU, base date









FI_FIND_PAYMENT_CONDITIONS is a standard fi find payment conditions 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 cash discount using ZTERM and document, posting, CPU, base date 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 fi find payment conditions FM, simply by entering the name FI_FIND_PAYMENT_CONDITIONS into the relevant SAP transaction such as SE37 or SE38.

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



Function FI_FIND_PAYMENT_CONDITIONS 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 'FI_FIND_PAYMENT_CONDITIONS'"Determine cash discount using ZTERM and document, posting, CPU, base date
EXPORTING
I_ZTERM = "Terms of payment key
* I_BUKRS = "Company Code
I_BLDAT = "Document date
I_BUDAT = "Posting date
* I_CPUDT = SY-DATLO "System date
* I_ZFBDT = 00000000 "Base date (optional) default 00000000
* I_FUNCL = ' ' "Function class from transaction control
* I_REINDAT = "Invoice Receipt Date
* I_PPA_EX_IND = "Excluding/Including Indicator
* I_LIFNR = "Account Number of Vendor

IMPORTING
E_T052 = "Payment terms work area
E_ZFBDT = "Calculated base date
E_SKLIN = "Cash discount
E_XSPLT = "

EXCEPTIONS
TERMS_INCORRECT = 1 TERMS_NOT_FOUND = 2 NO_DATE_ENTERED = 3 NO_DAY_LIMIT_FOUND = 4
.



IMPORTING Parameters details for FI_FIND_PAYMENT_CONDITIONS

I_ZTERM - Terms of payment key

Data type: T052-ZTERM
Optional: No
Call by Reference: No ( called with pass by value option)

I_BUKRS - Company Code

Data type: BKPF-BUKRS
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BLDAT - Document date

Data type: BKPF-BLDAT
Optional: No
Call by Reference: No ( called with pass by value option)

I_BUDAT - Posting date

Data type: BKPF-BUDAT
Optional: No
Call by Reference: No ( called with pass by value option)

I_CPUDT - System date

Data type: BKPF-CPUDT
Default: SY-DATLO
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ZFBDT - Base date (optional) default 00000000

Data type: BSEG-ZFBDT
Default: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FUNCL - Function class from transaction control

Data type: T020-FUNCL
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_REINDAT - Invoice Receipt Date

Data type: BKPF-REINDAT
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_PPA_EX_IND - Excluding/Including Indicator

Data type: BSEG-PPA_EX_IND
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LIFNR - Account Number of Vendor

Data type: BSEG-LIFNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for FI_FIND_PAYMENT_CONDITIONS

E_T052 - Payment terms work area

Data type: T052
Optional: No
Call by Reference: No ( called with pass by value option)

E_ZFBDT - Calculated base date

Data type: BSEG-ZFBDT
Optional: No
Call by Reference: No ( called with pass by value option)

E_SKLIN - Cash discount

Data type: SKLIN
Optional: No
Call by Reference: No ( called with pass by value option)

E_XSPLT -

Data type: T052-XSPLT
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

TERMS_INCORRECT - Cash discount line invalid

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TERMS_NOT_FOUND - Key not found in T052

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_DATE_ENTERED - No import parameters defined

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_DAY_LIMIT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for FI_FIND_PAYMENT_CONDITIONS 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_t052  TYPE T052, "   
lv_i_zterm  TYPE T052-ZTERM, "   
lv_terms_incorrect  TYPE T052, "   
lv_i_bukrs  TYPE BKPF-BUKRS, "   
lv_e_zfbdt  TYPE BSEG-ZFBDT, "   
lv_i_bldat  TYPE BKPF-BLDAT, "   
lv_terms_not_found  TYPE BKPF, "   
lv_e_sklin  TYPE SKLIN, "   
lv_i_budat  TYPE BKPF-BUDAT, "   
lv_no_date_entered  TYPE BKPF, "   
lv_e_xsplt  TYPE T052-XSPLT, "   
lv_i_cpudt  TYPE BKPF-CPUDT, "   SY-DATLO
lv_no_day_limit_found  TYPE BKPF, "   
lv_i_zfbdt  TYPE BSEG-ZFBDT, "   00000000
lv_i_funcl  TYPE T020-FUNCL, "   SPACE
lv_i_reindat  TYPE BKPF-REINDAT, "   
lv_i_ppa_ex_ind  TYPE BSEG-PPA_EX_IND, "   
lv_i_lifnr  TYPE BSEG-LIFNR. "   

  CALL FUNCTION 'FI_FIND_PAYMENT_CONDITIONS'  "Determine cash discount using ZTERM and document, posting, CPU, base date
    EXPORTING
         I_ZTERM = lv_i_zterm
         I_BUKRS = lv_i_bukrs
         I_BLDAT = lv_i_bldat
         I_BUDAT = lv_i_budat
         I_CPUDT = lv_i_cpudt
         I_ZFBDT = lv_i_zfbdt
         I_FUNCL = lv_i_funcl
         I_REINDAT = lv_i_reindat
         I_PPA_EX_IND = lv_i_ppa_ex_ind
         I_LIFNR = lv_i_lifnr
    IMPORTING
         E_T052 = lv_e_t052
         E_ZFBDT = lv_e_zfbdt
         E_SKLIN = lv_e_sklin
         E_XSPLT = lv_e_xsplt
    EXCEPTIONS
        TERMS_INCORRECT = 1
        TERMS_NOT_FOUND = 2
        NO_DATE_ENTERED = 3
        NO_DAY_LIMIT_FOUND = 4
. " FI_FIND_PAYMENT_CONDITIONS




ABAP code using 7.40 inline data declarations to call FM FI_FIND_PAYMENT_CONDITIONS

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 ZTERM FROM T052 INTO @DATA(ld_i_zterm).
 
 
"SELECT single BUKRS FROM BKPF INTO @DATA(ld_i_bukrs).
 
"SELECT single ZFBDT FROM BSEG INTO @DATA(ld_e_zfbdt).
 
"SELECT single BLDAT FROM BKPF INTO @DATA(ld_i_bldat).
 
 
 
"SELECT single BUDAT FROM BKPF INTO @DATA(ld_i_budat).
 
 
"SELECT single XSPLT FROM T052 INTO @DATA(ld_e_xsplt).
 
"SELECT single CPUDT FROM BKPF INTO @DATA(ld_i_cpudt).
DATA(ld_i_cpudt) = SY-DATLO.
 
 
"SELECT single ZFBDT FROM BSEG INTO @DATA(ld_i_zfbdt).
DATA(ld_i_zfbdt) = 00000000.
 
"SELECT single FUNCL FROM T020 INTO @DATA(ld_i_funcl).
DATA(ld_i_funcl) = ' '.
 
"SELECT single REINDAT FROM BKPF INTO @DATA(ld_i_reindat).
 
"SELECT single PPA_EX_IND FROM BSEG INTO @DATA(ld_i_ppa_ex_ind).
 
"SELECT single LIFNR FROM BSEG INTO @DATA(ld_i_lifnr).
 


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!