Skip to Content
0
Former Member
Mar 11, 2009 at 04:01 AM

currency conversion not working for foreign entity

32 Views

I am having an issue with currency conversion not generating the correct values for foreign entities. For entities where the currency is USD, I am able to see the LC amount being written to USD. However, for entites that have currencies other than USD, I just see zeros. I have double-checked to make sure that rates exist for the given currencies. Below is the logic script I am using which is a modificatio nof the multicurrency.lgl. Any help would be greatly appreciated.

// filter the appropriate currencies and rates

//____________________________________________________________________

*SELECT(%REPORTING_CURRENCIES%, "[ID]", "RptCurrency", "[REPORTING] = 'Y'")

*SELECT(%FX_RATES%,"[ID]","RATE","[GROUP]='FX RATE'")

//____________________________________________________________________

// set the appropriate region to clear

//(all reporting currencies)

//____________________________________________________________________

*CLEAR_DESTINATION

*DESTINATION RPTCURRENCY=%REPORTING_CURRENCIES%

//____________________________________________________________________

// load the rates from the RATE cube

//____________________________________________________________________

*LOOKUP RATE

*DIM RATESRC="RATECALC"

*DIM Rate=ARFIELD.RATETYPE

*DIM SOURCECURR: INPUTCURRENCY=LOC_MILLOTH.CURRENCY

*FOR %CURR%=%REPORTING_CURRENCIES%

*DIM %CURR%:INPUTCURRENCY="%CURR%"

*NEXT

*ENDLOOKUP

//____________________________________________________________________

// define the translation rule

//____________________________________________________________________

*WHEN ARFIELD.RATETYPE

*IS "NOTRANS"

// translate

*IS %FX_RATES%

*FOR %CURR%=%REPORTING_CURRENCIES%

*REC(FACTOR=LOOKUP(SOURCECURR)/LOOKUP(%CURR%),RptCurrency="%CURR%")

*NEXT

*ELSE

*FOR %CURR%=%REPORTING_CURRENCIES%

*REC(RptCurrency="%CURR%")

*NEXT

*ENDWHEN

*FOR %CURR%=%REPORTING_CURRENCIES%

[RptCurrency].[#%CURR%]=null

*NEXT

*COMMIT

Regards,

Karen