ALV Reports Part 7: Colors, Icons and Traffic Lights
Preview · a free account unlocks the full lesson
Highlight what matters in an ALV: column colors (emphasize), row colors (info field), cell colors (LVC T SCOL), icons with ICON constants, and exception columns (traffic lights) — for REUSE ALV and CL GUI ALV GRID.
In this lessonShow sectionsHide sections
Visual overview
Explanation
The drill-down built in Part 6 helps users find details after they click; colors and icons go a step further, helping them see problems before they click at all. Color codes follow the format Cxyz: x is the color itself (1 gray-blue, 2 light gray, 3 yellow, 4 blue-green, 5 green, 6 red, 7 orange), y is whether it's intensified (0 or 1), and z is whether it's inverse (0 or 1) — so C610, for example, is intensified red.
For column color, set gs_fcat-emphasize = 'C300'. in the field catalog, and the whole column takes on that color.
For row color, add a field of TYPE char4, such as ROWCOLOR, to the output structure, fill it per row (for example 'C610' for overbooked flights), and reference it in the layout as info_fname = 'ROWCOLOR' for LVC or info_fieldname for SLIS.
For cell color, add a field of TYPE lvc_t_scol, such as CELLCOLOR, to the output structure — this is itself a small table living inside each row — append entries to it giving fname for the column along with color-col, color-int, and color-inv, and reference it in the layout as ctab_fname = 'CELLCOLOR' for LVC or coltab_fieldname for SLIS.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Interview questions on this topic
Related SAP topics
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.