
You can use various elements to design the areas above and below the ALV output. To do this, you use design objects.
You can use as many elements of different element types as you want to form a design object. You then display the design object at the required position.
All classes and methods for the design object are found in the system in the package SALV_FORM_ELEM.
Element Types and Layout Forms
You use elements of the following element types for your design object:
Header element (header info)
Text element with or without label (text label)
Action information
The elements only differ in appearance. No functions are linked to the various element types.
These elements can be arranged within your design object. To do this, choose between two forms of layout:
Single element
You generate an element and display it in the required position.
Row-type layout
You arrange as many elements as you want in a row, one after the other.
Table-type layout
You arrange as many elements as you want in rows and columns.
You can combine the layout forms with one another as required. For example, you can insert rows into a table and the other around.
Context Nodes TOP_OF_LIST and END_OF_LIST
The ALV component provides the two context nodes TOP_OF_LIST and END_OF_LIST. Each contains an attribute CONTENT. These context nodes hold the data of your design objects for the header and footer areas of the ALV output.
You define context mapping to a node with the same name in the context of your application and set the attribute CONTEXT of your context node to your design object.
Setting Up a Design Object
Proceed as follows to set up a design object for the header and footer areas:
Map the context nodes TOP_OF_LIST and END_OF_LIST of the ALV component to the context of your application (see Context Mapping ).
Generate a design object. To do this, use either the row-type of the table-type layout. You insert the required elements into this layout (see Creating Design Objects and Elements ).
Where required, you make various settings for the elements (see Design Object Settings ).
Set the design object as a value of the attribute CONTENT in the context node.
Showing and Hiding Design Objects
By default, the design object for the header area and the design object for the footer header are both shown. You can hide and show these two design objects separately. To do this, you use the methods of interface class IF_SALV_WD_TABLE_SETTINGS (implementing class CL_SALV_WD_CONFIG_TABLE).
Methods for showing/hiding design objects
|
Function |
Method |
|
Show or hide the design object for the header area |
SET_TOP_OF_LIST_VISIBLE |
|
Check whether the design object for the header area is shown or hidden |
GET_TOP_OF_LIST_VISIBLE |
|
Show or hide the design object for the footer area |
SET_END_OF_LIST_VISIBLE |
|
Check whether the design object for the footer area is shown or hidden |
GET_END_OF_LIST_VISIBLE |