ALV
In this section, I will present an example of how to create ALVs in two ways. In the same example, I will show you the possibilities of ALVs, also using the selection screen created before.
ALV is an integrated element of the ABAP objects environment. This makes it possible to implement the display of structured datasets. We can display simple and two-dimensional tables, hierarchical-sequential lists, and tree structures.
The possibilities of these two methods are similar, so I will present all examples based on the CL_GUI_ALV_GRID
class and then I will present code where I created a basic ALV by using SALV classes.
Basics
If we want to create an ALV first, we need to declare a local variable of type references to the cl_gui_alv_grid
class, a variable of type references to the cl_gui_custom_container
class, and a local constant with the name of the container and the table where we store data that will be shown on screen:
DATA: lt_spfli TYPE TABLE OF spfli, lr_alv TYPE REF...