Changing Content and Structures
Use
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:
-
Change content or order of single data record Afterwards you have to refresh the ALV task.
-
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. You refresh the ALV display.
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.
-
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 ALV Tool |
Classic ABAP List |
Full Screen |
In the Container |
|
Simple, two-dimensional table |
Yes |
Yes |
Yes |
|
Hierarchical-sequential list |
Yes |
||
|
Tree Structure |
No |
No |
|
Function |
Class |
Method |
|---|---|---|
|
Refresh ALV output without deleting filter and sort settings |
CL_SALV_TABLECL_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:
|
Function |
Class |
Method |
|---|---|---|
|
Change structure and data table |
CL_SALV_TABLECL_SALV_HIERSEQ_TABLECL_SALV_TREE CL_SALV_HIERSEQ_LEVEL |
SET_DATA |
|
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 |
|
|
Tree structure |
T_TABLE |
Initial empty table, only sets the structure |