Skip to Content

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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.