2010 Sep 28 4:14 PM
Hi all,
How can we make a selection column of an ALV visible which is of type CL_SALV_TABLE?I want to select rows of an ALV and made the selection mode of ALV multiple accordingly using the selection object reference of the ALV. I would like to have automatic selection buttons on each of each line like in classical ALV, which method of which subobject of CL_SALV_TABLE must be call?Thanks.
Kind Regards,
Sukru
2010 Sep 28 7:03 PM
Use the Selection Mode as the ROW_COLUMN. This will bring you the selectable buttons on the left side of the ALV.
data: lr_selections type ref to cl_salv_selections.
lr_selections = gr_table->get_selections( ).
lr_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ). " <<
Regards,
Naimesh Patel
2010 Sep 28 5:11 PM
I don't think the old-style button on the left is supported in SALV. Use methods like:
gr_selects = gr_alv->get_selections( ). "GR_SELECTS type ref to cl_salv_selections
gr_selects->set_selection_mode(
if_salv_c_selection_mode=>multiple ).
or
if_salv_c_selection_mode=> single ).
The user can then select one or multiple rows using shift-click, control-click, single-click, etc.
Personally, I think the click to select entire row, anywhere on that row, is a lot friendlier than the old scroll-to-the-left and click style.
2010 Sep 28 5:15 PM
hi,
thanks for your answer. As I have already explained in my question, I already did it and selection is made. My problem is, there is no first column on ALV like on classical ALV(class CL_GUI_ALV_GRID), which shows you the lines you have selected. It is my questions about.
Regards,
Sukru
2010 Sep 28 5:25 PM
And, that is the question I answered...
See programs beginning with SALV* for possibilities...I haven't seen the simplified ALV class/method that would put the old square pushbutton on an SALV output, but maybe it exists.
2010 Sep 28 7:03 PM
Use the Selection Mode as the ROW_COLUMN. This will bring you the selectable buttons on the left side of the ALV.
data: lr_selections type ref to cl_salv_selections.
lr_selections = gr_table->get_selections( ).
lr_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ). " <<
Regards,
Naimesh Patel