Color Definition for Columns, Rows and
Cells
You are able to assign different colors to the columns, rows and cells of your ALV output table. A set of colors is available for this purpose that you can use with few restrictions.
The various ALV tools use different concepts when dealing with color:
● In the tree structure, some fixed combinations of text and background color are available.
Colors in the Tree Structure
Text Color |
Background Color |
Technical Name |
Black |
Standard |
DEFAULT |
Black |
Light yellow |
EMPHASIZED |
Black |
Medium blue |
EMPHASIZED_A |
Black |
Light blue |
EMPHASIZED_B |
Black |
Salmon colored |
EMPHASIZED_C |
Black |
Red |
EMPHASIZED_NEGATIVE |
Black |
Green |
EMPHASIZED_POSITIVE |
Gray |
Standard |
INACTIVE |
Dark Blue |
Standard |
INTENSIFIED |
Dark Red |
Standard |
INTENSIFIED_CRITICAL |
● In both of the other tools you are able to change the combinations of text and background color to a certain degree:
○ You choose a color from a set of possible colors.
○ You determine whether this color is to be light or dark (intensity)
○ You determine whether the color applies to the background or the text (inverse display)
Colors in List-Type ALV Outputs
Color |
Technical Name |
GUI-Dependent |
COL_BACKGROUND |
Gray Blue |
COL_HEADING |
Light Gray |
COL_NORMAL |
Yellow |
COL_TOTAL |
Blue Green |
COL_KEY |
Green |
COL_POSITIVE |
Red |
COL_NEGATIVE |
orange |
COL_GROUP |

The color COL_KEY is the color that the system uses for Lead Columns.
You are able to make the following settings for colors:
● Lead Columns have a color determined by the system. In lead columns you are only able to change the color in individual cells.
●
In list-type ALV outputs, you are able to
color in rows or cells using the Color Column. You
color in whole columns by changing the color property of the column.
In the tree structure, however, you can color in nodes and items directly
using the associated methods. You are not able to color in columns
here.
● You can present the entire ALV output with stripes, that is automatically color in the rows of the ALV output alternating light and dark.
The color is a property of the column. You can change them directly this way.

You are only able to change the color of a column if it is not a lead column.
Display Type ALV Tool |
Classic ABAP List |
Full Screen |
In the Container |
Simple, two-dimensional table |
Yes |
Yes |
Yes |
Hierarchical-sequential list |
Yes |
|
|
Tree structure |
|
No |
No |
Methods
Function |
Class |
Method |
Changing the Color of Columns |
CL_SALV_COLUMN_LIST |
SET_COLOR |
Get the color of a column |
GET_COLOR |
In the tree structure, the color is the property of each node or individual item.
Display Type ALV Tool |
Classic ABAP List |
Full Screen |
In the Container |
Simple, two-dimensional table |
No |
No |
No |
Hierarchical-sequential list |
No |
|
|
Tree structure |
|
Yes |
Yes |
Methods
Function |
Class |
Method |
Change color combination for node |
CL_SALV_NODE |
SET_ROW_STYLE |
Get color combination for node |
GET_ROW_STYLE |
|
Change color combination for item |
CL_SALV_ITEM |
SET_STYLE |
Get color combination for item |
GET_STYLE |
You are able to color the rows of the ALV output alternating light and dark.

The colors for both shades are defined by the system and you cannot change them.
Display Type ALV Tool |
Classic ABAP List |
Full Screen |
In the Container |
Simple, two-dimensional table |
Yes |
Yes |
Yes |
Hierarchical-sequential list |
Yes |
|
|
Tree structure |
|
No |
No |
Methods
Function |
Class |
Method |
Set striped pattern |
CL_SALV_DISPLAY_SETTINGS |
SET_STRIPED_PATTERN |
Check whether the striped pattern is set |
IS_STRIPED_PATTERN |
To make colored identifiers of ALV elements accessible to visually-impaired users it is necessary to maintain a tool tip for the color.
This takes place using the method ADD_TOOLTIP of the class CL_SALV_TOOLTIPS. You can find more information in the class documentation in the system.