Skip to Content
0
Aug 13, 2015 at 09:28 AM

Currency conversion FM not working and not working during loading?

412 Views

Hi,

We need to convert USD to EUR conversin for the amount KF while loading from the DSO to the INFOCUBE. I have used the below code in the endroutine to pass the values for the standard FM , CONVERT_TO_LOCAL_CURRENCY.

Please see the below code and provide the solutions.

LOOP at RESULT_PACKAGE ASSIGNING <ic_rp>.

call function 'CONVERT_TO_LOCAL_CURRENCY'
exporting
* client = sy-mandt
date = <ic_rp>-calday
foreign_amount = <ic_rp>-/BIC/YMAT_PRCE
foreign_currency = <ic_rp>-LOC_CURRCY
local_currency = 'EUR'
* rate =
type_of_rate = 'M'
read_tcurr = ' '
importing
* exchange_rate = g_irate
* FOREIGN_FACTOR =
local_amount = <ic_rp>-/BIC/YMAT_PRCE
* 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
.

1) Do we need to change the local_currency unit from USD to EUR physically in the field routine or endroutine.

2) is the below coding correct ?

3) I treid to run the FM in SE37 with the given date mentioned in the TCURR table, for USD to EUR. But still its not showing any values in the export parameters ( FM testing ).

4) Are there any other settings which we need to consider to get the values. I have transferred exhcnage rates adn global settings for the source system.

Value exist for the given date in the TCURR table for USD and EUR.

Attachments

pastedImage_3.png (13.6 kB)
pastedImage_5.png (12.0 kB)