on 06-08-2011 12:10 PM
Hi,
i need to add 'UPDATE' button at the bottom of the ALV . i.e within the ALV. please help me out.
Try with this:
CLASS cl_event_receiver DEFINITION.
PUBLIC SECTION.
DATA: ucomm TYPE sy-ucomm.
* toolbar
METHODS handle_toolbar_set
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive.
* user command
METHODS handle_user_command
FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
CLASS cl_event_receiver IMPLEMENTATION.
METHOD handle_user_command.
CASE e_ucomm.
WHEN text-024.
PERFORM upload_id.
WHEN OTHERS.
ENDCASE.
ENDMETHOD.
METHOD handle_toolbar_set.
* append a separator to normal toolbar
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type.
APPEND ls_toolbar TO e_object->mt_toolbar.
CLEAR ls_toolbar.
MOVE :text-032 TO ls_toolbar-function,
*" function code of the push button
text-033 TO ls_toolbar-text.
*"text that will be displayed on the push button
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD.
ENDCLASS.
*set even handlers
SET HANDLER event_receiver1->handle_toolbar_set FOR g_grid1.
SET HANDLER event_receiver1->handle_user_command FOR g_grid1.
You can also add the button to a DynproStatus, and set it before ALV initialization.
ps. This is the wrong forum session (please, move this 3D to Abap Area).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.