Every function is represented by a function object from the class CL_SALV_WD_FUNCTION. You can generate as many function objects as you want and arrange them in the toolbar.
In contrast to the standard ALV functions, you can arrange self-defined, application-specific functions as you want within the toolbar. You must first decide whether the UI element is to be aligned to the left or the right margin of the ALV output (left-justified or right-justified). This dictates which methods you use to generate and delete the function object.
You cannot change this setting once it has been made.
To generate or delete a function object, use the methods of the interface class IF_SALV_WD_FUNCTION_SETTINGS (implementing class CL_SALV_WD_CONFIG_TABLE).
When you generate a function, you specify a unique ID (STRING type). This ID is later used to address this function.
Methods for Generating Function Objects
Function |
Method |
Generate function (left-justified) |
CREATE_FUNCTION |
Generate function (right-justified) |
CREATE_FUNCTION_RIGHT |
To delete a function, specify its ID.
Methods for Deleting Function Objects
Function |
Method |
Delete function (left-justified) |
DELETE_FUNCTION |
Delete function (right-justified) |
DELETE_FUNCTION_RIGHT |