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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    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 comment
    10|10000 characters needed characters exceeded