Show TOC

Headers and FootersLocate this document in the navigation structure

Use

On the Basic List Header screen, you define the page header and the page footer for the pages in the basic list.

This screen shows the general structure of the basic list.

  • Header lines (page header)

  • Line structure

  • Footer lines (page footer)

The header lines are divided into fixed headers and column headers. Column headers are generated for those lines, for which you selected the Header column on the List Line Output Options screen.

Prerequisites

You are in the Basic List series of screens and have created a new query or want to change an existing query.

Fixed headers (only for ABAP lists)

Fixed header lines are not dependent on the structure of the query. You can define any number of header lines.

On the maintenance screen, the header lines are ready for input and can accept any entries you make. The Edit menu contains functions that you use to insert or delete lines. Blank header lines are not output in the list.

You can define fixed header lines and footer lines so that when you generate the query list, they can receive current values of certain fields. When you define a header line or a footer line, you must specify a character string of the type & field, where field is the short name of a field.

This function allows you (for example) to place a sort criterion in the header line.

You can include the following fields as variables in the headers directly:

%NAME

Name of the user processing the query

%DATE

Current date

%TIME

Current time

%PAGE

Current page number (6 characters)

%P

Current page number (3 characters)

These fields can be used in the short forms N,D,T, and P. If you want to use these letters as short names for query fields, the field values from the query are used.

Column Headers

Note

Changes you make to the headers are also applied to the display in the SAP List Viewer.

SAP Query proposes standard column headers for all lines. Here, the column header for one line of the basic list can consist of one or two lines, since the column header for a field can cover one or two lines.

Creating/deleting column headers

Proceed as follows to create or delete a column header:

  1. Position the cursor over the corresponding line in the Column Header area or the Line Structure area of the list.

  2. If you want to add headers to a line in your query, choose the Start of the navigation path Edit Next navigation step Column Header Next navigation step Insert Line End of the navigation path function. If you do not want any column headers to be displayed, choose the Start of the navigation path Edit Next navigation step Column Header Next navigation step Delete Line End of the navigation path function.

    Note

    Alternatively, you can specify column headers directly on the screen.

You maintain column headers field by field. If you do not want to use the header proposed by the InfoSet, you can define a query-specific header for each field.

The advantage of field by field maintenance is that column headers can always be updated automatically whenever the line structure changes.

The column header for one field can cover one or two lines.

Since the column headers are changed separately for each field, the area for the column headers is not ready for input on the maintenance screens.

Changing column headers

Proceed as follows to change a column header:

  1. Position the cursor over the relevant field in the Column Header area.

  2. Choose the Start of the navigation path Edit Next navigation step Column header Next navigation step Maintain End of the navigation path function. The screen appears, in which you maintain the column header for the selected field.

    Note

    Even with the column header for a field, you can substitute the value of another field by using & field in the header. Note however that the column header must be no wider than the output length of the field. If substitution of the field value results in this length being exceeded, the end of the value will be truncated.

In queries, fields can have only one header. This header is always used if a column header is to be provided in the query for this field.

Footer lines (only for ABAP lists)

The same rules apply for footer lines as for fixed header lines. These lines are ready for input and can be changed by making entries. You can insert and delete lines using the functions in the Edit menu. Blank lines are not output in the list.

Caution

For technical reasons, it is not possible to define a different number of footer lines in the different sublists. If you have defined four footer lines for a basic list and one footer line for a statistic, the statistic is output with five footer lines. The first line of the page footer is always an underscore.

Even within a footer line, you can access the values of fields from the query.

Note

Note that, although there is no limit to the number of header lines in the page header and in the page footer, the total number of these lines must be less than the number of lines per page. You can only check this partially in the query definition, since the number of lines per page may change during processing (for example, during printing or processing in the background). If this condition is violated during processing, the program is terminated.

Activities

Continuing with the Flight Connections example, create the headers and footers as described above.

Use the function to navigate to the Graphic Parameters screen. See Graphical Display.