DESCRIBE LIST
Short Reference
ABAP Syntax DESCRIBE LIST { {NUMBER OF {LINES|PAGES} n}
| {LINE linno PAGE page}
| {PAGE pagno
page_properties } }
[INDEX idx].
ABAP_ALTERNATIVES:
1 ... NUMBER OF {LINES|PAGES} n
2 ... LINE linno PAGE page
3 ... PAGE pagno page_properties
ABAP_ADDITION:
... INDEX idx
What does it do? This statement assigns the properties of a list stored in
a list buffer to the variables n , page , or the variables
specified in page_properties
.
System Fields
sy-subrc Meaning
0The list property was successfully specified.
4The line specified in linno or page specified in pagno
cannot be found.
8The list level specified in idx cannot be found.
Latest notes: The statement DESCRIBE LIST should only be used for
completed lists, because not all properties can be read in a list during
its creation process.
ABAP_ADDITION ... INDEX idx
What does it do? The list level can be specified with the addition
INDEX , where a data object (which contains the list index) of type
i is expected for idx . The value of idx must be
greater than or equal to 0. If the addition INDEX is not
specified, then the list level 0 (the basic list itself) is selected
during the creation of the basic list, and the list level at which the
event was triggered ( sy-listi ) is selected during the processing
of a list event. If the list level specified in idx does not
exist, the variables are not changed and sy-subrc is set to the
value 8.
ABAP_ALTERNATIVE_1 ... NUMBER OF {LINES|PAGES} n
What does it do? The number of lines is expected when specifying LINES
, the number of list pages is stored in n when specifying
PAGES . A data object of the type i is expected for n .
The number of lines is counted from the first to the last line described
by an output statement and contains the page headers and page footers.
The spaces automatically inserted between the list pages are not
counted.
ABAP_ALTERNATIVE_2 ... LINE linno PAGE page
What does it do? The corresponding page for the line number specified in
linno is determined and stored in page . Data objects of
the type i are expected for linno and page . If the
line specified in linno does not exist, page is not
changed and sy-subrc is set to 4. The page headers and page
footers are included in the line count, but not the spaces automatically
inserted between the list pages.
ABAP_ALTERNATIVE_3 ... PAGE pagno page_properties
What does it do? Various properties
page_properties for the
page number specified in pagno are determined and passed to the
specified variables. At least one addition must be specified after
pagno . The data type i is expected for pagno . If the
page specified in pagno does not exist, the variables are not
changed and sy-subrc is set to the value 4.
Example ABAP Coding Specification of properties of the list's last page that
is currently displayed with two DESCRIBE statements during a list
event.
DATA: last_page TYPE i,
lines TYPE i,
first_line TYPE i,
top_lines TYPE i.
...
AT LINE-SELECTION.
DESCRIBE LIST: NUMBER OF PAGES last_page,
PAGE last_page LINES lines
FIRST-LINE first_line
TOP-LINES top_lines.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved