Saturday, October 11, 2008

SAP Netweaver ALV Output Header

By default, the ALV output has no header. You can generate a header and display it above the ALV output. The header can have the following parts:

· Text

· Graphic

· Tooltip

You can make the following settings for the header of the ALV output:

· Generate, get, and delete a header object

· Set wording for header

· Set graphic path for header

· Set position of graphic for header

· Set wording for tooltip

Generating, Getting, and Deleting a Header Object

The header of the ALV output is an instance of the class CL_SALV_WD_HEADER. To generate or delete the object, use the methods of the interface class IF_SALV_WD_TABLE_SETTINGS (implementing class CL_SALV_WD_CONFIG_TABLE).

Methods for Creating, Getting, and Deleting Header Objects

Function

Method

Generate header object

CREATE_HEADER

Get header object

GET_HEADER

Delete header object

DELETE_HEADER

Setting Wording for Headers

The header of the ALV output has the type STRING. To define the header, use methods of the class CL_SALV_WD_HEADER.

Methods for Wording of Headers

Function

Method

Set wording for header

SET_TEXT

Get wording for header

GET_TEXT

Setting Graphic Paths for Headers

You can display any graphic in the header of your ALV output as long as it is suitable for the Web Dynpro environment (see Structure linkHandling Web Icons). To define the path or ID of the graphic file, use the methods of the class CL_SALV_WD_HEADER.

Methods for Graphic File Paths

Function

Method

Set path or ID for graphic

SET_IMAGE_SOURCE

Get path or ID for graphic

GET_IMAGE_SOURCE

Setting Position of Graphics for Headers

You can choose whether the graphic displayed in the header is placed before or after the header text. To do this, use the methods of the class CL_SALV_WD_HEADER.

Methods for Placing Graphics in Headers

Function

Method

Set position within header

SET_IMAGE_FIRST

Get position within header

GET_IMAGE_FIRST

Setting Wording for Tooltip

The tooltip of the header becomes visible when the user places the cursor over the header of an ALV output. To specify the wording of the tooltip, use the methods of the class CL_SALV_WD_HEADER.

Methods for Header Tooltip

Function

Method

Set wording for tooltip

SET_TOOLTIP

Get wording for tooltip

GET_TOOLTIP

No comments:

Archive