Show TOC

Color Definition for Columns, Rows, and CellsLocate this document in the navigation structure

Use

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.

Text Color, Background Color, Intensity and Inverse Display

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.

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)

    Color

    Technical Name

    GUI-dependent

    COL_BACKGROUND

    Grey-blue

    COL_HEADING

    Light grey

    COL_NORMAL

    Yellow

    COL_TOTAL

    Blue-green

    COL_KEY

    Green

    COL_POSITIVE

    Red

    COL_NEGATIVE

    Orange

    COL_GROUP

Note

The color COL_KEY is the color that the system uses for Lead Columns.

Features

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 Columns. 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.

Changing the Color of Columns

The color is a property of the column. You can change them directly this way.

Note

You are only able to change the color of a column if it is not a lead column.

ALV Tool

Display type

Function available

Simple, Two-Dimensional Table

Classic ABAP List

Yes

Fullscreen

Yes

In the Container

Yes

Hierarchical-sequential list

Classic ABAP List

Yes

Tree structure

Fullscreen

No

In the Container

No

Function

Class

Method

Changing the Color of Columns

CL_SALV_COLUMN_LIST

SET_COLOR

Get the color of a column

GET_COLOR

Change Color of Nodes and Items

In the tree structure, the color is the property of each node or individual item.

ALV Tool

Display type

Function available

Simple, Two-Dimensional Table

Classic ABAP List

No

Fullscreen

No

In the Container

No

Hierarchical-sequential list

Classic ABAP List

No

Tree structure

Fullscreen

Yes

In the Container

Yes

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

Display Rows with Stripes

You are able to color the rows of the ALV output alternating light and dark.

Note

The colors for both shades are defined by the system and you cannot change them.

ALV Tool

Display type

Function available

Simple, Two-Dimensional Table

Classic ABAP List

Yes

Fullscreen

Yes

In the Container

Yes

Hierarchical-sequential list

Classic ABAP List

Yes

Tree structure

Fullscreen

No

In the Container

No

Function

Class

Method

Set striped pattern

CL_SALV_DISPLAY_SETTINGS

SET_STRIPED_PATTERN

Check whether the striped pattern is set

IS_STRIPED_PATTERN

Accessible Color Display

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.