2007 Jul 20 5:25 PM
Hi, can someone tell me how I can allow user to select multiple values from a selection screen. To be more clear, I have to display 4 values on the selection screen and want to allow user to select 2 or 3 values from it. It will be very helpful if someone could tell me how to do it.
Thanks in advance,
pushpa
2007 Jul 20 5:33 PM
Pushpa,
REPORT ZEXAMPLE .
parameters: cb1 as checkbox.
parameters: cb2 as checkbox.
parameters: cb3 as checkbox.
parameters: cb4 as checkbox.
start-of-selection.
if cb1 = 'X'.
write: / 'user selected Checkbox 1'.
endif.
2007 Jul 20 5:29 PM
HI,
User the check boxes to do that..
put a check box against each value and the user can select one or more by checking the check box.
thanks
Mahesh
2007 Jul 20 5:33 PM
thanks for the reply, but i donot want to display it as a check box. i have to display them as a list box and then allow user to select values, like we do for select-option. in select-option v give 2 values but here i have to give 4-5 values and allow user to select some of them or all of them.
2007 Jul 20 5:40 PM
Pushpa,
If no checkboxes, then create a Table Control on the screen. Allow multiple selections on it and you can even hide the grid lines to make it look like a standard Listbox control.
2007 Jul 20 5:33 PM
Pushpa,
REPORT ZEXAMPLE .
parameters: cb1 as checkbox.
parameters: cb2 as checkbox.
parameters: cb3 as checkbox.
parameters: cb4 as checkbox.
start-of-selection.
if cb1 = 'X'.
write: / 'user selected Checkbox 1'.
endif.
2007 Jul 20 5:43 PM
thanks john, for the reply but this is not what i intend to do. i have to display the values using the select-options statement and then give the 4-5 values from which the user can select the desired number of values or any other value he wants that is not already there.
2007 Jul 20 5:54 PM
hi,
under initialization put the 4-5 valuse.
s_vbeln for vbak-vbeln.
initialization.
*-- put your values like this..
s_vbeln-option = 'I'.
s_vbeln-sign = 'EQ'.
s_Vbeln-low = '1234'.
append s_vbeln.
thaks,
mahesh
2007 Jul 20 6:07 PM
hi mahesh,
pls c the code below. this is what i have written in my program. when i run this program it is showing only one value and that too only the first one '1234'. i want that it display all the values that i gave in the initialization part.
please help.
thanks,
pushpa
SELECTION-SCREEN BEGIN OF BLOCK enter_data WITH FRAME TITLE text-001.
SELECT-OPTIONS skunnr FOR kna1-kunnr.
SELECTION-SCREEN END OF BLOCK enter_data.
INITIALIZATION.
skunnr-low = '1234'.
skunnr-sign = 'I'.
skunnr-option = 'EQ'.
APPEND skunnr.
skunnr-low = '9824'.
skunnr-sign = 'I'.
skunnr-option = 'EQ'.
APPEND skunnr.
skunnr-low = '8756'.
skunnr-sign = 'I'.
skunnr-option = 'EQ'.
APPEND skunnr.
skunnr-low = '6534'.
skunnr-sign = 'I'.
skunnr-option = 'EQ'.
APPEND skunnr.
2007 Jul 20 6:10 PM
Hello,
you can only see one value on the screen.. click on the green arrow button on the end of the select options then you will see all the values.
thansk
mahesh
2007 Jul 20 6:19 PM
thanks, its working.
but i c that it is showing two boxes. in one it is showing the value 1234 and the other is blank. is there any way by which i can not display the other box?
thanks,
pushpa
2007 Jul 20 6:22 PM
Use statement NO INTERVALS in SELECT-OPTIONS, as this:
SELECT-OPTIONS skunnr FOR kna1-kunnr NO INTERVALS.
That way only left side of Select options appears.
The right side is used when you must use a range (OPTION = 'BT', for example).
Please reward points if this helps.