12-23-2004 8:53 AM
I am trying without sucess to add an icon to an ALV toolbar menu button. The button appears with text but no icon.
I have seen it work before just wondering what i am missing.
eg.
METHOD on_menu_button.
CALL METHOD e_object->add_function
EXPORTING fcode = 'ZCHANGE'
icon = icon_change
text = 'Contact'.
Cheers
JP
12-23-2004 9:03 AM
12-23-2004 9:07 AM
Check this program <b>BCALV_GRID_05</b> and I am not sure whether you are doing it correctly.
All you need to do is :
a) Define a class
b) add a method for event toolbar
c) in the method fill the internal table
e_object->mt_toolbar
Regards,
Subramanian V.
12-23-2004 2:06 PM
Hi JP
The code you've sent is not for adding a button to ALV toolbar, but for adding a function when a menu button is pressed. And as far as I know, it does not support icons for the moment although there is such a parameter.
To have a icon for a button <b>on</b> the ALV toolbar, I guess you know, but at the event "toolbar" assign the icon name to the relevant field.
For more information, you can have a look at the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an%20easy%20reference%20for%20alv%20grid%20control.pdf">"An Easy Reference For ALV Grid Control"</a>.
And as a last thing, let me introduce you the SDN forums pointing system: You can assign points to posts you find helpful while solving your question. You can reward points by clicking the yellow star icon at header of each reply post. You can reward;
- one 10 points (solved)
- two 6 points (very helpful answer)
- many 2 points (helpful answer)
Kind regards...
*--Serdar
12-29-2004 2:41 AM
Serdar,
Thanks for the semantic check.
I am trying to add an icon to a function, I read the pdf before submitting question.
Cheers
JSP