SET CURSOR { { FIELD field LINE line
[[DISPLAY|MEMORY] OFFSET off] }
| { LINE line [[DISPLAY|MEMORY] OFFSET off] }
| { col lin } }.
1. ... FIELD field LINE line [[DISPLAY|MEMORY] OFFSET off]
2. ... LINE line [[DISPLAY|MEMORY] OFFSET off]
3. ... col lin
In list processing, this statement positions the cursor in the next list displayed on the screen. This is either the current list or, if no detail list is created in an event block after an interactive event, the previous list. The cursor can be positioned by entering a field after FIELD or a line after LINE, or by entering a specific position using col and lin.
If the statement SET CURSOR is not specified, the cursor is positioned by default in the first field in the list that is ready for input or in the input field in the standard toolbar.
The statement is ignored if the specified position is outside the display area of the list, or if it points to line elements.
The exact position of the cursor is only visible in output areas that are ready for input. Otherwise the whole area in which the cursor is positioned is selected.
... FIELD field LINE line [[DISPLAY|MEMORY] OFFSET off]
The cursor is positioned in the list line specified in line in the output area of the data object whose name is contained in field. The entry isn ot case-sensitive.
The data object field must be character-type and flat. For line and off, data objects of type i are expected.
If the data object specified in field has been output more than once in the visible area of the line, the cursor is positioned in the first output area. If the data object specified in field does not occur in the visible area of the line, the specification is ignored.
If you want the cursor to be positioned in the output area of a data object that is addressed in the
WRITE statement using a field symbol, and the same data
object is no longer assigned to the field symbol, the name of the data object must be contained in field, and not the name of the field symbol.
In the following output, the cursor is positioned in the output area ready for input of the field input. Without the SET CURSOR statement, the cursor would be positioned on the previous checkbox.
DATA: flag TYPE c LENGTH 1,
inp TYPE c LENGTH 10.
SET BLANK LINES ON.
WRITE: / flag AS CHECKBOX, inp INPUT.
SET CURSOR FIELD 'inp' LINE sy-linno.
... LINE line [[DISPLAY|MEMORY] OFFSET off]
The cursor is positioned in the list line specified in line.
For line and off, data objects of type i are expected.
This variant of the SET CURSOR statement does not work screen layouts.
... col lin
The cursor is positioned in the column specified in col
and the line specified in lin in the list window. For
col and lin,
data objects of typem Typ i are expected. Column numbering begins at 2.