Show TOC

Function documentationChanging Content and Structures Locate this document in the navigation structure

 

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 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:

End of the note.

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 Note

    This setting can lead to newly inserted data records not being displayed because the filter setting hid exactly these data records.

    End of the note.
  • 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.

ALV Tool

Display type

Function available

Simple, two-dimensional table

Classic ABAP List

Yes

Fullscreen

Yes

In the Container

Yes

Hierarchical-sequential list

Classic ABAP List

Yes

Tree Structure

Fullscreen

No

In the Container

No

Methods

Function

Class

Method

Refresh ALV output without deleting filter and sort settings

CL_SALV_TABLE CL_SALV_HIERSEQ_TABLE

REFRESH (Parameter REFRESH_MODE: SOFT)

Refresh ALV output and delete filter and sort settings

REFRESH (Parameter REFRESH_MODE: FULL)

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 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.

End of the caution.
Methods

Function

Class

Method

Change structure and data table

CL_SALV_TABLE CL_SALV_HIERSEQ_TABLE CL_SALV_TREE

CL_SALV_HIERSEQ_LEVEL

SET_DATA

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 (in CL_SALV_HIERSEQ_TABLE)

LEVEL

Hierarchy level whose structure you wish to change

T_TABLE

New table of hierarchy level

T_BINDING

List of up to five foreign-key relationships

(in CL_SALV_HIERSEQ_LEVEL)

VALUE

New table of hierarchy level

T_BINDING

List of up to five foreign-key relationships

Tree Structure

T_TABLE

Initial table Empty table, only sets the structure