SAP Function CONVERT_TO_FOREIGN_CURRENCY - Translate local currency amount into foreign currency

Parameter Reference Type Length Default Optional Text
CLIENT SYST-MANDT C 3 SY-MANDT X
DATE SYST-DATUM D 8 Currency translation date
FOREIGN_CURRENCY 0 Currency key for foreign currency
LOCAL_AMOUNT 0 Amount in local currency
LOCAL_CURRENCY 0 Currency key for local currency
RATE 0 0 X Predefined exchange rate
READ_TCURR 0 'X' X Read exchange rate from table TCURR
TYPE_OF_RATE 0 'M' X Type of rate M=Average rate G=Bank buying rate B=bank selling rate

Parameter Reference Type Length Text
DERIVED_RATE_TYPE TCURR-KURST C 4 Alternative exchange rate, where used
EXCHANGE_RATE 0 Exchange rate 4.5
EXCHANGE_RATEX 0 Exchange rate 4.11
FIXED_RATE 0 Fixed exchange rate 4.5, if existent
FOREIGN_AMOUNT 0 Amount in foreign currency
FOREIGN_FACTOR 0 Factor for the foreign currency units
LOCAL_FACTOR 0 Factor for the local currency units

Exception Text
DERIVED_2_TIMES Exchange rate type derived more than once
NO_FACTORS_FOUND No conversion factors in TCURF
NO_RATE_FOUND No exch.rate entered in table TCURR
NO_SPREAD_FOUND No spread entered in table TCURS
OVERFLOW Field FOREIGN_AMOUNT is too small


An amount in foreign currency is calculated from a specified localcurrency amount. For this, you may either specify the translation ratemanually (Parameter RATE) or have the system determine it from tableTCURR on the basis of the rate type, date and currency key. Because theratios for the units of the currencies involved in the translation aresignificant for this translation, table TCURR is always read by theprogram, and there must be a valid entry there for the data specified.If exchange rate fixing is defined for exchange rate type TYPE_OF_RATE,or an alternative exchange rate type is defined for the currency pair,this information is transferred to the calling program.
When table TCURR is read, the foreign currency key is always taken asthe first part of the key and the local currency as the second part. Ifthis entry is not in the table, the key is re-read in reverse sequence.
Sample call-up:
CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'
EXPORTING DATE = BKPF-WWERT
FOREIGN_CURRENCY = BKPF-WAERS
LOCAL_CURRENCY = T001-WAERS
LOCAL_AMOUNT = BSEG-DMBTR
RATE = BKPF-KURSF
TYPE_OF_RATE = 'M'
IMPORTING EXCHANGE_RATE = KURS
FOREIGN_AMOUNT = BSEG-WRBTR
FOREIGN_FACTOR = FAKTOR-F
LOCAL_FACTOR = FAKTOR-L
EXCEPTIONS NO_RATE_FOUND = 4
NO_FACTORS_FOUND = 8.
The exchange rate used for conversion.field.table for the conversion.calculation, an exchange rate can be predefined.

Description
If this flag has been deleted and the IMPORT parameter 'RATE' has beengiven a value greater than zero, the following applies:
If the exchange rate type transfered or diverted to 'TYPE_OF_RATE' hasbeen fixed (tcurv-xfixd = 'X'), then the corresponding TCURR entry isread and the fixed exchange rate in the 'FIXED_RATE' parameterreturned. If there is no TCURR entry, the error message SG105 isissued.
For exchange rates that are not fixed, the TCURR is not read.
Otherwise the TCURR is read and the error message SG105 is issued ifthe required TCURR entry has not been found.
The currency factor (TCURF) must have been maintained.

Value range
INITIAL ODER 'X'

Default
'X'rate.

664711SG105 with billing document release
872116FAQ: Transfer and Update Rules
584166Payroll: Country exit for currency translations
360053Currency translation for value scales
373725Termination with CONVT_NO_NUMBER in XKOMV_BEWERTEN