
The column header displays the name of a column for the user. You are able to define three different texts as column header.
You are able to make the following settings for the column header:
Determine the Wording of the Column Header
Display or Hide Column Header
Determine whether the user can sort the table according to this column by clicking on the column header
Determine Tooltip for the Column Header
Display an icon (only tree structure)
Determine the Wording of the Column Header
The column header is a property of the COLUMN object. In this way you are able to specify the column header for every column in the internal data table.
You can specify three different variants of the column header: The long, medium, and short column header. If the user changes the column width, the column header that fits the column best is automtically used.
If the user changes the column width, the column header that fits the column best is automatically used. A special case is the column header of the hierarchy column in the tree structure:
|
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 |
Yes |
|
In the Container |
Yes |
|
Function |
Class |
Method |
|
Determine version of the column header |
CL_SALV_COLUMN |
SET_LONG_TEXT SET_MEDIUM_TEXT SET_SHORT_TEXT |
|
Get current column header |
GET_LONG_TEXT GET_MEDIUM_TEXT GET_SHORT_TEXT |
|
|
Determine column header of the hierarchy column of a tree structure |
CL_SALV_TREE_SETTINGS |
SET_HIERARCHY_HEADER |
|
Get column header of the hierarchy column of a tree structure |
GET_HIERARCHY_HEADER |
Display or Hide Column Header
You are able to determine whether the column header is visible or not in the ALV output. You make this setting for all column headers of the ALV output.
|
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 |
|
Display or hide column header |
CL_SALV_COLUMNS_LIST |
SET_HEADERS_VISIBLE |
|
Check whether column headers are being displayed or hidden |
IS_HEADERS_VISIBLE |
Sort by Clicking on Column Header
You are able to determine that the column header serve as a pushbutton for sorting the table. The sort direction is then indicated as a small arrow pointing up or down.
|
ALV Tool |
Display type |
Function available |
|
Simple, Two-Dimensional Table |
Classic ABAP List |
No |
|
Fullscreen |
No |
|
|
In the Container |
Yes |
|
|
Hierarchical-sequential list |
Classic ABAP List |
No |
|
Tree structure |
Fullscreen |
No |
|
In the Container |
No |
|
Function |
Class |
Method |
|
Set column header as pushbutton for sorting the table |
CL_SALV_ FUNCTIONAL_SETTINGS |
SET_SORT_ON_ HEADER_CLICK |
|
Check whether column header is set as pushbutton for sorting the table |
IS_SORT_ON_ HEADER_CLICK |
Determine Tooltip for the Column Header
You are able to define a text that will be displayed when the user rests the mouse pointer on the column header for a moment.
|
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 |
Yes |
|
In the Container |
Yes |
If the user changes the column width, the tooltip that fits the column best is automatically used. A special case is the tool tip of the hierarchy column in the tree structure:
|
Function |
Class |
Method |
|
Determine tooltip for the column header |
CL_SALV_COLUMN |
SET_TOOLTIP |
|
Get current tooltip for a column header |
GET_TOOLTIP |
|
|
Set tooltip for hierarchy column of a tree structure |
CL_SALV_ TREE_SETTINGS |
SET_HIERARCHY_TOOLTIP |
|
Get tooltip for hierarchy column of a tree structure |
GET_HIERARCHY_TOOLTIP |
Display Icon
In the column header of the hierarchy column for a tree structure, you can display an icon.
|
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 |
|
Display icon in the column header of the hierarchy column |
CL_SALV_ TREE_SETTINGS |
SET_HIERARCHY_ICON |
|
Get icon currently being dispalyed |
GET_HIERARCHY_ICON |