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

Function CONVERSION_WITH_RATE_F 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 'CONVERSION_WITH_RATE_F'"Currency Conversion with Floating Point Exchange Rate.
EXPORTING
FOREIGN_AMOUNT = "Amount in Foreign Currency
* ROUND_PROC = "Rounding Rule for FX Conversion at Valuation
FOREIGN_CURRENCY = "Foreign Currency
LOCAL_CURRENCY = "Local Currency
RATE_F = "Umrechnungskurs (Floating Point)
* DATUM = "
* KURST = 'M' "Kurstyp (zur Ermittlung der Kursfaktoren)
* RKURSBER = "Kursber. Kz. (zur Vorbelegung des Kurstyps)
* BUKRS = "Buchungskreis (zur Vorbelegung des Kursber.Kz.)
* READ_TCURR = 'X' "Read exchange rate from table TCURR
IMPORTING
LOCAL_AMOUNT = "Amount in Local Currency
DERIVED_RATE_TYPE = "
FIXED_RATE = "
EXCEPTIONS
DERIVED_2_TIMES = 1 INVALID_CALL = 2 OVERFLOW = 3
IMPORTING Parameters details for CONVERSION_WITH_RATE_F
FOREIGN_AMOUNT - Amount in Foreign Currency
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ROUND_PROC - Rounding Rule for FX Conversion at Valuation
Data type: TPM_ROUND_PROCOptional: Yes
Call by Reference: No ( called with pass by value option)
FOREIGN_CURRENCY - Foreign Currency
Data type: T001-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
LOCAL_CURRENCY - Local Currency
Data type: T001-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
RATE_F - Umrechnungskurs (Floating Point)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DATUM -
Data type: SY-DATUMOptional: Yes
Call by Reference: No ( called with pass by value option)
KURST - Kurstyp (zur Ermittlung der Kursfaktoren)
Data type: TCURV-KURSTDefault: 'M'
Optional: Yes
Call by Reference: No ( called with pass by value option)
RKURSBER - Kursber. Kz. (zur Vorbelegung des Kurstyps)
Data type: TCURB-RKURSBEROptional: Yes
Call by Reference: No ( called with pass by value option)
BUKRS - Buchungskreis (zur Vorbelegung des Kursber.Kz.)
Data type: T001-BUKRSOptional: Yes
Call by Reference: No ( called with pass by value option)
READ_TCURR - Read exchange rate from table TCURR
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CONVERSION_WITH_RATE_F
LOCAL_AMOUNT - Amount in Local Currency
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DERIVED_RATE_TYPE -
Data type: TCURR-KURSTOptional: No
Call by Reference: No ( called with pass by value option)
FIXED_RATE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
DERIVED_2_TIMES -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_CALL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OVERFLOW -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CONVERSION_WITH_RATE_F 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_local_amount | TYPE STRING, " | |||
| lv_foreign_amount | TYPE STRING, " | |||
| lv_derived_2_times | TYPE STRING, " | |||
| lv_round_proc | TYPE TPM_ROUND_PROC, " | |||
| lv_invalid_call | TYPE TPM_ROUND_PROC, " | |||
| lv_foreign_currency | TYPE T001-WAERS, " | |||
| lv_derived_rate_type | TYPE TCURR-KURST, " | |||
| lv_overflow | TYPE TCURR, " | |||
| lv_fixed_rate | TYPE TCURR, " | |||
| lv_local_currency | TYPE T001-WAERS, " | |||
| lv_rate_f | TYPE T001, " | |||
| lv_datum | TYPE SY-DATUM, " | |||
| lv_kurst | TYPE TCURV-KURST, " 'M' | |||
| lv_rkursber | TYPE TCURB-RKURSBER, " | |||
| lv_bukrs | TYPE T001-BUKRS, " | |||
| lv_read_tcurr | TYPE T001. " 'X' |
|   CALL FUNCTION 'CONVERSION_WITH_RATE_F' "Currency Conversion with Floating Point Exchange Rate |
| EXPORTING | ||
| FOREIGN_AMOUNT | = lv_foreign_amount | |
| ROUND_PROC | = lv_round_proc | |
| FOREIGN_CURRENCY | = lv_foreign_currency | |
| LOCAL_CURRENCY | = lv_local_currency | |
| RATE_F | = lv_rate_f | |
| DATUM | = lv_datum | |
| KURST | = lv_kurst | |
| RKURSBER | = lv_rkursber | |
| BUKRS | = lv_bukrs | |
| READ_TCURR | = lv_read_tcurr | |
| IMPORTING | ||
| LOCAL_AMOUNT | = lv_local_amount | |
| DERIVED_RATE_TYPE | = lv_derived_rate_type | |
| FIXED_RATE | = lv_fixed_rate | |
| EXCEPTIONS | ||
| DERIVED_2_TIMES = 1 | ||
| INVALID_CALL = 2 | ||
| OVERFLOW = 3 | ||
| . " CONVERSION_WITH_RATE_F | ||
ABAP code using 7.40 inline data declarations to call FM CONVERSION_WITH_RATE_F
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 WAERS FROM T001 INTO @DATA(ld_foreign_currency). | ||||
| "SELECT single KURST FROM TCURR INTO @DATA(ld_derived_rate_type). | ||||
| "SELECT single WAERS FROM T001 INTO @DATA(ld_local_currency). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_datum). | ||||
| "SELECT single KURST FROM TCURV INTO @DATA(ld_kurst). | ||||
| DATA(ld_kurst) | = 'M'. | |||
| "SELECT single RKURSBER FROM TCURB INTO @DATA(ld_rkursber). | ||||
| "SELECT single BUKRS FROM T001 INTO @DATA(ld_bukrs). | ||||
| DATA(ld_read_tcurr) | = 'X'. | |||
Search for further information about these or an SAP related objects