Thursday, 10 July 2014

Display of traffic signal lights in ALV

Some times we get requirement to show the lights in ALV display. Those lights one can compare with the traffic lights. In ALV, those lights show the particular state of that record. It can be used for anything like showing the material in stock, showing the criticality etc.

How to achieve it:
  1.  Declare a variable of type icon_d  in internal structure type. Our final internal table which we will display would be of that structure type.
  2. There are some IDs which actually let us show those lights. The full information for those can be find in the below link.
    http://www.sapdesignguild.org/resources/icons_sap/status_icons.htm
  3. we will assign those Ids to out internal table's icon field.

Code:






Result:


                                                                                                             By: Reetika Patel

No comments:

Post a Comment