on 2017 Oct 20 2:35 PM
Hello BPC users,
I'm working on BPC MS 10.0, and I'm currently trying to develop a script logic which will copy data from one category to another, for several months (that the users will select in the prompt when executing the package from the DM).
The users don't want to use the standard "Copy" package, so I wrote an LGF which looks like this (I isolated the useful part):
*XDIM_MEMBERSET TIME=%TIME_SET%
*XDIM_MEMBERSET CATEGORY=SOURCE_CATEGORY
//*XDIM_MEMBERSET ENTITY=<ALL>
*WHEN *
*IS *
*REC(CATEGORY=TARGET_CATEGORY)
*ENDWHEN
*COMMIT
And the DM package "Advanced" script is the following:
'PROMPT
'DEBUG(ON)
PROMPT(SELECTINPUT,,,"Please select all months that have to be copied","PERIOD")
PROMPT(COMBOBOX,%SOURCE_CATEGORY%,"Please select a source category",0,ACTUAL,{ACTUAL,BUDGET,RQ1,RQ2,RQ3})
PROMPT(COMBOBOX,%TARGET_CATEGORY%,"Please select a target category",0,BUDGET,{BUDGET,RQ1,RQ2,RQ3})
TASK(Execute formulas,USER,%USER%)
TASK(Execute formulas,Environment,%Environment%)
TASK(Execute formulas,Model,%Model%)
TASK(Execute formulas,FORMULASCRIPT, *FUNCTION SOURCE_CATEGORY=%SOURCE_CATEGORY% {cr}{lf} *FUNCTION TARGET_CATEGORY=%TARGET_CATEGORY%)
TASK(Execute formulas,LOGICFILE,%ModelPath%\..\AdminApp\%Model%\LF02_COPY.LGF)
TASK(Execute formulas,RUNMODE,1)
TASK(Execute formulas,LOGICMODE,1)
TASK(Execute formulas,CHECKLCK,%CHECKLCK%)
But when I execute the DM package, selecting only 2 months for example (let's say "2017.JAN" and "2017.FEB"), it copies data from all the months (including "2017.MAR", "2017.APR"...), without taking into account the selection...
Using the exact same method, I tried replacing the Time dimension (PERIOD) by other dimensions, and it works fine... It seems like the Time dimension works a bit differently than other dimensions.
I can't figure out what I'm doing wrong, so please feel free to share any idea!
Thank you in advance,
Thibaut
Request clarification before answering.
Hi Thibaut,
Maybe I misunderstand what you want to achieve, but assuming that source and target periods are the same, as you've defined %TIME_SET% in the scope of your script, I'd use SELECTINPUT and SELECTION in the DM package as per below.
PROMPT(SELECTINPUT,,,"Please select period(s) to copy!",%TIME_DIM%)
TASK(Execute formulas,USER,%USER%)
TASK(Execute formulas,Environment,%Environment%)
TASK(Execute formulas,Model,%Model%)
TASK(Execute formulas,SELECTION,%SELECTIONFILE%)
/Cecilia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Cecilia,
Thank you very much for your answer.
Actually, my Time dimension is called "PERIOD", and in the LGF I had written:
*XDIM_MEMBERSET PERIOD=%PERIOD_SET%
I just updated the DM advanced script, according to what you said:
'PROMPT
'DEBUG(ON)
PROMPT(SELECTINPUT,,,"Please select all months that have to be copied",%TIME_DIM%)
PROMPT(COMBOBOX,%SOURCE_CATEGORY%,"Please select a source category",0,ACTUAL,{ACTUAL,BUDGET,RQ1,RQ2,RQ3})
PROMPT(COMBOBOX,%TARGET_CATEGORY%,"Please select a target category",0,BUDGET,{BUDGET,RQ1,RQ2,RQ3})
TASK(Execute formulas,USER,%USER%)
TASK(Execute formulas,Environment,%Environment%)
TASK(Execute formulas,Model,%Model%)
TASK(Execute formulas,SELECTION,%SELECTIONFILE%)
TASK(Execute formulas,FORMULASCRIPT, *FUNCTION SOURCE_CATEGORY=%SOURCE_CATEGORY% {cr}{lf} *FUNCTION TARGET_CATEGORY=%TARGET_CATEGORY%)
TASK(Execute formulas,LOGICFILE,%ModelPath%\..\AdminApp\%Model%\LF02_COPY.LGF)
TASK(Execute formulas,RUNMODE,1)
TASK(Execute formulas,LOGICMODE,1)
TASK(Execute formulas,CHECKLCK,%CHECKLCK%)<br>
And now the package works exactly the way I expected!
I understood that user-defined dimensions, and non-user-defined dimensions have to be processed a bit differently.
Thanks again for your help,
Thibaut
This question has no relation to the tag EPM Add-In for Excel. Please remove it!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 2 | |
| 2 | |
| 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.