You are on page 1of 3

Changing Content and Structures

You are able to change the internal data table in various ways. Depending on
which type of change you use, you have to proceed differently to make the
change visible on the front end in the ALV output as well.
You are able to make the following changes:
 You change content or the sequence of the individual data records
Afterwards you need to refresh the ALV output
 You replace the entire data table

Refresh Display of the ALV Output


If you have changed single values, added rows or deleted rows in the data
table of list-type ALV outputs, you need to complete these changes in the ALV
output as well by refreshing the ALV display.
Note
For Changes in the Tree Structure you do not have to refresh the display. In
the other ALV tools, you do not have to refresh the ALV output when you
make the following changes:
 Changes to the Display of Columns
 Changes Sequence of Columns in the ALV display
 Changes to the DDIC Reference of Columns
By default, the ALV output automatically scrolls to the beginning. However,
you are able to determine that the current display (position on the screen) not
be changed.
You are able to refresh the ALV output in two ways:
 All settings for filters and sorting remain.
Note
This setting can lead to newly inserted data records not being displayed
because the filter setting hid exactly these data records.
 All settings for filters and sorting remain.

Features
For changes to content and structure, you are able to make the following
settings:
 Refresh ALV output
 Swap the data table of the ALV output

Refresh ALV output


With the refresh, you ensure that the changed values are available on the
front end as well.
Display type Classic ABAP List Fullscreen In the Container
ALV Tool

Simple, two-dimensional Yes Yes Yes


table

Hierarchical-sequential Yes
list

Tree Structure No No

Methods

Function Class Method

Refresh ALV output CL_SALV_TABLE REFRESH (Parameter


without deleting filter and CL_SALV_HIERSEQ_TABLE REFRESH_MODE: SOFT)
sort settings

Refresh ALV output and REFRESH (Parameter


delete filter and sort REFRESH_MODE: FULL)
settings

Change the Structure of the Data Table with SET_DATA


Depending on which ALV tool you are using, the parameters of the
SET_DATA method are different:
Caution
If you assign a new structure with SET_DATA, all objects that referred to the
previous structure will be deleted such as all sort objects in list-type ALV
outputs or all node objects in tree structures.
Methods

Function Class Method

Change structure and data CL_SALV_TABLE SET_DATA


table CL_SALV_HIERSEQ_TABLE
CL_SALV_TREE
CL_SALV_HIERSEQ_LEVEL

Change the Structure of the Data Table with the SET_DATA Method

ALV Tool Parameter Comment

Simple, two-dimensional table T_TABLE Table for structure


and contents of the
ALV output

Hierarchical-sequential list LEVEL Hierarchy level whose


(in structure you wish to
CL_SALV_HIERSEQ_TABLE) change

T_TABLE New table of hierarchy


level

T_BINDING List of up to five


foreign-key
relationships

(in VALUE New table of hierarchy


CL_SALV_HIERSEQ_LEVEL) level

T_BINDING List of up to five


foreign-key
relationships

Tree Structure T_TABLE Initial table


Empty table, only sets
the structure

You might also like