SAP TB_EVALUATION_RATE_FIND Function Module for Treasury: Determine Exchange Rate
TB_EVALUATION_RATE_FIND is a standard tb evaluation rate find SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Treasury: Determine Exchange Rate 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 tb evaluation rate find FM, simply by entering the name TB_EVALUATION_RATE_FIND into the relevant SAP transaction such as SE37 or SE38.
Function Group: TB16
Program Name: SAPLTB16
Main Program: SAPLTB16
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TB_EVALUATION_RATE_FIND 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 'TB_EVALUATION_RATE_FIND'"Treasury: Determine Exchange Rate.
EXPORTING
* BEWERTUNGSBEREICH = '01' "
STICHTAG = "
VORZEICHEN_WAEHRUNGSBETRAG = "
* KURSTYP = "
* KURSFINDUNG = "
* ONLY_SWAP = "
BUCHUNGSKREIS = "
FAELLIGKEIT = "
FREMDWAEHRUNG = "
FREMDWAEHRUNGSBETRAG = "
* GESCHAEFT = ' ' "
GESCHAEFTSART = "
HAUSWAEHRUNG = "
PRODUKTART = "
IMPORTING
HAUSWAEHRUNGSBETRAG = "
HAUSWAEHRUNGSKURS = "
SWAPSATZ = "
EXCEPTIONS
NO_SWAP_FOUND = 1
IMPORTING Parameters details for TB_EVALUATION_RATE_FIND
BEWERTUNGSBEREICH -
Data type: AT10B-SREVRNGDefault: '01'
Optional: Yes
Call by Reference: No ( called with pass by value option)
STICHTAG -
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
VORZEICHEN_WAEHRUNGSBETRAG -
Data type: VTBFHAPO-SSIGNOptional: No
Call by Reference: No ( called with pass by value option)
KURSTYP -
Data type: AT10B-KTYPSKOptional: Yes
Call by Reference: No ( called with pass by value option)
KURSFINDUNG -
Data type: AT10B-SFWKURSOptional: Yes
Call by Reference: No ( called with pass by value option)
ONLY_SWAP -
Data type:Optional: Yes
Call by Reference: Yes
BUCHUNGSKREIS -
Data type: AT10B-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
FAELLIGKEIT -
Data type: VTBFHAPO-DZTERMOptional: No
Call by Reference: No ( called with pass by value option)
FREMDWAEHRUNG -
Data type: VTBFHAPO-WZBETROptional: No
Call by Reference: No ( called with pass by value option)
FREMDWAEHRUNGSBETRAG -
Data type: VTBFHAPO-BZBETROptional: No
Call by Reference: No ( called with pass by value option)
GESCHAEFT -
Data type: VTBFHA-RFHADefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
GESCHAEFTSART -
Data type: AT10B-SFHAARTOptional: No
Call by Reference: No ( called with pass by value option)
HAUSWAEHRUNG -
Data type: T001-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
PRODUKTART -
Data type: AT10B-SGSARTOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TB_EVALUATION_RATE_FIND
HAUSWAEHRUNGSBETRAG -
Data type: VTBFHAPO-BHWBETROptional: No
Call by Reference: No ( called with pass by value option)
HAUSWAEHRUNGSKURS -
Data type: TCURR-UKURSOptional: No
Call by Reference: No ( called with pass by value option)
SWAPSATZ -
Data type: AT15-KKURSOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_SWAP_FOUND -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for TB_EVALUATION_RATE_FIND 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_no_swap_found | TYPE STRING, " | |||
| lv_bewertungsbereich | TYPE AT10B-SREVRNG, " '01' | |||
| lv_hauswaehrungsbetrag | TYPE VTBFHAPO-BHWBETR, " | |||
| lv_stichtag | TYPE SY-DATUM, " | |||
| lv_vorzeichen_waehrungsbetrag | TYPE VTBFHAPO-SSIGN, " | |||
| lv_kurstyp | TYPE AT10B-KTYPSK, " | |||
| lv_kursfindung | TYPE AT10B-SFWKURS, " | |||
| lv_only_swap | TYPE AT10B, " | |||
| lv_buchungskreis | TYPE AT10B-BUKRS, " | |||
| lv_hauswaehrungskurs | TYPE TCURR-UKURS, " | |||
| lv_swapsatz | TYPE AT15-KKURS, " | |||
| lv_faelligkeit | TYPE VTBFHAPO-DZTERM, " | |||
| lv_fremdwaehrung | TYPE VTBFHAPO-WZBETR, " | |||
| lv_fremdwaehrungsbetrag | TYPE VTBFHAPO-BZBETR, " | |||
| lv_geschaeft | TYPE VTBFHA-RFHA, " SPACE | |||
| lv_geschaeftsart | TYPE AT10B-SFHAART, " | |||
| lv_hauswaehrung | TYPE T001-WAERS, " | |||
| lv_produktart | TYPE AT10B-SGSART. " |
|   CALL FUNCTION 'TB_EVALUATION_RATE_FIND' "Treasury: Determine Exchange Rate |
| EXPORTING | ||
| BEWERTUNGSBEREICH | = lv_bewertungsbereich | |
| STICHTAG | = lv_stichtag | |
| VORZEICHEN_WAEHRUNGSBETRAG | = lv_vorzeichen_waehrungsbetrag | |
| KURSTYP | = lv_kurstyp | |
| KURSFINDUNG | = lv_kursfindung | |
| ONLY_SWAP | = lv_only_swap | |
| BUCHUNGSKREIS | = lv_buchungskreis | |
| FAELLIGKEIT | = lv_faelligkeit | |
| FREMDWAEHRUNG | = lv_fremdwaehrung | |
| FREMDWAEHRUNGSBETRAG | = lv_fremdwaehrungsbetrag | |
| GESCHAEFT | = lv_geschaeft | |
| GESCHAEFTSART | = lv_geschaeftsart | |
| HAUSWAEHRUNG | = lv_hauswaehrung | |
| PRODUKTART | = lv_produktart | |
| IMPORTING | ||
| HAUSWAEHRUNGSBETRAG | = lv_hauswaehrungsbetrag | |
| HAUSWAEHRUNGSKURS | = lv_hauswaehrungskurs | |
| SWAPSATZ | = lv_swapsatz | |
| EXCEPTIONS | ||
| NO_SWAP_FOUND = 1 | ||
| . " TB_EVALUATION_RATE_FIND | ||
ABAP code using 7.40 inline data declarations to call FM TB_EVALUATION_RATE_FIND
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 SREVRNG FROM AT10B INTO @DATA(ld_bewertungsbereich). | ||||
| DATA(ld_bewertungsbereich) | = '01'. | |||
| "SELECT single BHWBETR FROM VTBFHAPO INTO @DATA(ld_hauswaehrungsbetrag). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_stichtag). | ||||
| "SELECT single SSIGN FROM VTBFHAPO INTO @DATA(ld_vorzeichen_waehrungsbetrag). | ||||
| "SELECT single KTYPSK FROM AT10B INTO @DATA(ld_kurstyp). | ||||
| "SELECT single SFWKURS FROM AT10B INTO @DATA(ld_kursfindung). | ||||
| "SELECT single BUKRS FROM AT10B INTO @DATA(ld_buchungskreis). | ||||
| "SELECT single UKURS FROM TCURR INTO @DATA(ld_hauswaehrungskurs). | ||||
| "SELECT single KKURS FROM AT15 INTO @DATA(ld_swapsatz). | ||||
| "SELECT single DZTERM FROM VTBFHAPO INTO @DATA(ld_faelligkeit). | ||||
| "SELECT single WZBETR FROM VTBFHAPO INTO @DATA(ld_fremdwaehrung). | ||||
| "SELECT single BZBETR FROM VTBFHAPO INTO @DATA(ld_fremdwaehrungsbetrag). | ||||
| "SELECT single RFHA FROM VTBFHA INTO @DATA(ld_geschaeft). | ||||
| DATA(ld_geschaeft) | = ' '. | |||
| "SELECT single SFHAART FROM AT10B INTO @DATA(ld_geschaeftsart). | ||||
| "SELECT single WAERS FROM T001 INTO @DATA(ld_hauswaehrung). | ||||
| "SELECT single SGSART FROM AT10B INTO @DATA(ld_produktart). | ||||
Search for further information about these or an SAP related objects