Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to allow user to enter multiple values?

Former Member
0 Kudos
326

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos
176

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.

10 REPLIES 10

Former Member
0 Kudos
176

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

0 Kudos
176

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.

0 Kudos
176

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.

Former Member
0 Kudos
177

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.

0 Kudos
176

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.

0 Kudos
176

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

0 Kudos
176

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.

0 Kudos
176

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

0 Kudos
176

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

0 Kudos
176

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.