Sometime there will a requirements to display the Traffic Light Signal icons in report output.
In this post, we will see how to display the Traffic Lights Signal icons in report output.
Setp-1: Create a report program form SE38 transaction and paste the below code.
REPORT ZVENU_TRAFFIC_SIGNALS.
*--Declaration of variables
DATA: L_GREEN(4) TYPE C VALUE '@08@',
L_YELLOW(4) TYPE C VALUE '@09@',
L_RED(4) TYPE C VALUE '@0A@'.
*--Printing the GREEN Traffic light
WRITE: / L_GREEN , 'Green Signal'.
*--Printing the GREEN Traffic light
WRITE: / L_YELLOW , 'Yellow Signal'.
*--Printing the GREEN Traffic light
WRITE: / L_RED , 'Red Signal'.
*--Declaration of variables
DATA: L_GREEN(4) TYPE C VALUE '@08@',
L_YELLOW(4) TYPE C VALUE '@09@',
L_RED(4) TYPE C VALUE '@0A@'.
*--Printing the GREEN Traffic light
WRITE: / L_GREEN , 'Green Signal'.
*--Printing the GREEN Traffic light
WRITE: / L_YELLOW , 'Yellow Signal'.
*--Printing the GREEN Traffic light
WRITE: / L_RED , 'Red Signal'.
Step-2: Save and Activate.
Step-3: Execute the report. Now you will be able to see the traffic lights in output, which is as soon below.
Important Notes:
- Every ICONs in SAP has its own two digit code associated with it.
- To display the ICON in Report/ALV output we need to pass the the icon code between to @@ symbols. i.e @XX@.
Regards,
Venugopal M N