Show TOC Entering content frame

Background documentation Providing Standard ALV Functions Locate the document in its SAP Library structure

You are able to provide functions so that users can work with the ALV output. The functions that the system provides for ALV are called standard ALV functions. Standard ALV functions include, for example, sorting, filtering, and performing calculations.

A number of UI elements can be found in the toolbar. The majority of the UI elements, however, are found in the Settings dialog box, a separate area that the user can show or hide as required.

You cannot change the positioning of the UI elements for the standard ALV functions.

Note

You can show, hide, or deactivate the entire toolbar.

 

Settings Dialog Box

This dialog box is hidden by default. The user can show it by choosing the Settings button from the toolbar.

Note

The settings that the user makes in the dialog box can be applied to the ALV output in two ways:

·         Using the Copy pushbutton

The settings are applied to the ALV output. The dialog box remains open and the user can make further settings.

·         Using the OK pushbutton

The settings are applied to the ALV output. The dialog box closes.

If the user chooses the Cancel pushbutton, the dialog box closes without changing the ALV output.

Providing Standard ALV Functions

You determine which standard ALV functions are available to the user by showing or hiding the UI elements for the relevant standard functions.

Note

By default, all UI elements are shown with the exception of those elements that are required for calculations (including interim results) and for the editable ALV.

You can find the methods you require for this in the interface class IF_SALV_WD_STD_FUNCTIONS (implementing class CL_SALV_WD_CONFIG_TABLE). All of these methods contain the parameter VALUE of the type ABAP_BOOL:

Methods for Standard ALV Functions

Function

UI Element

Comments

Method

Show and hide columns

 

 

 

Column Selection tab page

 

SET_COLUMN_SELECTION_ALLOWED

Sort

 

 

 

Sorting tab page

 

SET_SORT_COMPLEX_ALLOWED

Sorting with single click on column header

Arrow icon in column header

SET_SORT_HEADERCLICK_ALLOWED

Filter

 

 

 

Filter tab page

 

SET_FILTER_COMPLEX_ALLOWED

Filter pushbutton in toolbar

 

SET_FILTER_FILTERLINE_ALLOWED

Calculations

 

 

 

Calculations tab page

 

SET_AGGREGATION_ALLOWED

All elements for interim results

Additional information on Sorting tab page

SET_GROUP_AGGREGATION_ALLOWED

Note

The UI elements for interim results are only visible if both the Sorting tab page and the Calculations tab page are shown.

Count table entries

 

SET_COUNT_RECORDS_ALLOWED

Display

 

 

 

Display tab page

 

SET_DISPLAY_SETTINGS_ALLOWED

Views

 

 

 

Views dropdown list box

 

SET_VIEW_LIST_ALLOWED

Editable ALV

 

 

 

Pushbutton Insert Line

Can only be shown if write-protection has been deactivated

SET_EDIT_INSERT_ROW_ALLOWED

Pushbutton Append Line

SET_EDIT_APPEND_ROW_ALLOWED

Pushbutton Delete Line

SET_EDIT_DELETE_ROW_ALLOWED

Pushbutton Check

SET_EDIT_CHECK_AVAILABLE

Pushbutton Undo

SET_EDIT_UNDO_ALLOWED

Export

 

 

 

Pushbutton Excel

 

SET_EXPORT_ALLOWED

Pushbutton and tab page Print Version

 

SET_PDF_ALLOWED

Note

The names of the relevant get methods do not begin with GET_<METHOD NAME>, but with IS_<METHOD NAME>.

Standard ALV Function Events

Two events have been provided to handle standard ALV functions:

·        ON_STD_FUNCTION_BEFO

·        ON_STD_FUNCTION_AFTE

 

Leaving content frame