10-15-2008 2:21 PM
Hi All,
In my current report i am using ALV TREE by using cl_gui_alv_tree.
in which i have added a pushbutton & added functionality to them ,but i want a text on that push button.
Can anyone help me to get the text on the push button.
Thanks in advance.
Regards,
Tarak
10-15-2008 2:42 PM
In your method for handling toolbar button do this coding.
"somewhere in class define a method for hadling toolbar
handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive,
...
"then in implemenation part
METHOD handle_toolbar.
DATA: ls_toolbar TYPE stb_button.
" append a separator to normal toolbar
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type.
APPEND ls_toolbar TO e_object->mt_toolbar.
" append an icon to
CLEAR ls_toolbar.
MOVE 'INS' TO ls_toolbar-function. "here goes your funtion code
MOVE icon_insert_multiple_lines TO ls_toolbar-icon. "here name of the icon to dsiplay
MOVE text-tl1 TO ls_toolbar-quickinfo. "here add your text as quickinfo
MOVE text-tl2 TO ls_toolbar-text. "here goes your text on pushbutton
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD.
10-15-2008 2:48 PM
Try like this.
CONCATENATE '@FN@' 'My Buttton' INTO p_button SEPARATED BY space. " This will add a icon + text to the button.
-Aman