Object Oriented Approach For ALV Lists in ABAP
Object Oriented Approach For ALV Lists in ABAP
By Noman Hanif
Introduction
The SAP List Viewer is a generic tool that outputs data in a table form
o Tree
Technologies
o List
o Control Framework : A control is made available for ALVs , known as ALV Grid. It can be used in 3
ways:
Function module wrapper. It may be used in Full screen mode, which means that the buttons
are displayed in the application toolbar, and also in popup mode (REUSE_ALV_GRID_DISPLAY).
Object oriented wrapper (CL_GUI_ALV_GRID)
design lists.
Provides typical list functions such as sorting, filtering, summing etc.
Provides common list operations and canbe enhanced by user-defined
options.
CL_GUI_EASY_SPLITTER_CONTAINER:
For displaying two ALV Grids on single screen, container is splitted into
two containers by using this class.
4.
5.
Layout Structure
Events List
container.
Populate the internal table that you want to display on the Grid.
ofscreen.
METHOD SET_TABLE_FOR_FIRST_DISPLAY of class CL_GUI_ALV_GRID is
In SAP Netweaver 2004, SAP introduced a new Object Oriented ALV list
Development
In this subroutine we use get_flight_schedule, theinitialize_alv, and
thedisplay_alv.
class,CL_SALV_TABLE.
The Result
We usually set a unique key to make the different ALV layout settings
unique between each other, and set a restriction for saving the layouts.
To set a unique key we use theSET_KEY()method of
The Result
OPTIMIZE_COLUMN_WIDTHsubroutine into
In theOPTIMIZE_COLUMN_WIDTHsubroutine
Place its declaration in the global area for the sake of the simplicity with the
typeCL_SALV_COLUMN.
THANK YOU!!