Color Coding, Icons and Traffic Lights
Use colors, icons and status indicators to make ALV reports easier to understand.
Explanation
Color coding and icons help users identify exceptions quickly. Red can show blocked or overdue items, yellow can show warning conditions and green can show successful status. Icons and traffic lights are useful in monitoring reports, upload logs and reconciliation outputs. But visual indicators must be used carefully. Too many colors make the report confusing. The logic behind each color should be business-driven and consistent.
Code example
* Purpose:* Set traffic light icon based on delay days.* This helps users quickly identify urgent records. LOOP AT gt_output ASSIGNING FIELD-SYMBOL(<ls_output>). IF <ls_output>-delay_days > 5. * Red means critical delay <ls_output>-status_icon = icon_red_light. <ls_output>-status_text = 'Critical Delay'. ELSEIF <ls_output>-delay_days > 0. * Yellow means warning delay <ls_output>-status_icon = icon_yellow_light. <ls_output>-status_text = 'Delayed'. ELSE. * Green means no delay <ls_output>-status_icon = icon_green_light. <ls_output>-status_text = 'On Time'. ENDIF. ENDLOOP.Real project scenario
A shipping cockpit uses red for deliveries delayed more than five days, yellow for one to five days late and green for on-time deliveries.
Common mistakes
- Using colors without explanation. - Using too many visual indicators. - Hardcoding unclear status rules. - Relying only on color without status text.
Best practices
- Use colors for meaningful exceptions. - Provide status text along with color. - Keep color rules consistent. - Avoid overusing colors.
Interview angle
Interviewers may ask how to highlight ALV rows based on business status. Explain status field, icon/color field and business rule.