2008 Oct 30 1:02 PM
I need to create a dropdown list in a selection screen and allow the user to select more than one option. Can this be done. I know how to use VRM_SET_VALUES to create a dropdown but it restricts me to selecting only one value. The user should be able to select multiple values. Thank you.
2008 Oct 30 1:24 PM
Hi Megan Flores,
Drop down list can enable you to select only one value. If you have a requirement like selecting multiple values , then you will have to go for checkboxes.
Thanks.
Nitesh
Hi,
You might have not refershed and cleared your values after the first list do that will resolve your problem.
Check the below sample code.
Type-pools: vrm.
Data: param type vrm_id,
values type vrm_values,
value like line of values.
parameters: p1 as listbox visible length 20 modif id one.
at selection-screen output.
param = 'p1'.
value-key = '1'.
value-text = 'VENKAT'.
append value to values.
value-key = '2'.
value-text = 'REDDY'.
append value to values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = PARAM
VALUES = VALUES
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
.
Here i will be getting the dropdown with Venkat and Reddy two list.
Cheers!!
VEnk@
Edited by: Venkat Reddy on Oct 30, 2008 6:58 PM
2008 Oct 30 1:24 PM
Hi Megan Flores,
Drop down list can enable you to select only one value. If you have a requirement like selecting multiple values , then you will have to go for checkboxes.
Thanks.
Nitesh
2008 Oct 30 1:25 PM
Hi,
You might have not refershed and cleared your values after the first list do that will resolve your problem.
Check the below sample code.
Type-pools: vrm.
Data: param type vrm_id,
values type vrm_values,
value like line of values.
parameters: p1 as listbox visible length 20 modif id one.
at selection-screen output.
param = 'p1'.
value-key = '1'.
value-text = 'VENKAT'.
append value to values.
value-key = '2'.
value-text = 'REDDY'.
append value to values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = PARAM
VALUES = VALUES
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
.
Here i will be getting the dropdown with Venkat and Reddy two list.
Cheers!!
VEnk@
Edited by: Venkat Reddy on Oct 30, 2008 6:58 PM
2008 Oct 30 1:26 PM
Hi Megan,
You cannot get multiple selection in dropdown(List Box) using VRM_SET_VALUES.
Thanks,
Chidanand
2008 Oct 30 1:33 PM
Hello,
Try to use this Fm
PARAMETERS :
y_p_list TYPE char32 AS LISTBOX VISIBLE LENGTH 22
MODIF ID rsg. .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR y_p_list.
PERFORM y_f_dring_type_f4.
FORM y_f_file_frmt_f4 .
MOVE: text-212 TO y_wa_listbox1-field.
APPEND y_wa_listbox1 TO y_i_listbox1.
CLEAR y_wa_listbox1.
MOVE text-213 TO y_wa_listbox1-field.
APPEND y_wa_listbox1 TO y_i_listbox1.
CLEAR y_wa_listbox1.
MOVE text-214 TO y_wa_listbox1-field.
APPEND y_wa_listbox1 TO y_i_listbox1.
CLEAR y_wa_listbox1.
MOVE text-215 TO y_wa_listbox1-field.
APPEND y_wa_listbox1 TO y_i_listbox1.
CLEAR y_wa_listbox1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FIELD'
dynpprog = sy-repid
stepl = 1
value = ' '
value_org = 'S'
display = ' '
TABLES
value_tab = y_i_listbox1[]
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
...
ENDIF.
REFRESH y_i_listbox1.
ENDFORM. " y_f_file_frmt_f4
Use this code you will get the List box in selection screen.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |