Show TOC Start of Content Area

Function documentation Setting Text Properties  Locate the document in its SAP Library structure

Use

You are able to change the display of text in the ALV output. Depending on whether the text is located in the ALV output itself or in the header of the list, for example, you have different options.

 

Note

The following sections mainly deal with how you change the display of alphanumeric columns. With numeric columns there are additional options. For more information about this, see changing the display of numeric values.

Features

You are able to make the following settings for text properties:

·        Set font

·        Set alignment of the text in the column

·        Determine lowercase and uppercase

·        Determining display of empty cells

·        Changing text color

Set Font

You are able to change the font of text in the design object (header and footer area of page or list) and in the tree structure.

Font in Design Object

In the classic ABAP list, the various element types that you are able to use in a design object differ in the font. In the other two display types they differ in font, font size and font color. The following graphic provides a comparison of the fonts as they are set in the various display types for the ALV output for the four element types.

This graphic is explained in the accompanying text

This is how you set the font in the design object using a choice of element type.

Font in the Tree Structure

You are able to choose between three fonts in each item:

·        Standard font

·        A non-proportional font (all characters require the same amount of space)

·        A proportional font (characters have different widths)

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

Set font of an item

CL_SALV_ITEM

SET_FONT

Get font of an item

GET_FONT

Set Alignment of the Text in the Column

You are able to set where the content of a column will be put:

·        Left aligned

·        Centered

·        Right-aligned

You are able to change the alignment of text in the design object (header and footer area of page or list) and in the ALV output.

Alignment in the ALV Output

You are able to set the alignment of the text for each column in the ALV output separately.

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

 

Yes

Yes

Methods

Function

Class

Method

Set alignment of the column

CL_SALV_COLUMN

SET_ALIGNMENT

Get alignment of the column

GET_ALIGNMENT

Alignment in the Design Object

For the following elements, you are able to set the alignment in the design object:

·        Header

·        Action information

·        Label

·        Text

The alignment is only applicable when the following applies:

·        The text is in a table-type layout.

·        The column in which the text is located is wide enough.

You set the alignment for each text element individually.

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

 

Yes

Yes

Methods

Function

Class

Method

Set alignment in the design object

CL_SALV_FORM_ACTION_INFO
CL_SALV_FORM_HEADER_INFO
CL_SALV_FORM_LABEL
CL_SALV_FORM_TEXT

SET_HORIZONTAL_ALIGNMENT

Get alignment in the design object

GET_HORIZONTAL_ALIGNMENT

Determine Lowercase and Uppercase

If the texts in the internal data table use both uppercase and lowercase letters, you are able to choose whether they will be maintained in the ALV output or whether the lowercase letters should be converted to uppercase letters.

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

 

Yes

Yes

Methods

Function

Class

Method

Convert lowercase letters to uppercase

CL_SALV_COLUMN

SET_LOWERCASE

Check whether lowercase letters are to be converted to uppercase letters

IS_LOWERCASE

Determine Display of Empty Cells

You are able to determine whether empty cells are to contain a zero or a space.

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

 

Yes

Yes

Methods

Function

Class

Method

Determine display of empty cells

CL_SALV_COLUMN

SET_ZERO

Check how empty cells are to be displayed

IS_ZERO

 

 

End of Content Area