Hey.
I have an ALV table created using class CL_GUI_ALV_GRID.
Users are allowed to delete rows from the ALV, and I am using Method refresh_table_display to allow them to see the changes in real-time. This solution is working well.
However, when a filter is applied on the ALV, it seems that after deletion and refresh, a line that doesn't belong in the filter criteria "sneaks in" to take the deleted line's place. I understand how this could sound weird, so I'm attaching an image with illustration. In this image I am filtering for vendor number 105608, and then try to delete the 2nd row. You can see what happens in the image.
I have been reading through a lot of SCN threads but couldn't find a solution.
I have tried using the set_filter_criteria method after refresh, but it didn't seem to re-apply the filter.
I have tried using set_table_for_first_display and sending it_filter, but that didn't go well either. When I tried calling the method without sending is_variant and is_layout, it worked well and re-applied the filter. However this has messed up the display (affecting the order of columns). When I tried calling the method with the layout and variant, the filter just reset himself.
Any ideas?
Thanks for reading.