Hi Experts,
We are using a script which is copying all the costs of a group of cost-centres to a representative dummy Cost-centre (in another hierarchy) and account to be used for further calculations. It is working fine when the user is choosing a single cost-centre.
The current code is
*SELECT(%BUDYEAR%,[YEAR],CATEGORY,[ID] = 'BUDGET')
*SELECT(%CODE%,[GROUPCODE],COSTCENTRE,[ID] = %COSTCENTRE_SET%)
//---- Calculate the value to be allocated----//
*XDIM_MEMBERSET ACCOUNT AS %ACC1% = BAS(106010)
*XDIM_MEMBERSET ASSETCLASS = AC000
*XDIM_MEMBERSET CATEGORY = BUDGET
*XDIM_MEMBERSET FUNCTIONALAREA = 6100
*XDIM_MEMBERSET INTERNALORDER = PR000
*XDIM_MEMBERSET LINEITEM = BAS(ALL_LI)
*XDIM_MEMBERSET TIME = BAS(%BUDYEAR%.TOTAL)
*XDIM_MEMBERSET COSTCENTRE = BAS(%CODE%0000)
*WHEN ACCOUNT
*IS %ACC1%
*REC(FACTOR = 1, ACCOUNT = "A0001", COSTCENTRE = %COSTCENTRE_SET%, TIME = %BUDYEAR%.INPUT, FUNCTIONALAREA = "6100", CATEGORY = "BUDGET_ADJ", LINEITEM = "LI000")
*ENDWHEN
The "Costcentre" dimension id is 8 digits. The parent member of each group of costcentres is in the format "XXXX0000" where XXXX is the same as value of the property "Groupcode".
The business wants to run this for different costcentre groups at the same time. Have tried to incorporate a "*FOR... NEXT" loop with no success
Will be grateful for any help/advice you provide
Ashit