Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8065

Re: Display Icon in WebDynpro ALV column

$
0
0

Hi Eshwar,

First of all you don't need to have to use cl_salv_wd_uie_image as a cell editor to display an icon. Because other cell-editors are also capable to display icons.

For instance, if you further want to trigger an action, when clicking the icon, you have to use a link_to_action cell editor, but instead to display a text as value you just add an image.

 

If you are using cl_salv_wd_uie_image use:

  • Method SET_SOURCE( path )
    • pass the MIME URL to your icon as value. e.g. '/sap/public/bc/icons/s_s_ledg.gif'
    • Using this method will display the same icon in all rows of your table
    • e.g. lr_...->SET_SOURCE( '/sap/public/bc/icons/s_s_ledg.gif' ).
  • or method SET_SOURCE_FIELDNAME( fieldname )
    • Use this method if you want to have different icon in each row
    • you have to add a new column to your table (e.g. name it ICON_PATH of type string) in which you add the MIME URL path for each row. (In field ICON_PATH you have to write the path of your icon for the specific row)
    • call lr_...->SET_SOURCE_FIELDNAME( 'ICON_PATH' )

Similar methods for other cell-editors like cl_salv_wd_uie_link_to_action are called:

SET_IMAGE_SOURCE( path) and SET_IMAGE_SOURCE_FIELDNAME( fieldname ).



Tip: Always check the classes you are using.


Regards

ismail


Viewing all articles
Browse latest Browse all 8065

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>