Hi Subhajit,
Assuming that you are referring to the SALV,i recommond you see this DEMO program:SALV_DEMO_TABLE_FUNCTIONS,you will see how to add a function button to SALV,
IF you mean the tranditional OO ALV, i'd like you to see the following codes:
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS: handle_toolbar
FOR EVENT
toolbar OF cl_gui_alv_grid
IMPORTING
e_object e_interactive.
METHODS: handle_user_command
FOR EVENT
user_command OF cl_gui_alv_grid
IMPORTING
e_ucomm.
ENDCLASS. "lcl_event_receiver DEFINITION
METHOD handle_toolbar.
DATA: ls_toolbar TYPE stb_button.
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type.
APPEND ls_toolbar TO e_object->mt_toolbar.
CLEAR ls_toolbar.
MOVE 'DETAILS' TO ls_toolbar-function.
MOVE icon_select_detail TO ls_toolbar-icon.
MOVE text-003 TO ls_toolbar-quickinfo.
MOVE text-003 TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD. "handle_toolbar
Yes,you'll get a function button if you register the event into a grid through codes below.
set handler event_receiver->handle_toolbar FOR g_grid.
I hope this would help.
Regards.
Panda.