Skip to Content
0
Former Member
May 30, 2008 at 12:00 PM

Multiply Currency with exchange rate Prorblem

53 Views

Hi All,

data: p_value type komvd-kwert.

This is my code in my progam

CALL FUNCTION 'READ_EXCHANGE_RATE'

EXPORTING

date = sy-datum

foreign_currency = 'EUR'

local_currency = 'GBP'

TYPE_OF_RATE = 'M'

IMPORTING

exchange_rate = l_exchng_rate

foreign_factor = l_foregin_fac

local_factor = l_local_fac

valid_from_date = l_valid_fdat

EXCEPTIONS

no_rate_found = 1

no_factors_found = 2

no_spread_found = 3

derived_2_times = 4

overflow = 5

zero_rate = 6

OTHERS = 7.

IF sy-subrc EQ 0.

g_erate = l_exchng_rate / ( l_foregin_fac / l_local_fac ).

p_value = p_value * g_erate.

when i debug program values are p_value = 66.66, g_erate = 0.67840

but when i multifly this i am getting 45222144 instead of 45.222144.

could anybody tell me why it is coming like this...