07-30-2013 11:27 AM
Hello Expert,
I am facing an issue with the FM CONVERT_TO_LOCAL_CURRENCY.
It is not returning correct exchange rate, however it is converting the amount fine.
The exchange rate returned is in multiples of '1000' of what is used for the conversion.
I am exporting the following values to the FM from my report.
EXPORTING
CLIENT = SY-MANDT
DATE = SY-DATUM
FOREIGN_AMOUNT = '43.16'
FOREIGN_CURRENCY = 'USD'
LOCAL_CURRENCY = 'INR'
* RATE = 0
TYPE_OF_RATE = 'EXGI'
READ_TCURR = 'X'
IMPORTING
LOCAL_AMOUNT = IT_OUTPUT-LOCAMT
EXCHANGE_RATE = IT_OUTPUT-EXR
The values returned by the FM are
IT_OUTPUT-LOCAMT = 2211.95
IT_OUTPUT-EXR = 51250.00
I checked the table TCURR and the rate maintained is '51.250'. The conversion is correct but the exchange is incorrect.
Kindly help.
07-30-2013 12:02 PM
A conversion exit exists for exchange rate field in TCURR. Use following FM to convert exchange rate:
CONVERSION_EXIT_EXCRT_OUTPUT.
CALL FUNCTION 'CONVERSION_EXIT_EXCRT_OUTPUT'
EXPORTING
input = IT_OUTPUT-EXR
IMPORTING
OUTPUT = exch_rate
.
Exch_rate will contain the correct exchange rate.
Regards
07-30-2013 11:42 AM
Hi Anurag,
There is an OSS Note for this SAP Note 153707 that explains the currency Miscalculation.
Please check and see if this resolves your issue.
Thanks & Regards,
Vijay
07-30-2013 11:59 AM
Hi,
The exchange rate that you get back might be in internal format often these are saved after multiplying with 1000 to save the precision of the decimals. You may have to explicitly convert them to the external format.
Cheers,
Arindam
07-30-2013 12:02 PM
A conversion exit exists for exchange rate field in TCURR. Use following FM to convert exchange rate:
CONVERSION_EXIT_EXCRT_OUTPUT.
CALL FUNCTION 'CONVERSION_EXIT_EXCRT_OUTPUT'
EXPORTING
input = IT_OUTPUT-EXR
IMPORTING
OUTPUT = exch_rate
.
Exch_rate will contain the correct exchange rate.
Regards
07-31-2013 6:34 AM