Disable DEL-Key on Keyboard in ALV-Grid
I have the following problem:
I have an editable ALV with buttons delete row and insert row in the toolbar.
I would like to disable the DEL-Key on the Keyboard.
I tried by doing the following:
data: ls_layout type LVC_S_LAYO. ls_layout-NO_ROWINS = 'X'. call method g_grid->SET_FRONTEND_LAYOUT exporting is_layout = ls_layout.
but this drops also the Delete and Insert Buttons in the toolbar.
Another possibility would be to trigger the same actions when pressing the DEL-Key as triggered when clicking on the delete button. For my alv I am using this:
lv_event_id = cl_gui_alv_grid=>mc_evt_modified. "MC_EVT_MODIFIED.
CALL METHOD pcr_alv->register_edit_event
i_event_id = lv_event_id
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
so the handle_data_changed method is triggered when pressing on DEL. But how to check that it has been triggered by DEL? sy-ecom is empty.
Anybody could give me an answer for this questions?