02-10-2009 12:16 PM
Dear all,
We are performing SKK to EUR conversion.After conversion we are facing a problem in documents which were posted in EUR Document currency earlier. PLease look at the Scenario below.
Before Change Over
Amount Currency Amount in LC Currency
1000000- EUR 37848000- SKK
1000000 EUR 37848000 SKK
After conversion :
Amount Currency Amount in LC Currency
1000000- EUR 1256323.44- EUR
1000000 EUR 1256323.44 EUR
In the above Document after conversion the local anmount should be 1000000 as both currencies are in EURO but the amount is appearing as 1256323.44
I have seen note 217664 but i feel this note is helpfull during conversion.
Can any one suggest how this problem can be rectified during Post Conversion process.
Any notes that are relevant.
Any help in this regard will be greatly appreciated
02-10-2009 12:42 PM
Hi,
I think you are trying to convert the amount from one currency to other currency.
first you check , here to_currency is currency type you are going to convert..
If to_currency <> EUR.
PERFORM convert_hwbas USING ep-bldat
CHANGING ep-hwbas .
endif.
FORM convert_hwbas USING p_ep_bldat
CHANGING p_ep_hwbas.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY_N'
EXPORTING
client = sy-mandt
date = p_ep_bldat
foreign_amount = p_ep_hwbas
foreign_currency = c_eur
local_currency = currency
* RATE = 0
type_of_rate = 'M'
* READ_TCURR = 'X'
IMPORTING
* EXCHANGE_RATE =
* FOREIGN_FACTOR =
local_amount = p_ep_hwbas
* LOCAL_FACTOR =
* EXCHANGE_RATEX =
* FIXED_RATE =
* DERIVED_RATE_TYPE =
EXCEPTIONS
no_rate_found = 1
overflow = 2
no_factors_found = 3
no_spread_found = 4
derived_2_times = 5
OTHERS = 6 .
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " convert_hwbas
Thanks
Parvathi