ABAP SyntaxSET CURSOR { { FIELD field LINE line
[[DISPLAY|MEMORY] OFFSET off] }
| { LINE line [[DISPLAY|MEMORY] OFFSET off] }
| { col lin } }.
ABAP_ALTERNATIVES:
1 ... FIELD field LINE line [[DISPLAY|MEMORY] OFFSET off]
2 ... LINE line [[DISPLAY|MEMORY] OFFSET off]
3 ... col lin
What does it do? :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 command 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 .
Latest notes: : 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.
ABAP_ALTERNATIVE_1 ... FIELD field LINE line [[DISPLAY|MEMORY]
OFFSET off]
What does it do? :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.
If OFFSET is not specified, the cursor is positioned in the
first column of the output area.
If OFFSET is specified without an addition, or with the
addition DISPLAY , the cursor is positioned in the column of the
output area entered in off .
If OFFSET is specified with the addition MEMORY , the
cursor is positioned on the character in the output area that is
specified in AB>off in the list buffer in the output of the data object
in field . If this character is cut off in the list display in a
Unicode system , the cursor is
positioned on the corresponding indicator (<(><<)> or >).
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.
Example ABAP Coding :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.
ABAP_ALTERNATIVE_2 ... LINE line [[DISPLAY|MEMORY] OFFSET off]
What does it do? :The cursor is positioned in the list line specified in
line .
If OFFSET is not specified, the cursor is positioned in the
first column of the line.
If OFFSET is specified without an addition or with the
DISPLAY addition, the cursor is positioned in the column specified in
off .
If OFFSET is specified with the addition MEMORY , the
cursor is positioned on the character in the position specified in off in the list buffer. If this character is cut off in the list
display in a Unicode system , the
cursor is positioned on the corresponding indicator (<(><<)> or >).
For line and off , data objects of type i are
expected.
Latest notes: :This variant of the SET CURSOR statement does not
work screen layouts .
ABAP_ALTERNATIVE_3 ... col lin
What does it do? :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.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved