ERPClimb logoERPClimb
ALV Reports
ABAP Developmentintermediate 10 min read

ALV Reports Part 7: Colors, Icons and Traffic Lights

Preview · a free account unlocks the full lesson

Key takeaway

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 sections

Visual overview

ALV Reports Part 7: Colors, Icons and Traffic Lights — learning sheetFlow: Run the code example: seat utilisation with traffic lights, red rows for full flights and a colored cell → Change thresholds and watch the colors change → Add an icon column with a lock icon for flights in the past. Key ideas: COLOR CODES; COLUMN COLOR; ROW COLOR; CELL COLOR. Watch out: Colors must carry meaning users understand — and should not be the only signal (color-blind users); add icons or text.ERPClimb.com / ABAP / LESSON 7/10 / LEARNING SHEETALV Reports Part 7: Colors, Icons and Traffic Lights1 · HOW IT FLOWS1Run the code exampleseat utilisation with trafficlights, red rows for full flights…2Change thresholds andwatch the colors change3Add an icon column with alock icon for flights inthe past2 · KEY IDEAS EXPLAINEDColor CodesFormat Cxyz: x = color (1 gray-blue, 2 light gray,3 yellow, 4 blue-green, 5 green, 6 red, 7 orange),y = intensified (0/1), z = inverse (0/1). Example…Column ColorField catalog: gs_fcat-emphasize = 'C300'. Thewhole column gets the color.Row ColorAdd ROWCOLOR TYPE char4 to the output structure.Fill it per row (e.g. 'C610' for overbookedflights).Cell ColorAdd CELLCOLOR TYPE lvc_t_scol to the outputstructure (a table inside each row).Append entries with fname = column and color-col /color-int / color-inv.3 · REMEMBER · WATCH OUTRememberColumn color: field catalog emphasize = 'C510' (C + color 1–7 +intensified + inverse).Row color: a 4-char field in the output table named in layoutinfo_fname; cell color: an LVC_T_SCOL field named in layout…Traffic lights: a 1-char field with 1 = red, 2 = yellow, 3 = green,named in layout excp_fname.!Watch outColors must carry meaning usersunderstand — and should not be theonly signal (color-blind users); addicons or text.4 · IN A REAL PROJECTA production supervisor ALV listed 2,000 open orders; late orders were only visible by comparing two datecolumns. Adding a traffic light column (red = late, yellow = due within 2 days, green = on time) and a red rowcolor for late high-priority orders let supervisors spot problems immediately. One supervisor was red-green…Original ERPClimb learning sheet • Verify against your SAP release and edition

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.

Free account

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

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.