ABAP – ALV Context menu + keep row selection after a filter is applied

SAPStandard functionality of an ALV grid offers row selection by clicking on the row headers. You can also use Ctrl or Shift keys to do mutliple row selection. Drawback of this is when you need to select some rows and apply some filters at the same time. Setting or deleting filter (or any operation which does grid refresh) clears the row selection. If you need to keep the row selection together with functionality of filter (and others), you can follow my little suggestion Continue reading

ALV – Keep selection and scroll position after ALV refresh

SAPThere is an issue with ALV grid that if you refresh the grid being in edit mode using method REFRESH_TABLE_DISPLAY (in case you use CL_GUI_ALV_GRID) after you have changed some data, it may happen the cursor and/or scroll goes to the first (top left) cell of the grid. It might be a little confusing for user, but you can avoid this issue by using the following methods (and attached piece of code) Continue reading