2014 Mar 04 4:15 PM
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.
Hello Mickey,
May be you can try like this.
After filter, use GET_FILTER_CRITERIA.
Delete the 2nd row + Refresh and call method SET_FILTER_CRITERIA.
So that the system will set the same filter criteria again after the deletion+refresh.
Regards,
Thanga
2014 Mar 04 5:13 PM
Hi Mickey,
I just created an example of ALV on my system to take a look but i can't reproduce your error. I can filter and delete a line without errors. Can you attach me the source code so I can check it?
Thanks,
Alex
2014 Mar 04 8:13 PM
Hello Mickey,
May be you can try like this.
After filter, use GET_FILTER_CRITERIA.
Delete the 2nd row + Refresh and call method SET_FILTER_CRITERIA.
So that the system will set the same filter criteria again after the deletion+refresh.
Regards,
Thanga
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |