Refreshing the Display
Use
By default, the ALV output display is refreshed as soon as changes to the data are checked. The data in the list is updated and the settings in the Settings dialog box are applied to the data. This can result in undesired effects.
Automatic Refresh
The system automatically updates the display and applies the settings in the Settings dialog box under the following circumstances. You cannot change these mechanisms:
-
The user inserts rows, appends them to the end of the list, or deletes them.
-
The application applies changes to the data.
-
The user applies the settings in the Settings dialog box to the data by choosing Transfer or OK.
-
The user sorts or filters the ALV output.
Manual Refresh
In cases where the user changes existing data records, you can influence when a refresh of the ALV output is only to affect the data, and when the services that are currently set are to be applied to the changed data. There are two methods for this, each of which has two possible settings:
-
SET_REFRESH_ON_DATA_CHANGE
Controls refresh when the user changes the data and confirms this by pressing the ENTER key.
-
SET_REFRESH_ON_DATA_CHECK
Controls refresh when the user changes the data and chooses Check.
The following values are possible:
-
REFRESH_AND_APPLY_SERVICES
The data in the list is updated; the settings in the Settings dialog box are applied to the data.
-
REFRESH_DATA_ONLY
The data in the list is updated. The settings in the Settings dialog box are not applied to the data.
You can achieve various effects by combining both values:
-
Complete refresh
SET_REFRESH_ON_DATA_CHANGE
SET_REFRESH_ON_DATA_CHECK
REFRESH_AND_APPLY_SERVICES
REFRESH_AND_APPLY_SERVICES
This setting is the default setting.
The data is refreshed with every change, and the services are applied to the changed data.
-
Complete refresh only when Check is chosen
SET_REFRESH_ON_DATA_CHANGE
SET_REFRESH_ON_DATA_CHECK
REFRESH_DATA_ONLY
REFRESH_AND_APPLY_SERVICES
As long as the user only changes the data and confirms this by pressing the ENTER key, for example, the services are not applied to the changed data. The services are only applied to the changed data when the user chooses Check.
-
Complete refresh after pressing the ENTER key. The Check pushbutton is not relevant.
SET_REFRESH_ON_DATA_CHANGE
SET_REFRESH_ON_DATA_CHECK
REFRESH_AND_APPLY_SERVICES
REFRESH_DATA_ONLY
The data and the services are refreshed as soon as the user confirms the changes by pressing the ENTER key. The Check pushbutton is not relevant.
-
Services are not applied to the changed data.
SET_REFRESH_ON_DATA_CHANGE
SET_REFRESH_ON_DATA_CHECK
REFRESH_DATA_ONLY
REFRESH_DATA_ONLY
Services cannot be applied to the data by pressing the ENTER key or by choosing Check. They are only applied to the changed data when the user makes changes in the Settings dialog box and applies these to the data.
To control refreshing of the ALV output, you use the methods of interface class IF_SALV_WD_TABLE_SETTINGS (implementing class CL_SALV_WD_CONFIG_TABLE):
Methods for Refreshing ALV Output
Function
Method
Refresh if the user changes the data and confirms with a cell action.
SET_REFRESH_ON_DATA_CHANGE
Determine how the list is refreshed when the user completes a cell action.
GET_REFRESH_ON_DATA_CHANGE
Refresh if the user changes the data and chooses Check.
SET_REFRESH_ON_DATA_CHECK
Determine how the list is refreshed when the user choose Check.
GET_REFRESH_ON_DATA_CHECK
-
-
-