Hi,
Please refer to this thread which solves your purpose
Edit: Page # 8, Toolbar Functions. The toolbar functions are like any other normal table functions.
Copy this program 'SALV_WD_DEMO_EXTENDED' to a zobject, edit the method 'INITIALIZE_ALV' in component controller to include objects in ALV toolbar.
In transaction Se24, CL_SALV_WD_FE_* will give you the applicable objects you can add to toolbar.
Cheers,
VS