Question:
I have a strange problem in OO ALV. The grid displays on the screen and I have disabled the delete and cut buttons, however the user can still press the 'Delete' button on the keyboard and remove the selected entry from the screen. I've tried to capture this event at the start of of the PAI process but no matter what action I take I cannot prevent the record from being deleted. Anybody seen this behaviour before ??
Any help appreciated
Paul
Answer:
May be you changed only some properties for Delete and Cut buttons. Look at event and method for that ALV.
Dorin
Answer:
Hi Dorin,
I have excluded mc_fc_loc_cut & mc_fc_loc_delete_row by using the exclude table parameter in set_table_for_first_display. I cannot find any other functions that relate to deletion.
Paul
Answer:
For example, if you use CL_GUI_ALV_GRID class you call method SET_TABLE_FOR_FIRST_DISPLAY.
In SE80 at Class tab you can display CL_GUI_ALV_GRID class with
properties, interfaces, atributes, methods, events,... tabs.
Into Methods tab you can find SET_TABLE_FOR_FIRST_DISPLAY method.
Look into Events tab and may be you'll find what you search.
I hope that will help you.
Dorin.
Answer:
Hi Dorin,
Nothing there .... I've tried implementing before_user_command & user_command and for both implementations the code is not activated by pressing the delete button on the keyboard. The other thing to bear in mind is that the grid has been set as ready for input. I guess that this must be making a difference to the delete button ???
Paul
Answer:
Hi Dorin,
Nothing there .... I've tried implementing before_user_command & user_command and for both implementations the code is not activated by pressing the delete button on the keyboard. The other thing to bear in mind is that the grid has been set as ready for input. I guess that this must be making a difference to the delete button ???
Paul
Hi Paul,
i've also tried implementing own code at various events like before_user_command and after_user_command.
I guess the standard edit funtions like "delete", "insert", "copy", "cut" of an editable grid raise no events excepting the event data_changed.
Events like before_user_command/after_user_command seems to be only raised by other functions like "sort" or "filter".
I don't know another way than to exclude not-needed edit functions by excluding the buttons and to redefine the buttons by own code.
JensM