12-28-2007 2:46 AM
Hi All,
I would like to convert the billing document value into a reference value
eg: Billing value is 5500RS, convert to EUR (i.e. Reference Currency=EUR), Ref_Value = 100 EUR.
I am trying the below code, where if the date is not entered in the selection screen, it calculates based on the exchange rate prevailing on the date of billing document, but if a date is mentioned, then the exchange rate as on the date entered is selected.
I am facing 2 errors:
1. The conversion is not taking place.
2. The currency displayed next to the ref value is same as the billing document currency & is not displaying the reference currency
Note:
1.The exchange rate maintained in TCURR table is not on a daily basis i.e. the value of exchange if entered on Monday will hold good till the next update.
2.The values for Y_KURST, Y_WAERS & Y_DATE is eneted by the user in the query selection screen.
DATA Y_UKURS TYPE TCURR-UKURS.
CLEAR: Y_UKURS, Y_VALUE.
IF Y_DATE EQ SPACE.
SELECT SINGLE UKURS FROM TCURR INTO Y_UKURS
WHERE KURST EQ Y_KURST
AND FCURR EQ VBRK-WAERK
AND TCURR EQ Y_WAERS
AND GDATU LE VBRK-FKDAT.
Y_VALUE = VBRK-NETWR * Y_UKURS.
ELSE.
SELECT SINGLE UKURS FROM TCURR INTO Y_UKURS
WHERE KURST EQ Y_KURST
AND FCURR EQ VBRK-WAERK
AND TCURR EQ Y_WAERS
AND GDATU EQ Y_DATE.
Y_VALUE = VBRK-NETWR * Y_UKURS.
ENDIF.
Await inputs.
Vivek
12-28-2007 3:12 AM
Hi,
By using this function module we can convert money into EUROs
BKK_EURO_CONVERT.
this fm for exchange rate.
BKK_EXCHNGRATE_CONVERT.
it will solve ur problem.
please reward points.
satish.
12-28-2007 3:12 AM
Hi,
By using this function module we can convert money into EUROs
BKK_EURO_CONVERT.
this fm for exchange rate.
BKK_EXCHNGRATE_CONVERT.
it will solve ur problem.
please reward points.
satish.
12-28-2007 3:17 AM
Hi Satish,
In SE37 i entered the 2 FM's mentioned by you, but system prompts, FM's do not exist.
Vivek
12-28-2007 3:33 AM
Hi vivek,
please check it once.
y because i had just opened that one.
check in the function group FB0C and FB0E.
u can definetly see u.
u can find the function modules there.
if it helpful, please reward points,
satish.
12-28-2007 3:45 AM
Mr. Satish,
I am unable to find the function FBOC. But in FBOE i find only one FM i.e. FI_BSIX_CREATE.
I am on ver 4.6c is it because of that i am not able to access these FM's?
Vivek
Any alternative solutions? Any other Function Module which can help me resolve my problem?
Edited by: Vivek on Dec 28, 2007 1:48 PM
12-28-2007 5:56 AM
Hi vivek,
goto se80. inthat select the function group.
check the FB0C and FB0E .
u will get in any version.
again check it once.
satish.
12-28-2007 6:51 AM
Mr. Satish,
I am unable to find function group FBOC & as mentioned before FBOE has only 1 FM. May i know which version of SAP are you checking in?
Note for Mr. Sriram: I do not want to convert to local currency. The requirement is that the user should be able to conver the billing document value into the reference currency which they choose.
So any suggestions? If no FM exists in 4.6c, then can anyone help me modify the above code?
Vivek
12-28-2007 7:55 AM
Hi All,
I managed to find the FM to do the currency conversion, but facing the error where the reference currency still shows document currency & not the converted currency.
Eg:
Document Value - 5500
Document Currency - Rs
Convert to EUROs
Converted Value - 100 (value conversion is ok)
Converted currency still shows as Rs & not EUR
How to rectify this problem?
CALL FUNCTION 'RKC_SINGLE_EXCHANGE_RATE_GET'
EXPORTING
DATUM = Y_DATE
INVKZ = SPACE
KURST = Y_KURST
NCURR = Y_WAERS
VCURR = VBRK-WAERK
IMPORTING
EXCHR = Y_EXCHR
EXCEPTIONS
NO_RATE_FOUND.
Y_VALUE = VBRK-NETWR * Y_EXCHR.
12-28-2007 6:47 AM
Hi,
For currency conversion it is better to use FM CONVERT_TO_LOCAL_CURRENCY.
Thanks,
Sriram Ponna.