on 11-14-2012 5:06 PM
Hi I try to create script logic and I'm new on this side. We have actual and we try to copy actual into MRF version ( Most recent forcast )
I run my script and I have only the 1st perdiod ( January ) How to have next month
//Get version that has changed
*SELECT(%CALC_VERSION%,"[ID]","VERSION","[ID]='%VERSION_SET%' AND [BUDGET_CALC]='Y'")
//get the first year for the version from the YEAR property
*SELECT(%MIN_VERSION_YEAR%,"[YEAR]","VERSION","[ID]='%VERSION_SET%'")
//get the start month from the version
*SELECT(%VERSION_STARTMTH%,"[MONTHNUM]","VERSION","[ID]='%VERSION_SET%'")
//get the list of actual months
*SELECT(%VERSION_TIMEA%,"[ID]","TIME","([YEAR]='%MIN_VERSION_YEAR%' AND [MONTHNUM]<'%VERSION_STARTMTH%') AND [CALC]='N'")
//Get all balance sheet accounts
*SELECT(%BS%,"[ID]","ACCOUNT","[GROUP]='BS' AND [CALC]='N'")
//get all accounts under IS_NET_RES - Added by ND on 14th March - to include PL accounts in the copy
*MEMBERSET(%ACCOUNT_SOURCE%,"Descendants([Account].[IS_NET_RES],999,LEAVES)")
//define the source region
*XDIM_MEMBERSET ACCOUNT=%BS%,%ACCOUNT_SOURCE%
*XDIM_MEMBERSET COMPANY=<ALL>
*XDIM_MEMBERSET COSTCENTER=<ALL>
*XDIM_MEMBERSET DATASRC=<ALL>
*XDIM_MEMBERSET DATATYPE=DOLLARS
*XDIM_MEMBERSET FLOW=F_CLO
*XDIM_MEMBERSET FUNCT_AREA=<ALL>
*XDIM_MEMBERSET INPCURRENCY=<ALL>
*XDIM_MEMBERSET INTERCOMPANY=<ALL>
*XDIM_MEMBERSET RPTCURRENCY=INPUT,CAD,USD
*XDIM_MEMBERSET TIME=%VERSION_TIMEA%
*XDIM_MEMBERSET VERSION=ACTUAL
*CLEAR_DESTINATION
//define the destination data region
*DESTINATION ACCOUNT = %BS%
*DESTINATION DATATYPE = DOLLARS
*DESTINATION TIME = %VERSION_TIMEA%
*DESTINATION COSTCENTER = NOCOSTCENTER
*DESTINATION FLOW = F_CLO
*DESTINATION VERSION= %CALC_VERSION%
*WHEN ACCOUNT
*IS %BS%
*REC(VERSION="%CALC_VERSION%",ACCOUNT=ACCOUNT.BS_GROUPREF)
*IS %ACCOUNT_SOURCE% //Added by ND on 14th March - to include PL accounts in the copy
*REC(VERSION="%CALC_VERSION%") //Added by ND on 14th March - to include PL accounts in the copy
*ENDWHEN
*COMMIT
Refer to *NEXT instructions which helps you in copying the data from one month to next.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
3 | |
2 | |
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.