on 2021 Nov 21 9:47 AM
Hi Experts,
I am selecting the time from Data Manager, in advanced script I have this statement :
PROMPT(SELECT,%TIMEID%,,"Selection 1","%TIME_DIM%")
My variable passed to the badi and script logic with the following value :
TIMEID =/.../..FROM.TMP@@@SAVE@@@@@@EXPAND@@@|DIMENSION:TIME|2021.01,2021.02
I want to pass to the script logic only this value 2021.01,2021.02 because I am using it in further calculation in script logic.
How I can filter or trim this variable string in script logic ? or any other alternative in the advanced script of DM ?
Regards
Mohamed
Request clarification before answering.
In DM advanced script you can use %SELECTION% or some user defined variable like %TIMEID%
%SELECTION% is passed as %XXX_SET% to script logic.
To pass %TIMEID% you can't use REPLACEPARAM, you have to use MEMBERSELECTION in TASK with the same syntax.
Result of MEMBERSELECTION is $xxx$ variable in script logic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Workaround:
Instead of: PROMPT(SELECT,%TIMEID%,,,"%TIME_DIM%")
Use %SELECTION% for TIME and pass it as %TIME_SET%.
There is some bug in some versions of BPC with multiple variables.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
can I user SELECTION for multiple variables in one statement , I want the user select all variables in one window and pass each selection using %XXX_SET%
like :
PROMPT(SELECT,,,,"%CATEGORY_DIM%,%ALLOC_SET%,%TIME_SET%")
....
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,..%Variables%..TIMEID%EQU%%TIMEID%)
kindly advise how to write PROMPT(SELECT... ) for this scenario
Regards
Mohamed
Hi ,
Thank you for your feedback
I updated the DM script , now VERSION is passed with correct value , by TIMEID get concatenated with SELECTION word, I don't know from where getting this string of SELECTION
PROMPT(SELECT,%VERSION%,,,"%CATEGORY_DIM%")
PROMPT(SELECT,%TIMEID%,,,"%TIME_DIM%")
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(ZALLOC_RUN_LOGIC,TAB,%TAB%)
TASK(ZALLOC_RUN_LOGIC,EQU,%EQU%)
TASK(ZALLOC_RUN_LOGIC,SUSER,%USER%)
TASK(ZALLOC_RUN_LOGIC,SAPPSET,%APPSET%)
TASK(ZALLOC_RUN_LOGIC,SAPP,%APP%)
TASK(ZALLOC_RUN_LOGIC,LOGICFILENAME,Myscript.LGF)
TASK(ZALLOC_RUN_LOGIC,MEMBERSELECTION,VERSION%EQU%%VERSION%%TAB%TIMEID%EQU%%TIMEID%)
*START_BAdI CALC_COST
QUERY = OFF
WRITE = ON
VER = $VERSION$
TIME = $TIMEID$
*END_BAdI
..../TempFiles/FROM.TMP@@@SAVE@@@@@@EXPAND@@@|DIMENSION:TIME|2021.01,2021.02
..../TempFiles/FROM.TMP@@@SAVE@@@@@@EXPAND@@@|DIMENSION:VERSION|ACTUAL
VER=ACTUAL
TIME=2021.01,2021.02SELECTION
Regards
Mohamed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bennie,
I am getting this error
RUN_LOGIC:Dimension set:"TIME" not assigned in Data Manager
This my dynamic script
PROMPT(SELECT,,,,"%CATEGORY_DIM%")
PROMPT(SELECT,%TIMEID%,,"Selection 2","%TIME_DIM%")
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(ZRUNLOGIC,TAB,%TAB%)
TASK(ZRUNLOGIC,EQU,%EQU%)
TASK(ZRUNLOGIC,SUSER,%USER%)
TASK(ZRUNLOGIC,SAPPSET,%APPSET%)
TASK(ZRUNLOGIC,SAPP,%APP%)
TASK(ZRUNLOGIC,LOGICFILENAME,Myscript.LGF)
TASK(ZRUNLOGIC,REPLACEPARAM,SELECTION=%SELECTION%;TIMEID=%TIMEID%)
TASK(ZRUNLOGIC,REPLACEPARAM,SELECTION%EQU%%SELECTION%%TAB%TIMEID%EQU%%TIMEID% )
Regards
Mohamed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi faouzi.mohamed,
If you're using the standard DM/Script logic package you can use %TIME_SET% in the script logic.
Thanks,
Bennie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
2 | |
2 | |
2 | |
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.