Listviewer, how to show icons

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply

Listviewer, how to show icons

Post by bavarian » Thu Feb 27, 2003 3:26 am

Hi alv freaks,

anyone knows how to show an icon interpreting a listwiewer field ?



Tim van Steenbergen
Posts: 346
Joined: Tue Dec 17, 2002 7:52 am
Location: Amsterdam, The Netherlands

Post by Tim van Steenbergen » Thu Feb 27, 2003 3:43 am

Here is an example that I got from

Code: Select all

TYPES: BEGIN OF st_sflight.
        INCLUDE STRUCTURE zsflight.
TYPES:  traffic_light TYPE c.
´TYPES: END OF st_sflight.
TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
DATA: gi_sflight TYPE tt_sflight.

*   Set the exception field of the table
    LOOP AT gi_sflight INTO g_wa_sflight.
      IF g_wa_sflight-paymentsum < 100000.
        g_wa_sflight-traffic_light = '1'.
      ELSEIF g_wa_sflight-paymentsum => 100000 AND
             g_wa_sflight-paymentsum < 1000000.
        g_wa_sflight-traffic_light = '2'.
        g_wa_sflight-traffic_light = '3'.
      MODIFY gi_sflight FROM g_wa_sflight.
*   Name of the exception field (Traffic light field)
    gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
*   Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
      EXPORTING i_structure_name = 'SFLIGHT'
                              is_layout               = gs_layout
      CHANGING  it_outtab                 = gi_sflight.

It shows trafficlights, but I think you will be able take it from here.
Best regards, Tim van Steenbergen

Post Reply