Skip to Content
avatar image
Former Member

Calculating Currency translation in "Periodic" within YTD Model

I'm gettting error while executing script in YTD. I want to do currency translation in periodic as opposed to YTD. There is a flag in business rule to accomodate this but I want to be able to achieve the same in script logic. Any ideas?

Further details attached.

script included below

Logic Script:

*SELECT(%ACCSET_AVG%,"[ID]",ACCOUNT,"[RATETYPE]='AVG'")

*SELECT(%ACCSET_CLO%,"[ID]",ACCOUNT,"[RATETYPE]='CLO'")

*LOOKUP Rates

*DIM R_ENTITY=Global

*DIM DCURR1:INPUTCURRENCY="USD"

*DIM DCURR2:INPUTCURRENCY="CAD"

*DIM SCURR:INPUTCURRENCY=ENTITY.CURRENCY

*DIM R_ACCOUNT = ACCOUNT.RATETYPE

//*DIM CATEGORY=Actual

//*DIM TIME=2015.01

*ENDLOOKUP

*XDIM_MEMBERSET TIME=%TIME_SET%

*XDIM_MEMBERSET CATEGORY=%CATEGORY_SET%

*XDIM_MEMBERSET ENTITY=%ENTITY_SET%

*XDIM_MEMBERSET RPTCURRENCY=LC

*XDIM_MEMBERSET SCOPE=S_NONE

*XDIM_MEMBERSET MEASURES=PERIODIC

*FOR %ACCTS_AVG% = %ACCSET_AVG%

*WHEN ACCOUNT

*IS %ACCTS_AVG%

*REC(FACTOR=LOOKUP(SCURR)/LOOKUP(DCURR1), RPTCURRENCY="USD",SCOPE="S_xyz")

*REC(FACTOR=LOOKUP(SCURR)/LOOKUP(DCURR2), RPTCURRENCY="CAD",SCOPE="S_xyz")

//*REC(FACTOR=LOOKUP(DCURR2), RPTCURRENCY="CAD",SCOPE=S_xyz)

*ENDWHEN

*NEXT

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 16, 2016 at 08:38 AM

    Sorry, but what is the reason to reinvent the wheel? Why not to use dedicated FX conversion program?

    Even with proper script the calculation will be extremely slow!

    Add comment
    10|10000 characters needed characters exceeded