Skip to Content
0
Former Member
Dec 05, 2007 at 12:40 PM

Exchange rate conversion

27 Views

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