on 09-18-2014 4:35 PM
Hi Experts,
I'm trying to setup a package list to allow users enter a value (A,B,C) of a Dimension [COSTCENTER] Property [BU] and then pass this value to the script as scoping/filter, but have some issues. We are using NW10, SP15.
The Prompt setting is: PROMPT(TEXT, %BU%, "Select Business Unit to run",,,,,")
I have two script scoping and both of them have some issues:
Scoping 1 uses Select function; This one works, but it works on ALL COSTCENTER, i.e. if I enter "A", the calculation is performed for ALL COSTCENTER member
*SELECT(%BU_SEL%,"ID","COSTCENTER",BUSINESS_UNIT=%BU%)
*XDIM_MEMBERSET COSTCENTER=%BU_SEL%
Scoping 2 doesn't pass the script validation. The error is "No member found in Dimension "COSTCENTER" for condition "CALC"="N". But there are base members with the property properly tagged.
*XDIM_FILTER COSTCENTER = [COSTCENTER].properties("BU")="%BU%"
Any suggestion? Thanks in advance.
Ben
Hi Ben,
A lot of syntax errors...
Can you provide full DM advanced script?
And looks like the line have to be corrected:
*SELECT(%BU_SEL%,"[ID]",COSTCENTER,"[BUSINESS_UNIT]=$BU$")
Assuming that:
1. You pass BU from prompt %BU% using REPLACEPARAM TASK
2. BUSINESS_UNIT - is the property name for COSTCENTER dimension
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the DM advaced script;
PROMPT
(SELECTINPUT,,,,"%CATEGORY_DIM%,%TIME_DIM%")
PROMPT
(TEXT, %BU%, "Select Business Unit to run earning calculation",,,,,")
TASK
(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK
(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK
(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK
(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK
(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,WIP_CM_DEFAULT_BU.LGF)
Hi Ben,
This script:
PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%TIME_DIM%")
PROMPT(TEXT, %BU%, "Select Business Unit to run earning calculation",,,,,")
INFO(%EQU%,=)
INFO(%TAB%,;)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,WIP_CM_DEFAULT_BU.LGF)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,BU%EQU%%BU%)
Will pass to the script logic variable $BU$ that will be used in *SELECT(...
Vadim
Hi Vadim,
I've noticed that there is a Blank at the end of the dropdown list, but I didn't put a blank in the Prompt setting. If I select the blank, then an error occurs. Is this normal or something I didn't do right?
Is there an option to allow the user run multiple selection, i.e. A003 AND A004 in one pass?
cheers,
ben
PROMPT
(COMBOBOX,%BU%,"Select BU to run earning calculations",,,{A003,A004,A005,A006,A019},)
Hi Ben,
Do you see the difference between 2 lines:
PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",,,{A003,A004,A005,A006,A019},)
PROMPT(COMBOBOX,%BU%,"Select Business Unit to run earning calculation",0,,{BU1,BU2,BU3})
Your line has to be corrected to:
PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",0,,{A003,A004,A005,A006,A019})
"0" - means: limit values to the list (no empty line). And remove comma at the end. You may also play with parameter after 0 - default value.
"Is there an option to allow the user run multiple selection, i.e. A003 AND A004 in one pass?" - yes, but the user will have to manually type multiple values separated by comma in the combobox field.
*SELECT(%BU_SEL%,"[ID]",COSTCENTER,"[BUSINESS_UNIT]=$BU$") - will also work.
Vadim
Hi Ben,
Yesterday I hasn't tested the COMBOBOX on the real system, but today I managed to do it and found some differences between BPC 10 and 7.5:
For BPC 10:
1. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",0,,{A003,A004,A005,A006,A019})
Will provide a fixed list with Empty line at the end of list and with empty default selection. But you are forced to select some non-empty line ("Next" for empty value generates error). You are not able to enter list of values (not able to type in combobox field).
2. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",0,A003,{A003,A004,A005,A006,A019})
Will provide a fixed list without Empty line at the end of list and with A003 as a default selection. "Next" will be OK. You are not able to enter list of values (not able to type in combobox field).
3. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",1,,{A003,A004,A005,A006,A019})
Will provide a list with Empty line at the end of list and with empty default selection. But you are forced to select some non-empty line ("Next" for empty value generates error) or you can type some value - from the list or not from the list. You are able to enter list of values (it's allowed to type in combobox field).
4. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",1,A003,{A003,A004,A005,A006,A019})
Will provide a list without Empty line at the end of list and with A003 as a default selection. You are not able to clear default value and proceed ("Next" for empty value generates error) but you can type some value - from the list or not from the list. You are able to enter list of values (it's allowed to type in combobox field).
For BPC 7.5:
1. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",0,,{A003,A004,A005,A006,A019})
Will provide a list without Empty line at the end of list and with empty default selection. You are not forced to select some non-empty line ("Next" for empty value will pass without error) or you can type some value - from the list or not from the list. You are able to enter list of values (it's allowed to type in combobox field). Like option 3 for BPC 10.
2. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",0,A003,{A003,A004,A005,A006,A019})
Will provide a list without Empty line at the end of list and with A003 as a default selection. You are able to clear default value and proceed ("Next" for empty value will pass without error) or you can type some value - from the list or not from the list. You are able to enter list of values (it's allowed to type in combobox field). Like option 4 for BPC 10.
3. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",1,,{A003,A004,A005,A006,A019})
Will provide a fixed list without Empty line at the end of list and with empty default selection. But you are forced to select some value from the list ("Next" for empty value generates error) and if you type value missing in the list you will also have error. You are able to enter list of values but only from combobox lines (it's allowed to type in combobox field).
4. PROMPT(COMBOBOX,%BU%,"Select BU to run earning calculations",1,A003,{A003,A004,A005,A006,A019})
Will provide a fixed list without Empty line at the end of list and with A003 as a default selection. You are not able to clear default value and proceed ("Next" for empty value generates error) and if you type value missing in the list you will also have error. You are able to enter list of values but only from combobox lines (it's allowed to type in combobox field).
See the difference!
Vadim
User | Count |
---|---|
14 | |
4 | |
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.