Changing Standard Functions 
The standard functions are not designed for specific applications. As a result, special knowledge of the data displayed cannot be considered. In individual cases, you may design a standard function - such as sorting by a specific column - more effectively in a specific application.
Define an event handler method for event before_user_command. This event is triggered after the user has selected a function. This means that the ALV Grid Control passes control to the application before the function is executed. Using event parameter I_UCOMM you can restrict the function code to the function you want to modify.
Implement your own algorithm for the function within the event handler method. In this context, you can call methods of the ALV Grid Control.
Reset the function code to ensure that the standard function is no longer executed:
CALL METHOD < Instance of the ALV Control >->set_user_command
exporting I_UCOMM = SPACE.
Note
If you never need specific functions of the tool bar, you can hide them for the entire life-cycle of the control. For information on this, see: Hiding Standard Functions.