Skip to Content
0
Feb 16, 2011 at 09:55 PM

How to invoke delete rows event in ALV_GRID

35 Views

I have two screens.

The first screen 100 have several splitter control ALV grids that display data.

The second screen 200 is the maintenance of screen on 100 that have two grids side by side need to update simultanously.

When I update or insert data on the second screen, I refresh data on screen 100 so that when user navigate to screen 100 they can see the updated data.

For insert rows or modified rows, it works as expected.

However when I delete rows on screen 200 and click go back to 100, screen 100 still shows the rows that I deleted in screen 200. I think that I missed something.

I debug in even data_changed in cl_gui_alv_grid when I deleted, it did not go through this logic therefore I cannot refresh the other grids on screen 100.

Here are the events that I defined and registered in the PBO of screen 200.

class lcl_event_handler definition.

class-methods:

on_data_changed FOR EVENT data_changed

OF cl_gui_alv_grid IMPORTING er_data_changed e_ucomm,

on_user_command for event user_command of cl_gui_alv_grid importing e_ucomm.

endclass.

set handler:

lcl_event_handler=>on_data_changed for go_grid,

lcl_event_handler=>on_user_command for go_grid.

What did I do wrong?

Thanks,