on 01-05-2012 6:26 AM
Sorry, the last post was confusing so I am reposting.
Hello, could you please review the following script logic. the issue I am having is I need to multiply with the exchange rate of current month in the REC statement. but the way it is right now, it is multiplying with rate of previsous month. I tried the following(which WONT work)
*DIM TIME=%TIME_SET%
Also, please keep in mind that I cant change *when time is prior to %time_set%, as the actual script logic is lot bigger. thanks.
________________________________________
*LOOKUP RATE
*DIM RATESRC="RATEINPUT"
*DIM INPUTCURRENCY=COMPANY.CURRENCY
*DIM RATE="END"
*ENDLOOKUP
*SELECT(%AREGION%, "ID", "ACCOUNT","ASIAREGION='Y'")
*XDIM_MEMBERSET ACCOUNT=%AREGION%
*XDIM_MEMBERSET CATEGORY=ACTUAL
*XDIM_MEMBERSET DATASRC=ASREGION
*XDIM_ADDMEMBERSET DATASRC=Descendants(DATASRC.TOTAL_GAAP,99,LEAVES)
*XDIM_MEMBERSET RPTCURRENCY=USD,LC
*XDIM_MEMBERSET TIME=%TIME_SET%,PRIOR
*WHEN DATASRC
*IS ASREGION
*WHEN TIME
*IS PRIOR
*WHEN RPTCURRENCY
*IS LC
REC(FACTOR=1LOOKUP,DATASRC=ASREGION,RPTCURRENCY=USD,TIME=NEXT)
*ENDWHEN
*ENDWHEN
*ENDWHEN
Becaue %TIME_SET% is not working ,try to change lookup as below, which would retrieve current months rate.
*LOOKUP RATE
*DIM RATESRC="RATEINPUT"
*DIM INPUTCURRENCY=COMPANY.CURRENCY
*DIM CURRMONTH:TIME=TIME.ID
*DIM RATE="END"
*ENDLOOKUP
or
*LOOKUP RATE
*DIM RATESRC="RATEINPUT"
*DIM INPUTCURRENCY=COMPANY.CURRENCY
*DIM CURRMONTH:TIME=TIME
*DIM RATE="END"
*ENDLOOKUP
And in rec statement
*REC(FACTOR=1*LOOKUP(CURRMONTH),DATASRC=ASREGION,RPTCURRENCY=USD,TIME=NEXT)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
John, that script was giving number in millions. and it was supposed to be $581. I tried with brackets around lookup and get but that didnt work either. The GOOD NEWS is I solved the problem. It feels like million bucks when I solve a tough problem, lol. Here is how:
I inserted this code between XDIM block and When block. This will take current month(or rather user entered month)'s rate and store it in iN memory variable #TMPRT. Then in the orignal when/endwhen statement, I used GET(CATEGORY=#TMPRT).
*WHEN DATASRC
*IS ASREGION
*WHEN TIME
*IS %TIME_SET%
*WHEN RPTCURRENCY
*IS LC
REC(FACTOR=1LOOKUP,CATEGORY=#TMPRT,TIME=PRIOR)
*ENDWHEN
*ENDWHEN
*ENDWHEN
*GO
User | Count |
---|---|
9 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.