To add custom toolbar on SALV, you need to do these following steps:
- SE41, Program name: SALV_DEMO_TABLE_FUNCTIONS, status name: SALV_STANDARD.
- Copy that Toolbar into your own custom toolbar.
- Define a method to Implement added_function event from class cl_Salv_events.
- The added_function has an import parameter to check your sy-ucomm value.
You can check the steps more detail here: adding custom toolbar on SALV.