on 05-12-2016 7:05 AM
Hello Experts,
I have a doubt regarding script logic, the code is executed
*FOR %VAR%=1,2,3,4,5,6,7,8,9,10
*WHEN CATEGORY
*IS ACTUAL
*REC(FACTOR=1,CATEGORY=FORECAST,TIME=TMVL(%VAR%,%TIME_SET%))
*REC(FACTOR=1,CATEGORY=PLAN,TIME=TMVL(%VAR%,%TIME_SET%))
*ENDWHEN
*NEXT
1. In the above statement what does %var% mean or how is the value populated (is it from the input schedule ) , and does the %TIME_SET%
2.Second in the TMVL structure suppose the %var% is 3 will the record be created for 3 , 2 and 1.
thanks
Raj
If you select some period in the DM prompt - like 2016.02 then it will be passed to %TIME_SET% variable.
This code will copy ACTUAL 2016.02 to the next 10 months FORECAST and PLAN using TMVL shift:
%VAR% will be assigned values in the loop:
TMVL(%VAR%,%TIME_SET%)
will be:
TMVL(1,2016.02) = 2016.03
TMVL(2,2016.02) = 2016.04
TMVL(3,2016.02) = 2016.05
...
Use UJKT to see the result!
Vadim
P.S. It's better to use single loop like:
*WHEN CATEGORY
*IS ACTUAL
*FOR %VAR%=1,2,3,4,5,6,7,8,9,10
*REC(FACTOR=1,CATEGORY=FORECAST,TIME=TMVL(%VAR%,%TIME_SET%))
*REC(FACTOR=1,CATEGORY=PLAN,TIME=TMVL(%VAR%,%TIME_SET%))
*NEXT
*ENDWHEN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks Vadim, as you said "If you select some period in the DM prompt - like 2016.02 then it will be passed to %TIME_SET% variable." so is this for DM package only or ..suppose I want to pass from input schedule will this work..in short my question is what happens when you declare something inside %..% .thanks a bunch again
"I want to pass from input schedule will this work.." - not clear what do you mean by "pass from input schedule"???
If you are talking about default.lgf then scope of changed members will be passed:
"when you declare something inside %..%" what do you mean by "declare"?
You can use automatically available variables like %SOMEDIMNAME_SET% - containing initial script scope. Special Keywords - SAP Business Planning and Consolidation, version for SAP NetWeaver - SAP Library
Or you can define your own variables:
*SELECT(%VARNAME%,...)
Or:
*XDIM_MEMBERSET SOMEDIMNAME AS %VARNAME% = SOMEMEMBER
Or:
*FOR %VARNAME% = ...,...
Vadim
User | Count |
---|---|
16 | |
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.