‎2008 Oct 31 5:05 AM
Hello All,
I need to give dropdown list on one column of table control. The value of this dropdown list varies on values of different column, which means values in list is not constant for all the rows.
Thanks & Regards
Prashant Gupta
‎2008 Oct 31 5:14 AM
Hi,
I dont think this can be done in table control as the field in all rows share common properties such as F4 help. So if u assign a list of values to one row field it will reflect in all rows.
Regards
Karthik D
‎2008 Oct 31 5:30 AM
Hi,
With F4 help you can give different values to different rows using process on value request event, but i need with dropdown list...
Thanks
Prashant
‎2008 Oct 31 5:47 AM
In Dialog programming select the i/o field and in the Attributes check on the Dropdown checkbox (F2 key for attributes).
use f.m vrm_set_value to fill the list box
‎2008 Oct 31 5:54 AM
Yes, I tried this one also, but i need to display different values for different rows...
‎2008 Oct 31 6:05 AM
Hi,
If you can populate different F4 help for different rows i think its no more difficult to do it as dropdown. Just check the Dropdown checkbox in the I/O field attributes and then on POV populate the F4 help according to the row number. Now it will display it in dropdown list. Remember that only F4 values are being displayed in dropdown lists.
Regards
Karthik D
‎2008 Oct 31 6:23 AM
in flow logic
PROCESS ON VALUE-REQUEST.
here it is for one field ..
but u can create n number.
FIELD sdyn_conn-carrid MODULE create_dropdown_box.
field -
in se38..
MODULE create_dropdown_box INPUT.
fill the field here
ENDMODULE.
‎2008 Oct 31 6:24 AM
Hi Prashant,
It is possible using separate Dropdown handle for separate cells. If you are using cl_gui_alv_grid for your table control then you can try this method
set_drop_down_table
DATA: lt_dropdown TYPE lvc_t_drop,
ls_dropdown TYPE lvc_s_drop,
go_grid_ctrl TYPE REF TO cl_gui_alv_grid,
ls_alv_fc TYPE lvc_s_fcat.
* First listbox (handle '1').
ls_dropdown-handle = '1'.
ls_dropdown-value = 'A'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'B'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'C'.
APPEND ls_dropdown TO lt_dropdown.
CALL METHOD go_grid_ctrl->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.
refresh lt_dropdown.
* Second listbox (handle '2').
ls_dropdown-handle = '2'.
ls_dropdown-value = 'D'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '2'.
ls_dropdown-value = 'E'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '2'.
ls_dropdown-value = 'F'.
APPEND ls_dropdown TO lt_dropdown.
CALL METHOD go_grid_ctrl->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.
ls_alv_fc-drdn_field = '1'. " For handle 1 ( so it will have A,B,C)
"for another cell give handle '2'.
By the above way you can set the handle to the cell accordingly
Cheers,
Kothand
‎2008 Oct 31 6:24 AM
Hello
Actually when using F4 on POV, event is triggered but there is no event triggered when we use dropdown list
Prashant