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

ALV GRID Selection

Former Member
0 Likes
919

Can someone please tell me how to enable single row selection in

ALV grid? I'm using cl_salv_table to create the ALV grid.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
666

Hi,

You can use this class(cl_salv_selections) to set the selection mode.

Different modes are as follows,

IF_SALV_C_SELECTION_MODE->SINGLE

IF_SALV_C_SELECTION_MODE->MULTIPLE

IF_SALV_C_SELECTION_MODE->CELL

IF_SALV_C_SELECTION_MODE->ROW_COLUMN

IF_SALV_C_SELECTION_MODE->NONE

Please refer to the code snippet,

DATA: lr_sel TYPE REF TO cl_salv_selections.

lr_sel = gr_table->get_selections( ).

lr_sel->set_selection_mode( if_salv_c_selection_mode=>cell ).

Regards,

Vinodh

2 REPLIES 2
Read only

anversha_s
Active Contributor
0 Likes
666

hi,

<b>BCALV_EDIT_04</b> This report illustrates how to add and remove lines to a table using the ALV Grid Control and how to

implement the saving of the new data.

Rgds

Anversha

Read only

Former Member
0 Likes
667

Hi,

You can use this class(cl_salv_selections) to set the selection mode.

Different modes are as follows,

IF_SALV_C_SELECTION_MODE->SINGLE

IF_SALV_C_SELECTION_MODE->MULTIPLE

IF_SALV_C_SELECTION_MODE->CELL

IF_SALV_C_SELECTION_MODE->ROW_COLUMN

IF_SALV_C_SELECTION_MODE->NONE

Please refer to the code snippet,

DATA: lr_sel TYPE REF TO cl_salv_selections.

lr_sel = gr_table->get_selections( ).

lr_sel->set_selection_mode( if_salv_c_selection_mode=>cell ).

Regards,

Vinodh