Skip to Content
0
Former Member
Jan 05, 2011 at 02:54 PM

POWL, how to display icons

268 Views

I've already seen some questions on this forum about displaying icons in POWL lists. However i cannot get this to work, as it seems so easy to do... Simply changing the fieldcat does not work for me.

I have created a feeder class and implemented the powerlist in my webdynpro, now i would like to create a column with status icons. See the coding, who knows what is missing/wrong?

Documentation for the POWL says:

ICON_SRC Source for icon display

ICON_SRC_REF outtab column reference determining icon source

ICON_FIRST Icon positioning

ICON_FIRST_REF outtab column reference for icon positioning

Field definition in structure:

ICON type ICON_D

ICONNAME type ICONNAME

In Method GET_FIELD_CATALOG, the following code:

    ls_fieldcat-colid = 'ICON'.
    ls_fieldcat-icon_src_ref  = 'ICONNAME'. 
    INSERT ls_fieldcat INTO TABLE me->mt_fieldcatalog.
    e_fieldcat_changed = 'X'.
    c_fieldcat = me->mt_fieldcatalog.

In Method GET_OBJECTS

 
  loop at lt_orders assigning <ls_orders>.

*.... code to change iconname

    <ls_orders>-iconname = '@08@'.      "Also tried 'ICON_GREEN_LIGHT' here
    append <ls_orders> to me->mt_result.
  endloop.

  e_results = me->mt_result. 

Edited by: Michael on Jan 5, 2011 8:49 PM