Application Development 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: 

Exchange rate conversion

Former Member
0 Kudos

Hi,

I need to convert from document currecncy to local currency

I am using

CALL FUNCTION 'CONVERT_CURRENCY_BY_RATE'

EXPORTING

from_amount = w_output_data-amount

from_currency = w_output_data-doccurr

from_factor = myform_factor

rate = frate "myrate "w_output_data-erate

to_currency = w_output_data-localcurr

to_factor = myform_factor

IMPORTING

to_amount = w_output_data-local_amount

EXCEPTIONS

no_rate_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

The problem I get is w_output_data-amount is using the internal format of the amount, but when it displays it on the screen it is the correct amount, but when going into the function it does not have the rate number as in the screen displays 125,000 but the amount going into the function 1250.00 , this is for JPY

Thanks

5 REPLIES 5

Former Member
0 Kudos

I am getting the amount from KONV, and in there even though the amount in JPY is 125000 it stores it as 1250.00

Any Ideas ?

Former Member
0 Kudos

Slims,

Check this post

Regards,

Satish

0 Kudos

The problem I have got is KONV-KWERT holds the value as 1250.00 and the actual value is 125000

I need a way of ensuring it is converted correctly?

0 Kudos

Hello Sims

Check the translation ratios maintained in TCURF for JPY

Regards

Arun

0 Kudos

Hi,

I did , what I am doing is from JPY to GBP and the ratio does not appear to be filled in that is it is 1.

Strangely, even though it is stored as 1250.00 , when displayed in the ALV grid it comes out to the correct value of 125000

Any Ideas?