ABAP – Select ALV layout on the selection screen

If you want to offer your users to have a parameter on the selection screen where they can select layout of the ALV to be displayed, you can use the following code snippet Continue reading

ABAP – Dynamically show and hide ALV (as sidebar)

SAPQuite frequently I’m getting requests to create an ALV report where only the “header data” is displayed…but after clicking on a hotspot area in that ALV, another grid (ALV) is to be displayed with detailed information (displayed as a sidebar on the screen, not as a new, modal screen). And of course, this sidebar should be possible to be closed/hidden. Continue reading

ABAP – Grouping fields in field catalog

SAPIn some cases you find a report with ALV output where there are maybe hundreds of fields available to be displayed. This can be VERY confusing for the user when he tries to select just few fields he wants to display but all fields are listed in one HUGE list together.

Continue reading

ABAP – ALV custom toolbar button + Import data from clip board

SAPIn this code example I’ll show how to add custom button to your ALV toolbar. This custom button will import data from clipboard into the ALV grid. This can solve issue with classic Ctrl+C and Ctrl+V where there’s a problem that new rows are NOT created in the ALV grid automatically – this will be solved by the extra toolbar button Continue reading

ALV – Dynpro controlled by a global class

SAPIn this article I’ll present an approach how to handle a screen with a global ABAP class. The idea is simple – we will create a class which will listen to PAI and PBO events raised by the screen. All data processing and screen element manipulation is done in the class code. Let’s check out how exactly it is done 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