06-06-2006 12:01 PM
Hi,
CREATE OBJECT event_receiver.
SET HANDLER
event_receiver->handle_before_user_command FOR grid1.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
is_print = gs_print
is_layout = gs_layout
CHANGING
it_outtab = gt_sflight.
CALL METHOD grid1->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
Above code is not triggering the
before_user_command
event on pressing the following buttons:
Append Row
Insert Row
Delete Row
But when i am pressing Sort Up/Down the event is triggering.
06-06-2006 12:23 PM
Hi Flora,
If I understand your question correctly, There is nothing wrong with this behavior.
The event before_user_command will trigger before a user command but not after it. What are you trying to do exactly here?
Regards,
Ravi
06-06-2006 12:29 PM
06-06-2006 12:31 PM
Did you try using the USER_COMMAND or AFTER_USER_COMMAND events?
Regards,
Ravi
06-09-2006 8:08 AM
I have tried USER_COMMAND and AFTER_USER_COMMAND events,
but in vein. It seems "Delete Row" works on the front end, as even with debugging switch on it is not triggering any code at all.
06-09-2006 8:18 AM
Hi,
it will not .Those Buttons will not respond to before user command, this is what i observed.
copy row, delete row, append row, insert row,move row,
copy, cut,paste,paste new row, undo Buttons....
if you want to check the program BCALV_TEST_GRID_EVENTS all buttons will respond to before usercommand, and the rest of the buttons which i mentioned won't respond , thats the reason they excluded also if we want them to make respond exclude them from alv tool bar and then add via toolbar event and trigger via user_command event handler.
Regards
vijay
06-14-2006 11:36 AM
should have called the method register_edit_event by which you also select the way ALV Grid perceives changes
CALL METHOD G_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = cl_gui_alv_grid=>mc_evt_modified.
CALL METHOD G_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = cl_gui_alv_grid=>mc_evt_enter.