CL_ALV_LIST_TOOLBAR_MANAGER - ALV List Toolbar Administration
General Material Data General Material DataThis documentation is copyright by SAP AG.
Functionality
Reorganization of the toolbar (PF status) of an ALV list.
An ALV list provides a whole range of functions.
If an 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
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:
- Define a global instance variable for class CL_ALV_LIST_TOOLBAR_MANAGER in your program.
- At event START-OF-SELECTION create an instance of CL_ALV_LIST_TOOLBAR_MANAGER.
- The constructor expects the name of a PF status and the name of the program in which this PF status is defined.
- If you only want to use the standard functions of ALV, you do not need to create any own PF status in your program. You can used the statuses defined in reportR_ALV_LIST_TOOLBAR_MANAGER namely "STANDARD", "STDPOPUP" and "STDPOPBX".
- If you want to offer own functions, copy the pre-defined status of report R_ALV_LIST_TOOLBAR_MANAGER and enhance this by your own functions.
- When function modules REUSE_ALV_LIST_DISPLAY or
REUSE_ALV_GRID_DISPLAY are called, provide the following parameters with data
- i_callback_program = sy-repid
- i_callback_pf_status_set = 'PF_STATUS_SET'
- i_callback_user_command = 'USER_COMMAND'
- In the callback FORM PF_STATUS_SET call toolbar manager method PF_STATUS_SET
- In the callback FORM USER_COMMAND call toolbar manager methodCHANGE_STATE if the function codes "TBM_TOOLBAR_COL" or "TBM_TOOLBAR_EXP" are triggered.
- After you leave the REUSE_ALV function module, save the current level of the toolbar using the methodSAVE_STATE in your user settings.
Relationships
Example
Report R_ALV_LIST_TOOLBAR_MANAGER
Notes
Further information
General Material Data ABAP Short Reference
This documentation is copyright by SAP AG.
Length: 3222 Date: 20120526 Time: 084146 triton ( 104 ms )






