on ‎2017 May 18 1:57 AM
HELLO,
BPC 10.1NW
iam trying to copy data from 1 period to next 2 periods.Below is my script. I want to copy
2017.09 to 2017.10,2017.11 & 2017.12 to 2018.01,2018.02. When i run below script - 2018.01,2018.02 -data is getting copied from both 2017.09 & 2017.12. script works when i have only one member for time selection. with multiple members it gives incorrect results.
Time = 2017.09,2017.12
version - FORECAST
-----------------------------------------------------
*XDIM_MEMBERSET ACCOUNT = BAS(INVENTORY_FIFO)
*XDIM_MEMBERSET AUDIT_ID = IC_ALLOC_CALC
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET VERSION = %VERSION_SET%
*WHEN ACCOUNT
*IS *
*FOR %TIM%=%TIME_SET%
*REC(FACTOR=1,TIME=TMVL(1,%TIM%))
*REC(FACTOR=1,TIME=TMVL(2,%TIM%))
*NEXT
*ENDWHEN
Thanks.
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ashish provided a correct script, but I have some extra questions:
if you select 2 months:
2017.09
2017.10
overwrite will happen. What values do you want to have as a result?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Vadim.
*SELECT(%TS%,[ID],TIME,[ID]=%TIME_SET% AND MONTHNUM=3,6,9,12)
above statement throws an error "invalid attribute name (06,09,12) in dimension TIME.
It works only when i have 1 value for monthnum. is there a way to filter with multiple values?
*SELECT(%TS%,[ID],TIME,[ID]=%TIME_SET% AND MONTHNUM=3) ->this works.
Standard question - BPC and BW version and SP!!!! I am unable to remember versions for each person on the forum.
Please, read again https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/
And screenshot of your TIME dimension, please!
However, if this doesn't work for you, you can use below as a workaround.
*FOR %TIM%=%TIME_SET%
*WHEN TIME
*IS %TIM%
*WHEN TIME.MONTHNUM
*IS 3,6,9,12
*REC(FACTOR=1,TIME=TMVL(1,%TIM%))
*REC(FACTOR=1,TIME=TMVL(2,%TIM%))
*ENDWHEN
*ENDWHEN
*NEXT
The initial scope is large so it would take more time to execute this script. If the data volume in question is not huge, this should serve the purpose.Correct script would be -
*XDIM_MEMBERSET ACCOUNT = BAS(INVENTORY_FIFO)
*XDIM_MEMBERSET AUDIT_ID = IC_ALLOC_CALC
*XDIM_MEMBERSET TIME = %TIME_SET%
*XDIM_MEMBERSET VERSION = %VERSION_SET%
*FOR %TIM%=%TIME_SET%
*WHEN TIME
*IS %TIM%
*REC(FACTOR=1,TIME=TMVL(1,%TIM%))
*REC(FACTOR=1,TIME=TMVL(2,%TIM%))
*ENDWHEN
*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 |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.