DM PROMPT(COMBOBOX behavior in BPC NW 10 and 7.5): PROMPT(COMBOBOX… is a useful statement in DM advanced script to provide user selection of some text values that can be later used in script logic. With the help of this statement it’s possible to limit user choice to only values hardcoded in this statement. One example can be restricted list of members to perform some calculations.

The syntax is:

PROMPT(COMBOBOX,%VARIABLE%,"Prompt text for user",(type of combobox),TEXT1,{TEXT1,TEXT2,TEXT3,TEXT4,TEXT5})

Where:

%VARIABLE% – to store the selection, can be passed to the script logic as $VARIABLE$ using:

INFO(%EQU%,=) INFO(%TAB%,;) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,VARIABLE%EQU%%VARIABLE%)

Or you can concatenate this variable to %SELECTION% to be sure that only fixed list of members for some dimension are allowed to select:

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%DIMENSION:SOMEDIMENSION|%VARIABLE%|)

(type of combobox) – 0 or 1 – limit to list (different behavior in BPC 7.5 and 10 – see below)

TEXT1 – default selection (if empty – empty default selection)

{TEXT1,TEXT2,TEXT3,TEXT4,TEXT5} – list of values.

I have done some tests of the COMBOBOX parameters 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 and use the required combobox type.

B.R. Vadim

New NetWeaver Information at SAP.com

Very Helpfull

 

 

User Rating: Be the first one !