Skip to Content
0
Former Member
Sep 10, 2007 at 09:25 AM

ALV OO get selected row(s) / column(s) via ENTER Key (not mouse)

48 Views

Not sure if this is possible but would like to get selected rows and / or columns when the ENTER key is pressed. I don't want to do it with a mouse click. I've already got a different event for DOUBLE CLICK.

By ROW and Column selection I select by marking the ROW / Columns and NOT by selecting data within the grid itself.

I have also have an event for ENTER when I'm editing a cell (data changed) etc so perhaps it can't be done this way.

Strange thing is if I go into debug mode I get taken to the PAI module where sy-ucomm is ENTER. If I just select the rows and press ENTER nothing happens.

The whole thing works fine on Mouse click but I was just wondering if you could do this by just pressing ENTER after selcting the rows / columns.

I think the problem might be that I've registered the ENTER event for EDIT functionality.

CALL METHOD grid1->register_edit_event

EXPORTING

i_event_id = cl_gui_alv_grid=>mc_evt_enter.

I think I'm trying to use the same event for 2 different actions so it might not be possible.

Is there any way round this --it's not a show stopper to get the user to do a mouse click but ENTER should be able to decide whether EDIT is required or whether a column / row selection is being done.

Cheers

Jimbo