Hi Chetan,
U need to declare the data for drop down.
for ex.
data : drop_down_handle type int4.
then set your dropdown field editable and assign the fieldname
ex..
ls_fcat-edit = 'X'.
ls_fcat-drdn_field = 'DROP_DOWN_HANDLE'.
ls_fcat-outputlen = 5
Then define the drop drown pass it to alv
ex....
form< name u give>
data: lt_dropdown type lvc_t_drop,
ls_dropdown type lvc_s_drop.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'car'.
append ls_dropdown to lt_dropdown.
ls_dropdown-handle = '2'.
ls_dropdown-value = 'fan'.
append ls_dropdown to lt_dropdown.
ls_dropdown-handle = '2'.
ls_dropdown-value = 'pan'.
append ls_dropdown to lt_dropdown.
ls_dropdown-handle = '2'.
ls_dropdown-value = 'can'.
append ls_dropdown to lt_dropdown.
call method g_grid->set_drop_down_table
exporting it_drop_down = lt_dropdown.
endform.
This is how we write the drop down.....
regards,
Deepti.
plz reward if found helpful..
Add a comment