Skip to Content
0

Calculating Currency translation in "Periodic" within YTD Model

Nov 15, 2016 at 08:30 PM

85

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Vadim Kalinin Nov 16, 2016 at 08:38 AM
0

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!

Share
10 |10000 characters needed characters left characters exceeded