2007 Jun 21 7:27 AM
Hi Gurus,
Am developing a report in OOPS. Double click event is working fine. But tool bar event is not triggering.
Here my class declaration is
METHODS : handle_double_click
for EVENT double_click of CL_GUI_ALV_GRID
IMPORTING E_ROW E_COLUMN,
handle_tool_bar for event toolbar of cl_gui_alv_grid
importing e_object e_interactive,
user_command FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
and i used set handler like
SET HANDLER EVENT_HANDLER->handle_double_click for grid.
SET HANDLER EVENT_HANDLER->handle_tool_bar for grid.
SET HANDLER EVENT_HANDLER->user_command FOR GRID.
In handle_tool_bar method I written the code
DATA : ls_toolbar TYPE stb_button.
CLEAR ls_toolbar.
MOVE 0 TO ls_toolbar-butn_type.
MOVE 'DISPLAY' TO ls_toolbar-function.
MOVE space TO ls_toolbar-disabled.
MOVE 'DISPLAY' TO ls_toolbar-text.
MOVE icon_change_text TO ls_toolbar-icon.
MOVE 'Click2Display' TO ls_toolbar-quickinfo.
APPEND ls_toolbar TO e_object->mt_toolbar.
But this button is not coming in tool bar?
Any suggesions?
Points will be awarded
Thanks
SC
2007 Jun 21 7:34 AM
Hi,
Have you set the toolbar as interactive? Only then you can add user defined functions to it.
Regards,
Nithya
Hi Gurus,
Am developing a report in OOPS. Double click event is working fine. But tool bar event is not triggering.
Here my class declaration is
METHODS : handle_double_click
for EVENT double_click of CL_GUI_ALV_GRID
IMPORTING E_ROW E_COLUMN,
handle_tool_bar for event toolbar of cl_gui_alv_grid
importing e_object e_interactive,
user_command FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
and i used set handler like
SET HANDLER EVENT_HANDLER->handle_double_click for grid.
SET HANDLER EVENT_HANDLER->handle_tool_bar for grid.
SET HANDLER EVENT_HANDLER->user_command FOR GRID.
In handle_tool_bar method I written the code
DATA : ls_toolbar TYPE stb_button.
CLEAR ls_toolbar.
MOVE 0 TO ls_toolbar-butn_type.
MOVE 'DISPLAY' TO ls_toolbar-function.
MOVE space TO ls_toolbar-disabled.
MOVE 'DISPLAY' TO ls_toolbar-text.
MOVE icon_change_text TO ls_toolbar-icon.
MOVE 'Click2Display' TO ls_toolbar-quickinfo.
APPEND ls_toolbar TO e_object->mt_toolbar.
But this button is not coming in tool bar?
Any suggesions?
Points will be awarded
Thanks
SC
2007 Jun 21 7:34 AM
Hi,
Have you set the toolbar as interactive? Only then you can add user defined functions to it.
Regards,
Nithya
2007 Jun 21 7:35 AM
Hi Nithya,
Thanks for your reply. How to set the toolbar as interactive?
Thanks
SC
2007 Jun 21 7:41 AM
there is a method set_toolbar_interactive in cl_guid_alv_grid. Use that to set the property. Then your button will get added.
2007 Jun 21 8:22 AM
HI Nithya,
I used that method but the button is not displaying?
Thanks
SC
2007 Jun 21 9:33 AM
Hi Nithya,
Thanks for your valuable suggestion. I used that method before adding the button. Now I used that method after adding the button. It is coming in the toolbar. Thanks once again.
Regards
SC
2007 Jun 21 8:34 AM
Hi,
check this program , u may get some idea.
<b>BCALV_GRID_05</b>.
Reward Points if it is Useful.
Thanks,
Manjunath MS
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |