cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calculating Currency translation in "Periodic" within YTD Model

0 Likes
455

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Likes

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!