This website is not affiliated with, sponsored by, or approved by SAP AG.

Listviewer, how to show icons

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Listviewer, how to show icons

Postby bavarian » Thu Feb 27, 2003 3:26 am

Hi alv freaks,

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

servus

Hans
bavarian
 

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

Here is an example that I got from http://www.henrikfrank.dk/abapdk.html:
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'.
      ELSE.
        g_wa_sflight-traffic_light = '3'.
      ENDIF.
      MODIFY gi_sflight FROM g_wa_sflight.
    ENDLOOP.
*   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
Tim van Steenbergen
 
Posts: 346
Joined: Tue Dec 17, 2002 7:52 am
Location: Amsterdam, The Netherlands


Return to ABAP

Who is online

Users browsing this forum: Google [Bot] and 9 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.