‎2007 Jul 30 5:18 AM
Hi,
I need to enter values into drop down list box where these values are not coming from database. Please do the need.
Thanks & Regards,
Lakshmi
‎2007 Jul 30 5:29 AM
hi ,
Code your program with the following logic :
here is few info about vrm_values :
type-pools : vrm.
types:
*-- Single Value in Value Set
begin of vrm_value,
key(40) type c,
text(80) type c,
end of vrm_value,
*-- Table of Values
vrm_values type vrm_value occurs 0 .
vrm_values is one of the parameters of type vrm_value in VRM_SET_VALUES function module .
<b>Use VRM_SET_VALUES is the function module to get input help .</b>
fill the values to be displayed in an itab and pass the values to the FM parameter VALUES .
module create_drop_down_box_material output.
select matnr from mara
into table l_tab_mara_matnr
where matkl = 'ZPMBMAT'.
if not l_tab_mara_matnr[] is initial.
select maktx from makt
into l_tab_collect_maktx_frm_db-material_descr
for all entries in l_tab_mara_matnr
where matnr = l_tab_mara_matnr-material_no.
append l_tab_collect_maktx_frm_db.
endselect.
endif.
loop at l_tab_collect_maktx_frm_db into l_wa_collect_maktx_frm_db.
l_wa_mat_descr-key = l_wa_collect_maktx_frm_db-material_descr.
append l_wa_mat_descr to l_tab_mat_descr.
endloop.
name = 'ZCOT_PPT_DTLS-MATERIAL_DESCR'.
call function 'VRM_SET_VALUES'
exporting
id = name
values = l_tab_mat_descr
exceptions
id_illegal_name = 1
others = 2.
free: l_tab_mat_descr,l_tab_collect_maktx_frm_db.
endmodule. " create_drop_down_box_material OUTPUT
Regards,
Ranjita
‎2007 Jul 30 6:26 AM