I’m using an editable ALV Grid. I would like it to behave like this:
- A custom button fills some cells in the ALV. Data validation shouldn’t be triggered yet.
- The user checks the filled data and accepts it by pressing ENTER. Only then is the new data checked in the handler of event
DATA_CHANGED
.
I’m calling CHANGE_DATA_FROM_INSIDE()
to fill the cells. My problem is that pressing Enter has no effect because no cells were changed by the user. Just calling CHANGE_DATA_FROM_INSIDE()
is not enough to be considered a change.
How can I trigger the DATA_CHANGED
manually ? I know you can trigger it after CHANGE_DATA_FROM_INSIDE()
by setting val_data
to abap_true
in the lvc_s_layo
structure, but I do not want it to be triggered immediately.
I’ve registered the Enter key like this:
go_alv_grid->register_edit_event( EXPORTING i_event_id = CL_GUI_ALV_GRID=>mc_evt_enter ).
It didn’t help.
I’ve tried to intercept the Enter key press as a PAI event, but it doesn’t trigger a PAI event, wether it is registered as an edit event or not.
It doesn’t trigger a USER_COMMAND
event either.
The Enter key always triggers event DATA_CHANGED_FINISHED
, but it doesn’t let me differentiate between Enter key presses and any other events which might also trigger this event.
Please help.