Setting Text Properties
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.

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.
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
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.
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 is how you set the font in the design object using a choice of element type.
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 |
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.
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 |
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 |
SET_HORIZONTAL_ALIGNMENT |
Get alignment in the design object |
GET_HORIZONTAL_ALIGNMENT |
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 |
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 |