FM for Converting from X currency to Y currency??
I need to convert the 100 AMOUNT value from CHF currency to USD currency.
So, am using FMs - CONVERT_TO_LOCAL_CURRENCY and MS_CONVERT_TO_OTHER_CURRENCY..........but none of these r giving the results!!!!!!!!!
My code is as follows,
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
date = sy-datum
foreign_amount = wa_alv-kbetr_chf
foreign_currency = 'CHF'
local_currency = 'USD'
TYPE_OF_RATE = 'M'
LOCAL_AMOUNT = wa_alv-kbetr_usd.
So, let me know that,
1 - Wht is the mistake in my code?
2 - Is there any good FM to get dome my work?
You have not included the exceptions in your call to the FM. Please do that and check SY-SUBRC. The exception could be NO_RATE_FOUND (meaning that the exchange rate is not defined in table TCURR).
You can use transaction S_BCE_68000174 to maintain exchange rates.
Edited by: Rob Burbank on Oct 3, 2008 5:53 PM