Hi alv freaks,
anyone knows how to show an icon interpreting a listwiewer field ?
servus
Hans
Listviewer, how to show icons
Moderators: Snowy, thx4allthefish, YuriT, Gothmog
-
- Posts: 346
- Joined: Tue Dec 17, 2002 7:52 am
- Location: Amsterdam, The Netherlands
- Contact:
Here is an example that I got from http://www.henrikfrank.dk/abapdk.html:It shows trafficlights, but I think you will be able take it from here.
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.
Best regards, Tim van Steenbergen