ABAP Keyword Documentation → ABAP - Reference → User Dialogs → Classic Lists → Displaying Lists
GET CURSOR - List
Other versions: 7.31 | 7.40 | 7.54
Syntax
GET CURSOR { {FIELD field [field_properties]}
| {LINE line [line_properties]} }.
Effect
If this statement is specified in list processing, it passes the name of the output field or the number
of the list line on which the screen cursor in the displayed list is positioned (after the user action)
to the variables field
or line
, depending on how
FIELD
or LINE
is specified. field
expects a character-like variable; line
expects a variable of the type
i. The additions field_properties
and line_properties
can be used to read further information about the cursor position.
The addition FIELD
can only be used to determine the names of global data
objects of the ABAP program. If the cursor is positioned on the output of a data object that is not
visible in the current context or a literal, field
is initialized. This has no influence on the other additions or on sy-subrc
.
System Fields
sy-subrc | Meaning |
---|---|
0 | The cursor is on a field or a list line and the statement was executed successfully. |
4 | The cursor is not on any field or any list line. |
Note
If the cursor is on the output area of a data object that was accessed in the WRITE
statement using a field symbol, the name of the data object is assigned and not the name of the field symbol.