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

Single selection in ALV Grid Control

Former Member
0 Likes
1,305

hi,

I want to enable single row selection only in the alv grid displayed.

attribute sel_mode of layout doesnt help.

Can anybody provide me a solution.

Regards,

Auro

hi,

I want to enable single row selection only in the alv grid displayed.

attribute sel_mode of layout doesnt help.

Can anybody provide me a solution.

Regards,

Auro

6 REPLIES 6
Read only

Former Member
0 Likes
986

1. With the default BOX it will not workout

2. remove them with wa_layout-no_rowmark = 'X'. and

3. add checkboxes and validate them if the user selects more than 1 checkbox

4. chk program BCALV_EDIT_05

Read only

Former Member
0 Likes
986

Hello,

Try this:

DATA:gs_layout type lvc_s_layo.

gs_layout-NO_ROWMARK = 'X'.

call method g_grid->set_table_for_first_display

exporting is_layout = gs_layout

Regards,

Beejal

**reward if this helps

Read only

0 Likes
986

Hi,

I need a solution by which the BOX should be there and only single selection is possible.

Regards,

Auro

Read only

Former Member
0 Likes
986

Hi Auro ,

set sel_mode = 'A'. it will enable single row selection.

No_row_mark will take out that row buttons. so dont use that.

Regards

Satish

Read only

0 Likes
986

sel_mode = 'A' doesnt work

Read only

0 Likes
986

Hello,

You can validate by using a method like get_selected_rows and count the number of rows the user has selected using a local variable and throw an error message if more than one row is selected.

Regards,

Beejal

**reward if this helps