Skip to Content
0
Former Member
Apr 06, 2010 at 06:14 PM

Limited Currency Translation

17 Views

Hey Experts!

We're running BPC 7.0 (SQL 2008 DB)

We've recently setup FX tranlation usign Script Logic in BPC. After setting it up, we realized that we need to filter the data being converted. A few months ago, I was sent a document from SAP support named "How To Configure Limited Currency Translation".

I've followed this document very closely and I'm getting the following error when trying to send data to my system:

ExecuteBaseLogic::Error in step 1 of QueryCubeAndDebug: -2147467259 Query (1, 99) Parser: The syntax for ',' is incorrect.

I know this is telling me that there's a comma in the wrong spot somewhere, but I've checked the code 10x over and it matches SAPs document perfectly.

Here's my FXTrans.lgl:

//============================================= // Currency translation logic //=============================================

*INCLUDE SYSTEM_CONSTANTS.LGL

*SYSLIB SYSTEM_LIBRARY.LGL

//=================================================================================

// MULTI-CURRENCY TRANSLATION LOGIC

//=================================================================================

//____________________________________________________________________

// filter the appropriate currencies and rates

//____________________________________________________________________

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

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

//Filter the Actuals Category from the Currency Conversion

*SELECT(%FX_CATEGORIES%, "[ID]", "CATEGORYDIM", "[IS_CONVERTED] = 'Y'")

//____________________________________________________________________

// set the appropriate region to clear

//(all reporting currencies)

//____________________________________________________________________

*XDIM_MEMBERSET RPTCURRENCY=LC

*CLEAR_DESTINATION

*DESTINATION RPTCURRENCY=%REPORTING_CURRENCIES%

*DESTINATION CATEGORYDIM=%FX_CATEGORIES%

//____________________________________________________________________

// load the rates from the RATE cube

//____________________________________________________________________

*LOOKUP RATE

*DIM RATE=ACCOUNT.RATETYPE

*FOR %CURR%=%REPORTING_CURRENCIES%

*DIM %CURR%:INPUTCURRENCY=BUSINESSUNIT.CURRENCY

*DIM %CURR%:RATEENTITY="%CURR%_RATE"

*NEXT

*ENDLOOKUP

//____________________________________________________________________

// define the translation rule

//____________________________________________________________________

*XDIM_FILTER CATEGORYDIM=%FX_CATEGORIES%

*WHEN ACCOUNT.RATETYPE

*IS "NOTRANS"

// skip

*IS %FX_RATES%

// translate

*FOR %CURR%=%REPORTING_CURRENCIES%

*REC(FACTOR=LOOKUP(%CURR%),RPTCURRENCY="%CURR%")

*NEXT

*ELSE

// take as is

*FOR %CURR%=%REPORTING_CURRENCIES%

*REC(RPTCURRENCY="%CURR%")

*NEXT

*ENDWHEN

*COMMIT

Here's the FXTRANS.LGX:

*XDIM_MEMBERSET RPTCURRENCY=LC

*CLEAR_DESTINATION

*DESTINATION RPTCURRENCY=USD,EUR

*DESTINATION CATEGORY=NPACTUAL,INTLPRODACTUAL,JANFCST,FEBFCST,MARFCST,APRFCST,MAYFCST,JUNFCST,JULFCST,AUGFCST,SEPFCST,OCTFCST,NOVFCST,DECFCST,BUDGET,BUDGETVA,BUDGETVB,BUDGETV1,BUDGETV2,BUDGETV3,BUDGETV4,BUDGETV5,BUDGETV6,BUDGETMD,BUDGETMDV2,BUDGETMDV3,BUDGETMDV4,BUDGETFIELDV1,BUDGETFIELDV2,BUDGETFIELDV3,BUDGETFIELDV4,BUDGETFIELDV5,COMPPLAN,Q2COMPPLAN,Q4COMPPLAN,COMP_REVENUE,QUOTA_PLAN,ACTBUD,FCSTINPUT

*LOOKUP RATE

*DIM RATE=ACCOUNT.RATETYPE

*DIM USD:INPUTCURRENCY=BUSINESSUNIT.CURRENCY

*DIM USD:RATEENTITY="USD_RATE"

*DIM EUR:INPUTCURRENCY=BUSINESSUNIT.CURRENCY

*DIM EUR:RATEENTITY="EUR_RATE"

*ENDLOOKUP

*XDIM_FILTER CATEGORY=NPACTUAL,INTLPRODACTUAL,JANFCST,FEBFCST,MARFCST,APRFCST,MAYFCST,JUNFCST,JULFCST,AUGFCST,SEPFCST,OCTFCST,NOVFCST,DECFCST,BUDGET,BUDGETVA,BUDGETVB,BUDGETV1,BUDGETV2,BUDGETV3,BUDGETV4,BUDGETV5,BUDGETV6,BUDGETMD,BUDGETMDV2,BUDGETMDV3,BUDGETMDV4,BUDGETFIELDV1,BUDGETFIELDV2,BUDGETFIELDV3,BUDGETFIELDV4,BUDGETFIELDV5,COMPPLAN,Q2COMPPLAN,Q4COMPPLAN,COMP_REVENUE,QUOTA_PLAN,ACTBUD,FCSTINPUT

*WHEN ACCOUNT.RATETYPE

*IS "NOTRANS"

*IS AVG,END

*REC(FACTOR=LOOKUP(USD),RPTCURRENCY="USD")

*REC(FACTOR=LOOKUP(EUR),RPTCURRENCY="EUR")

*ELSE

*REC(RPTCURRENCY="USD")

*REC(RPTCURRENCY="EUR")

*ENDWHEN

*COMMIT

Does anyone have any idea why this is failing?

Any help would be greatly appreciated.

Thanks!

Sean