Ansicht
Dokumentation
CALCULATE_EXCHANGE_RATE - Find Rate Based on Amounts, Currency Keys and Date
Fill RESBD Structure from EBP Component Structure General Material DataThis documentation is copyright by SAP AG.
A translation rate is determined from the amounts entered. As the rate is also dependent on the units
of each individual currency, (e.g. a DEM/ITL rate of 1.67 with the units 1 DEM and 1000 ITL means that
1 DEM is equal to 1670 ITL), table TCURR must also be read before the rate can be established. For this,
you need both currency keys, an exchange rate type and a validity date. The factors determined in this
way are transferred to the calling program along with the determined rate. If exchange rate fixing is
defined for exchange rate type TYPE_OF_RATE, this information is transferred to the calling program.
If one amount is calculated from the other even where a fixed exchange rate is used, this amount is returned instead of the rate calculated.
Example call-up:
CALL FUNCTION 'CALCULATE_EXCHANGE_RATE'
EXPORTING DATE = BKPF-WWERT
FOREIGN_AMOUNT = BSEG-WRBTR
FOREIGN_CURRENCY = BKPF-WAERS
LOCAL_AMOUNT = BSEG-DMBTR
LOCAL_CURRENCY = T001-WAERS
TYPE_OF_RATE = 'M'
IMPORTING EXCHANGE_RATE = KURS
FOREIGN_FACTOR = FAKTOR-F
LOCAL_FACTOR = FAKTOR-L
Exceptions NO_RATE_COMPUTABLE = 4
NO_RATE_FOUND = 8
NO_FACTORS_FOUND = 12.
Parameters
CLIENTDATE
DERIVED_RATE_TYPE
EXCHANGE_RATE
FIXED_RATE
FOREIGN_AMOUNT
FOREIGN_CURRENCY
FOREIGN_FACTOR
LOCAL_AMOUNT
LOCAL_CURRENCY
LOCAL_FACTOR
TYPE_OF_RATE
Exceptions
DERIVED_2_TIMESNO_FACTORS_FOUND
NO_RATE_COMPUTABLE
NO_RATE_FOUND
NO_SPREAD_FOUND
OVERFLOW
RATE_TOO_BIG
Function Group
SCUNTXBHW - Original Tax Base Amount in Local Currency BAL Application Log Documentation
This documentation is copyright by SAP AG.
Length: 2546 Date: 20240523 Time: 062121 sap01-206 ( 50 ms )