!--a11y-->
Column Headers 
By default, each column in the ALV output has a column header. You do not have to generate the objects in question first.
You can change a column header. To do this, you can set up the following component parts:
· Text
· Graphic
· Tooltip
You are able to make the following settings for a column header:
· Generate, get, and delete object for column header
· Set wording of column header
· Specify path to graphic in column header
· Set position of graphic in column header
· Set wording for tooltip
Standard column headers only contain text. The wording depends on the context node attribute:
· If the attribute has no DDIC reference:
By default, the system uses the technical name of the attribute for the column header.
· If the attribute has a DDIC reference:
The system assigns column headers as follows:
¡ If field labels have been defined for the DDIC data element, the system uses the short text of the DDIC data element as the column header.
¡ If no field labels have been defined, the system uses the technical name of the DDIC data element.
The column header of a column in your ALV output is an instance of the class CL_SALV_WD_COLUMN_HEADER. A column header object can exist for every column object.
To get, generate, or delete a column header object, use the methods of the class CL_SALV_WD_COLUMN.
Methods for Getting, Generating, and Deleting Column Headers
Function |
Method |
Get column header object |
GET_HEADER |
Generate column header object |
CREATE_HEADER |
Delete column header object |
DELETE_HEADER |
You can define the text to be displayed as a column header. You have the following options:
· You can enter free text.
· You can enter a separate DDIC data element whose short field label is to be used as the column header.
· You can enter a separate DDIC element and define which of the field labels of the DDIC data element is to be used as the column header.
To specify the wording of the column header, use the methods of the class CL_SALV_WD_COLUMN_HEADER.
Methods for the Wording of Column Headers
Function |
Method |
Define free text as column header |
SET_TEXT |
Get wording for column header |
GET_TEXT |
Specify DDIC data element whose field label is to be used as the column header |
SET_BINDING_ELEMENT |
Get name of the DDIC data element |
GET_BINDING_ELEMENT |
Specify type of field label to be used as column header |
SET_BINDING_FIELD |
Get type of field label to be used as column header |
GET_BINDING_FIELD |
You can
display any graphic in a column header as long as it is suitable for the Web
Dynpro environment (see
Handling Web
Icons). To define the path or ID of the graphic file, use the methods of
the class CL_SALV_WD_COLUMN_HEADER.
Methods for Defining Paths of Graphic Files
Function |
Method |
Set path or ID for graphic |
SET_IMAGE_SOURCE |
Get path or ID for graphic |
GET_IMAGE_SOURCE |
You can choose whether graphics displayed in column headers are placed before or after the text. To do this, use the methods of the class CL_SALV_WD_COLUMN_HEADER.
Methods for Placing Graphics in Headers
Function |
Method |
Set position within header |
SET_IMAGE_FIRST |
Get position within header |
GET_IMAGE_FIRST |
The tooltip of a column header becomes visible when the user places the cursor over the header of a column. To specify the wording of tooltips, use the methods of the class CL_SALV_WD_COLUMN_HEADER.
Methods for Column Header Tooltips
Function |
Method |
Set wording for tooltip |
SET_TOOLTIP |
Get wording for tooltip |
GET_TOOLTIP |