Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Displaying the selection column of an ALV created using class CL_SALV_TABLE

Former Member
0 Kudos
16,528

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

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
5,023

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

4 REPLIES 4
Read only

Former Member
0 Kudos
5,023

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.

Read only

0 Kudos
5,023

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

Read only

0 Kudos
5,023

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.

Read only

naimesh_patel
Active Contributor
5,024

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