Skip to Content

Toolbar: replace SAP icon with custom icon


in the account overview (component BP_HEAD, view BPHEADOverview), the implementation class (CL_BP_HEAD_BPHEADOVERVIEW_IMPL) contains method IF_BSP_WD_TOOLBAR_CALLBACK~GET_BUTTONS where the buttons for the account overview are collected.

Here you can check which buttons are used by SAP standard, e.g. for the PDF fact sheet, an icon is added:

ls_button-icon_src = '/sap/bc/bsp/sap/crm_ppm/w_pdf__s.gif' .

Now, I wanted to replace the given icon by another, customer-specific icon. I've tried to change the given URL to anything else, however, it didn't work. I even found out that the given URL is not necessary, it even works with this:

ls_button-icon_src = 'w_pdf__s.gif' .
ls_button-icon_src = 'i_do_not_exist/w_pdf__s.gif' .

Thus, I assume that there's some kind of mapping of the icon name (e.g. "w_pdf__s.gif") is mapped to any table entry or whatever hard-coded.

Does anyone having experience with replacing the icon with a custom-specific one and can provide the necessary steps?



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2011 at 08:23 PM

    Hi Wolfgang,

    You can use below sample code to get corresponding url for any standard sap icon:

    lv_icon = 'ICON_LED_GREEN'.
    *   Convert icon code into URL and prepare bee
        lv_icon = cl_bsp_mimes=>sap_icon( id = lv_icon ).
        lr_image->src = lv_icon.

    Also, all the icons are available in the database table 'ICON'.

    I hope that helps.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.