on ‎2017 Mar 14 9:42 AM
Hi,
I used Calc_Account and Copy_Opening business rules. My script logic likes below:
*SELECT(%Y%,[YEAR],TIME,[ID]=%TIME_SET%)
*SELECT(%TID%,[TIMEID],TIME,[ID]=%TIME_SET%)
*SELECT(%PERIOD%,[ID],TIME,[YEAR]=%Y% AND [CALC]=N AND [TIMEID]>=%Y%1200)
*SELECT(%CATEG%,[ID],CATEGORY,[BEHAVI]=Y,L AND [CALC]=N)
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = ACTUAL
CURRENCY = LC
TID_RA = TMVL(-1,%TIME_SET%)
OTHER = [ENTITY=%ENTITY_SET%]
CALC = a1
*ENDRUN_PROGRAM
*COMMIT
*RUN_PROGRAM CALC_ACCOUNT
CATEGORY = BUDGET
CURRENCY = LC
TID_RA = %TIME_SET%
OTHER = [ENTITY=%ENTITY_SET%]
CALC = a2
*ENDRUN_PROGRAM
*FOR %TIM% = %PERIOD%
*FOR %CAT% = %CATEG%
*RUN_PROGRAM COPYOPENING
CATEGORY = %CAT%
CURRENCY = LC
TID_RA = %TIM%
OTHER = [ENTITY=%ENTITY_SET%]
*ENDRUN_PROGRAM
*NEXT
*NEXT
Data Manager Package Parameters are: TIME=2017.01 and ENTITY=A672. And bpc will run 3 task above.
My Question is: why COPYOPENING can not run and no error message ? We have data and if I split that code to be 3 script logic file and DM package, BPC can send data.
Request clarification before answering.
Sample script that will select all base periods starting after some month selected by user and ending including December of next year:
*SELECT(%Y%,[YEAR],TIME,[ID]=%TIME_SET%)
*SELECT(%TID%,[TIMEID],TIME,[ID]=%TIME_SET%)
*SELECT(%TIDYDEC%,[TIMEID],TIME,[YEAR]=%Y% AND [MONTHNUM]=12 AND [CALC]=N)
*SELECT(%TIDNEXTYS%,[TIMEID],TIME,[TIMEID]>%TIDYDEC% AND [CALC]=N)
*SELECT(%NEXTY%,[YEAR],TIME,[TIMEID]<=%TIDNEXTYS% AND [TIMEID]>%TIDYDEC% AND [CALC]=N)
*SELECT(%TIDNEXTYDEC%,[TIMEID],TIME,[YEAR]=%NEXTY% AND [MONTHNUM]=12 AND [CALC]=N)
*SELECT(%PERIOD%,[ID],TIME,[TIMEID]<=%TIDNEXTYDEC% AND [TIMEID]>%TID% AND [CALC]=N)
*XDIM_MEMBERSET TIME=%PERIOD%For example: %TIME_SET%=2014.04
Then %PERIOD% will be:
*XDIM_MEMBERSET TIME=2014.05,2014.06,2014.07,2014.08,2014.09,2014.10,2014.11,2014.12,2015.01,2015.02,2015.03,2015.04,2015.05,2015.06,2015.07,2015.08,2015.09,2015.10,2015.11,2015.12
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe, can you please advise my script? Lets say, to retrieve 2017.feb untill 2017.dec?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, but if you are unable to define absolutely clear requirements then I can't help you - just a waste of time.
You have to explain what the user will provide to the script: any single month?
Like 2017.01 or 2017.02 or ...
And depending on the month provided by user what will be the periods that COPYOPENING will run!
Is it a real business case or just a training sample for some test?
"User will only select 2017.01 now" - sorry, but what will the user select next time??? It's strange to have script to work only for one month!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
User will only select 2017.01 now. And I wish bpc will know 2017.02 till 2018.dec to perform copyopening. Package will run one time for all months.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to check again (because your script will not do wat you want)!
%TIME_SET% - 2017.01
COPYOPENING - 2017.02...2017.12,2018.01...2018.12
and for
%TIME_SET% - 2017.02
COPYOPENING - 2017.03...2017.12,2018.01...2018.12
all months after the next month of the year selected by user and all months of the next year?
Is it correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
user selected 2017.01 for %time_set% and bpc will copy start from 2017.02 untill 2018.dec. Script will perform copyopening.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"For last task needs time parameter 2017.02 untill 2017.dec and 2018.02 until 2018.dec, user do not have to fill in that parameter" - sorry, but not clear!
If the user select 2017.02 as %TIME_SET%
For which periods do you want to perform COPYOPENING?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
I only want to user fill in 2017.01 and bpc will do 3 tasks above. For last task needs time parameter 2017.02 untill 2017.dec and 2018.02 until 2018.dec, user do not have to fill in that parameter.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do you mean by this line:
*SELECT(%PERIOD%,[ID],TIME,[YEAR]=%Y% AND [CALC]=N AND [TIMEID]>=%Y%1200)
PERIOD will be last month of the year? Strange...
And
*SELECT(%TID%,[TIMEID],TIME,[ID]=%TIME_SET%)
%TID% is not used...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 41 | |
| 4 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.