SAP CONVERSION_GIVING_RATE_F Function Module for Determine Floating Point Exchange Rate









CONVERSION_GIVING_RATE_F is a standard conversion giving 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 Determine 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 giving rate f FM, simply by entering the name CONVERSION_GIVING_RATE_F into the relevant SAP transaction such as SE37 or SE38.

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



Function CONVERSION_GIVING_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_GIVING_RATE_F'"Determine Floating Point Exchange Rate
EXPORTING
FOREIGN_AMOUNT = "Amount in Foreign Currency
* READ_TCURR = 'X' "Kurs aus Tabelle TCURR lese
FOREIGN_CURRENCY = "Foreign Currency
LOCAL_AMOUNT = "Amount in Local Currency
LOCAL_CURRENCY = "Local Currency
* DATUM = "
* KURST = 'M' "Kurstyp (zur Ermittlung der Kursfaktoren)
* RKURSBER = "Kursber. Kz. (zur Vorbelegung des Kurstyps)
* BUKRS = "Buchungskreis (zur Vorbelegung des Kursber.Kz)
* NOTAT = "Notationsrichtung für Währungsumrechnung

IMPORTING
RATE_F = "Kursverhältnis zwischen den Beträgen (Floating)
DERIVED_RATE_TYPE = "
FIXED_RATE = "

EXCEPTIONS
DERIVED_2_TIMES = 1 CURRENCY_IS_SPACE = 2 INVALID_CALL = 3 OVERFLOW = 4 NO_FACTORS = 5
.



IMPORTING Parameters details for CONVERSION_GIVING_RATE_F

FOREIGN_AMOUNT - Amount in Foreign Currency

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

READ_TCURR - Kurs aus Tabelle TCURR lese

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

FOREIGN_CURRENCY - Foreign Currency

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

LOCAL_AMOUNT - Amount in Local Currency

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

LOCAL_CURRENCY - Local Currency

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

DATUM -

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

KURST - Kurstyp (zur Ermittlung der Kursfaktoren)

Data type: TCURV-KURST
Default: 'M'
Optional: Yes
Call by Reference: No ( called with pass by value option)

RKURSBER - Kursber. Kz. (zur Vorbelegung des Kurstyps)

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

BUKRS - Buchungskreis (zur Vorbelegung des Kursber.Kz)

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

NOTAT - Notationsrichtung für Währungsumrechnung

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

EXPORTING Parameters details for CONVERSION_GIVING_RATE_F

RATE_F - Kursverhältnis zwischen den Beträgen (Floating)

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

DERIVED_RATE_TYPE -

Data type: TCURR-KURST
Optional: 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)

CURRENCY_IS_SPACE -

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)

NO_FACTORS -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CONVERSION_GIVING_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_rate_f  TYPE STRING, "   
lv_foreign_amount  TYPE STRING, "   
lv_derived_2_times  TYPE STRING, "   
lv_read_tcurr  TYPE STRING, "   'X'
lv_foreign_currency  TYPE T001-WAERS, "   
lv_currency_is_space  TYPE T001, "   
lv_derived_rate_type  TYPE TCURR-KURST, "   
lv_fixed_rate  TYPE TCURR, "   
lv_invalid_call  TYPE TCURR, "   
lv_local_amount  TYPE TCURR, "   
lv_overflow  TYPE TCURR, "   
lv_local_currency  TYPE T001-WAERS, "   
lv_datum  TYPE SY-DATUM, "   
lv_no_factors  TYPE SY, "   
lv_kurst  TYPE TCURV-KURST, "   'M'
lv_rkursber  TYPE TCURB-RKURSBER, "   
lv_bukrs  TYPE T001-BUKRS, "   
lv_notat  TYPE NOTAT_CURR. "   

  CALL FUNCTION 'CONVERSION_GIVING_RATE_F'  "Determine Floating Point Exchange Rate
    EXPORTING
         FOREIGN_AMOUNT = lv_foreign_amount
         READ_TCURR = lv_read_tcurr
         FOREIGN_CURRENCY = lv_foreign_currency
         LOCAL_AMOUNT = lv_local_amount
         LOCAL_CURRENCY = lv_local_currency
         DATUM = lv_datum
         KURST = lv_kurst
         RKURSBER = lv_rkursber
         BUKRS = lv_bukrs
         NOTAT = lv_notat
    IMPORTING
         RATE_F = lv_rate_f
         DERIVED_RATE_TYPE = lv_derived_rate_type
         FIXED_RATE = lv_fixed_rate
    EXCEPTIONS
        DERIVED_2_TIMES = 1
        CURRENCY_IS_SPACE = 2
        INVALID_CALL = 3
        OVERFLOW = 4
        NO_FACTORS = 5
. " CONVERSION_GIVING_RATE_F




ABAP code using 7.40 inline data declarations to call FM CONVERSION_GIVING_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.

 
 
 
DATA(ld_read_tcurr) = 'X'.
 
"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).
 
 


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!