‎2007 Apr 02 6:24 AM
How to add values that are selected from database into the listbox dynamically.
‎2007 Apr 02 6:26 AM
‎2007 Apr 02 6:37 AM
Magesh,
type-pools: vrm.
parameters: p_bname type usr01-bname as listbox visible length 20.
initialization.
perform build_user_drop_down_list.
start-of-selection.
write:/ p_bname.
************************************************************************
build user_drop_down_list
************************************************************************
form build_user_drop_down_list.
data: name type vrm_id,
list type vrm_values,
value like line of list.
data: iusr01 type usr01 occurs 0 with header line.
clear list. refresh list.
name = 'P_BNAME'.
select * into corresponding fields of table iusr01
from usr01.
sort iusr01 ascending by bname.
loop at iusr01.
clear value.
value-key = iusr01-bname.
value-text = iusr01-bname.
append value to list.
endloop.
Set the values
call function 'VRM_SET_VALUES'
exporting
id = name
values = list.
endform.
pls. reward if useful