Traffic Lights/ Display Icons in ALV grid / List

Here is a simple program which can be used to display the Traffic Lights / Display Icons in ALV grid / ALV list.

ALV grid Traffic Lights / Icons
ALV grid Traffic Lights / Icons

ALV list Traffic Lights / Icons
ALV list Traffic Lights / Icons

We are using a field in the internal table called as 'status' , which we will assign an icon ( Ex: icon_red_light and icon_red_green ) . Make sure you include type-pools : icon in the program for the icons.

In the field catalog population , we will set icon field of the fieldcatalog of the field.


  wa_fieldcat-icon         = 'X'.  

Thats it folks, all else are normal ALV routines.