03-27-2009 1:33 AM
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.
03-27-2009 8:40 AM
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
03-27-2009 8:40 AM
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
03-27-2009 6:07 PM
I have a question: you can do it in transaction ME22N. Does it use a table control???
03-27-2009 6:10 PM
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.
03-27-2009 10:32 AM
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
03-30-2009 3:16 PM
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
03-31-2009 12:05 AM
11-09-2009 5:14 PM
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.