By default, lists are screens, which do not contain screen elements in their display area, but text output defined with ABAP statements instead. Lists are displayed as part of a special list screen, which is a component of the list processor system program.
An ABAP program can process several lists, which are stored in one or several list buffers. In every call of a screen sequence, a new list buffer is opened and assigned to this screen sequence. One list buffer can contain up to 21 lists: one basic list and 20 details lists. To each list, a list index is assigned, which organizes the lists in the list buffer in hierarchical list levels. The first list of a list buffer is the basic list with list index 0. All other lists, whose list indexes are increased continuously starting at 1, are details lists.
The output statements of an ABAP program write to the current list, whose list index is determined by the sy-lsind system field. The current list after the call of a screen sequence is the basic list. As long as the basic list is not displayed, no other list levels can be created.
The basic list is displayed either implicitly during processing of an executable program (see SUBMIT) or explicitly using the LEAVE TO LIST-PROCESSING statement. In both cases, the list processor is called, which then sends the list to the list screen. Displaying a list concludes this list in the list buffer. It can no longer be written to, but it can be read or modified.
Every user action on a displayed list, which triggers a list event for which an event block is defined in the ABAP program, creates a new details list. The list index of this details list is always one more than the list index of the list, on which the event was triggered. This index is contained in the sy-listi system field. The output statements of the event block write to the current details list. If the event block is finished normally, the details list is displayed automatically in the list screen.
Due to user actions on displayed lists, in the list buffer a stack of up to 20 details list can be built up. The list with the highest list index (sy-lsind) is always the current list of the ABAP program, while the list with the list index one below the highest (sy-listi) is displayed on the screen. With certain list processing statements, you can use the list index to access all lists within the stack for reading or changing.
The details list stack in a list buffer can be reduced in two ways:
A list is made up of list rows with a fixed width of up to 1023 characters. The row width of the current list is stored in the sy-linsz system field. The number of rows of a list is limited only by the storage capacity of the system.
A list is divided into pages. Every list starts on page 1. The current page of the current list is stored in the sy-pagno system field. The output position on the current page in the list buffer is determined by the list cursor, which is provided in the system fields sy-colno (column) and sy-linno (row). A page can contain up to 60.000 rows. The number of rows per page is stored for the current list in the sy-linct system field. The value 0 represents the maximum number of rows per page.
On every page of a list, you can use rows for a page header and a page footer. The rows of the page header of the basic list are by default filled with a standard page header from the text elements of the ABAP program. The standard page header consists of a standard title and can contain column headings. The standard title is fixed so that it does not dispear when you scroll the page vertically on the screen.
At the list event TO-OF-PAGE, you can fill the page header with additional rows. You can fill the page footer only at the list event END-OF-PAGE. The entire page header of the list displayed on top is fixed so that it does not move when you scroll the page vertically. The column headings of the standard page header and the rows filled at TOP-OF-PAGE are moved when you scroll horizontally.
The lists in the list buffer are screen lists. Their content is displayed in the list screen after an implicit call of the list processor in an executable program or after an explicit call using LEAVE TO LIST-PROCESSING.
When creating lists, you also have the possibility to exclude individual or all pages of one or more lists from the screen display and to send them to the SAP spool system instead. To do this, you use the addition PRINT ON of statement NEW-PAGE. All these pages together then form the print list. See also Printing Lists.
The list processing statements covered in this section are based on global data and events of the runtime environment and are no longer completely supported in ABAP Objects and wehn using ABAP Objects.
When displaying or printing a list, the contents stored in the list buffer are copied onto the list, with the following differences between Non-Unicode and Unicode systems:
For these reasons, the horizontal position of the list cursor is equal to the output column of a displayed or printed list only in Non-Unicode systems. In Unicode systems, this can be guaranteed only for the upper and lower output boundaries of the individual output.