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: 

Select several rows in ALV - ECC 5.0

former_member216705
Participant
0 Kudos

Hello masters:

I have to select several rows in an ALV. I'm using cl_gui_alv_grid class to construct the ALV.

The layout table is filled in this way:

g_layout-zebra = 'X'.

g_layout-cwidth_opt = 'X'.

g_layout-sel_mode = 'D'.

I have the problem that I can only select several rows using Ctrl key, and I need to do this just selecting the rows with the mouse.

Thank you.

1 ACCEPTED SOLUTION

uwe_schieferstein
Active Contributor
0 Kudos

Hello Rodrigo

If you click on the MARK button of a row and keep the left mouse button pushed then you can select multiple rows next to each other.

However, you can select non-neighbouring rows this way. The ALV grid behaves the same way like Excel. So there is no way to escape the CTRL button.

Regards

Uwe

7 REPLIES 7

uwe_schieferstein
Active Contributor
0 Kudos

Hello Rodrigo

If you click on the MARK button of a row and keep the left mouse button pushed then you can select multiple rows next to each other.

However, you can select non-neighbouring rows this way. The ALV grid behaves the same way like Excel. So there is no way to escape the CTRL button.

Regards

Uwe

0 Kudos

I have a question: you can do it in transaction ME22N. Does it use a table control???

0 Kudos

Hi,

It uses the Table Control, not the ALV. In ALV if you want to select multiple rows you need to use the CTRL button to selecl the multiple row there is not other go.

MarcinPciak
Active Contributor
0 Kudos

Hi Rodrigo,

As Uwe said it is not possible using ALV. It is, however, feasible by means of table controls

See the example demo: DEMO_DYNPRO_TABLE_CONTROL_1

Regards

Marcin

Former Member
0 Kudos

Try this:

G_LAYOUT-SEL_MODE = 'A'.

This will give you a select all icon on ALV. If you click this, it selects all the rows within ALV. If you need to select rows randomly, just click on the desired row.

Hope this helps,

SKJ

0 Kudos

I also tried with 'A', but it works in the same way of 'D'.

former_member216705
Participant
0 Kudos

It wasn't necessary a code modification. I just have to use the Ctrl key and the mouse left button at the same time.

Thank you.