CL_ALV_GRID_TOOLBAR_MANAGER - ALV Grid Toolbar Administration

General Data in Customer Master   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Functionality

Reorganization of the toolbar of an ALV grid control.

The ALV grid control provides a whole range of functions.

If a certain application adds own functions to the toolbar, it can easily be the case that 20 to 30 functions appear in the toolbar.

The appearance of the toolbar is therefore not user-friendly and can be very confusing.

This class can be used to split the ALV toolbar into three levels:

  • Level 1 - only application-specific functions
  • Level 2 - application-specific functions plus ALV sort and totals functions
  • Level 3 - complete toolbar with all functions

If the ALV grid is editable, the editing functions are also available in each level.

A new function key is added at the end of each toolbar, and you can use this key to expand or collapse the toolbar.

This class should be used as follows:

  • In the event handler class of your ALV program you define an instance variable for the class CL_ALV_GRID_TOOLBAR_MANAGER.
  • In the constructor of the event handler class you create an instance of CL_ALV_GRID_TOOLBAR_MANAGER.
  • In the event handler method for the ALV Toolbar (such as ON_TOOLBAR) you create the toolbar in the normal manner. At the end of the method you then call the toolbar manager method .
  • Before you end the ALV event handler instance, save the current level of the toolbar using the method SAVE_STATE in your user settings.

Relationships

Example

Report R_ALV_GRID_TOOLBAR_MANAGER

Notes

Warning !!
The key for saving user settings only comprises the fields REPORT and HANDLE. If your ALV grid also differentiates by LOG_GROUP, then you should refrain from saving the toolbar settings.

Further information



ABAP Short Reference   Vendor Master (General Section)  
This documentation is copyright by SAP AG.


Length: 2032 Date: 20120526 Time: 084121     triton ( 93 ms )