Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Exchange Rate Comparison ( SD )

Former Member
0 Likes
783

Hi All,

I need to develop an Exchange Rate Comparison Report.

The selection sciteria should allow for:

- a range of From and To Currency Codes

- 2 dates for comparison.

The Exchange Rate Type would be 'M'.

I need the Exchange Rate and the Translation Ratio in the output.

Would Exchange Rate be the field TCURR-UKURS?

And also how do I calculate the Translation Ratio?

Any help will highly be appreciated.......

Hi All,

I need to develop an Exchange Rate Comparison Report.

The selection sciteria should allow for:

- a range of From and To Currency Codes

- 2 dates for comparison.

The Exchange Rate Type would be 'M'.

I need the Exchange Rate and the Translation Ratio in the output.

Would Exchange Rate be the field TCURR-UKURS?

And also how do I calculate the Translation Ratio?

Any help will highly be appreciated.......

3 REPLIES 3
Read only

Former Member
0 Likes
695

Hi,

You can use the FM CALCULATE_EXCHANGE_RATE.

Pass the foreign currency, local currency, rate type as 'M'.

Here you can also give the amounts to get converted.

And also you are right, You can use the field TCURR-UKURS as the exchange rate.

But better if possibel use above FM.

Regards,

Shahu

Read only

Former Member
0 Likes
695

Hi Anita,

<b>CTABL</b> Exchange rate table from currency conversion

<b>CTYPE</b> Exchange rate type 'M','B','G' from CURRENCY CONVERSION

See the below simple program for exchange rate

DATA: l_er TYPE tcurr-ukurs, "
l_ff TYPE tcurr-ffact,
l_lf TYPE tcurr-tfact,
l_erate(12) TYPE c,

CALL FUNCTION 'READ_EXCHANGE_RATE'
EXPORTING
date = sy-datum
foreign_currency = wa_bseg-pswsl
local_currency = c_euro
type_of_rate = 'M'
IMPORTING
exchange_rate = l_er
foreign_factor = l_ff
local_factor = l_lf
EXCEPTIONS
no_rate_found = 1
no_factors_found = 2
no_spread_found = 3
derived_2_times = 4
overflow = 5
OTHERS = 6.
IF sy-subrc = 0.
l_erate = l_er / ( l_ff / l_lf ).
wa_itab-wrbtr = wa_itab-wrbtr * l_erate.

ENDIF.

Regards

Sudheer

Read only

Former Member
0 Likes
695

Find Rate Based on Amounts, Currency Keys and Date

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.

try this...with date taking from the select-options and pass it to every time in a loop.