Application Development and Automation 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: 
Read only

Currency conversion

Former Member
0 Likes
1,562

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,377

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.

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.

8 REPLIES 8
Read only

Former Member
0 Likes
1,378

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.

Read only

0 Likes
1,377

Hi Satish,

In SE37 i entered the 2 FM's mentioned by you, but system prompts, FM's do not exist.

Vivek

Read only

0 Likes
1,377

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.

Read only

0 Likes
1,377

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

Read only

0 Likes
1,377

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.

Read only

0 Likes
1,377

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

Read only

0 Likes
1,377

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.

Read only

Former Member
0 Likes
1,377

Hi,

For currency conversion it is better to use FM CONVERT_TO_LOCAL_CURRENCY.

Thanks,

Sriram Ponna.