Introduction:
The CL_SALV_TABLE class is part of the ALV Object Model which was
introduced in NetWeaver 2004. Basically it is an encapsulation of the pre-existing
ALV tools. For example the class CL_SALV_TABLE actually wraps around the
CL_GUI_ALV_GRID class for container implementation, as well as the
REUSE_ALV_GRID_DISPLAY and REUSE_ALV_LIST_DISPLAY function modules for
full screen display.
It was designed to be a single point of entry when using a specific ALV tool
such as the ALV table display, ALV hierarchical sequential list, and tree ALV. All of
these individual ALV tools have their own base class, for table it is the
CL_SALV_TABLE, but all have a common look. A lot of the methods are the same,
with only some differences in the parameters of the methods depending on the
actual tool you are using.
So to summarize, the ALV Object Model was delivered to give a more
collective interface to the ALV tools. There are limitations in the ALV Object
Model, for example, you can NOT color a line or a cell, but you can color a
column. Also, you can NOT have an editable ALV using the Object Model.
But for basic lists, it is a very powerful tool.
Following are the restrictions with CL_SALV_TABLE (ALV Object Model):
The number of columns is restricted to 90.
The output length of a column is restricted to 128 characters.
For sorting and subtotals, you use a total of nine levels or columns.
For columns that can be aggregated, note that the internal length of the column
is large enough for both single values and the result.
The output is column-oriented. You are only able to display flat, structured tables.
You are not able to display nested tables.
Tables displayed with ALV are not ready for input.
If you insert the table as grid in container, you are not able to use batch mode
(background)
Event handling in ALV Object Model:
For this, we need to handle the events defined in the class
‘CL_SALV_EVENTS_TABLE’.