hi
you can do it by using a method called do_prepare_output( )..
Please declare a attribute called gt_buttons and populate it in the above said method.
Please use this attribute in .htm thtmlb attribute called actions.
you will get the exact code if you search in sdn/google