Application Development 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: 

how to mark first record by default in oo ALV

Former Member
0 Kudos

Hi Experts,

I am using OO ALV to display ALV Grid in Custom Container. How to mark the frst record by default in ALV Grid.!

Please help.

Thanks in Advance,

Regards,

Priya

1 ACCEPTED SOLUTION

former_member184578
Active Contributor
0 Kudos

Hi.,

Using set_selected_rows() method you can achieve this.,

First Call ALV using o_grid->set_table_for_first_display

Then call o_grid->set_selected_rows " here o_grid is reference to cl_gui_alv_grid

You have to pass parameter index 1 to it_row_no.

Also you can pass the row numbers which you want to select by default .,

hope this helps u.,

Thanks & Regards,

Kiran

2 REPLIES 2

former_member184578
Active Contributor
0 Kudos

Hi.,

Using set_selected_rows() method you can achieve this.,

First Call ALV using o_grid->set_table_for_first_display

Then call o_grid->set_selected_rows " here o_grid is reference to cl_gui_alv_grid

You have to pass parameter index 1 to it_row_no.

Also you can pass the row numbers which you want to select by default .,

hope this helps u.,

Thanks & Regards,

Kiran

0 Kudos

Hi.,

thanks., it solved the problem..!!