Get Example source ABAP code based on a different SAP table
ID DYNPRO% • SET CURSOR - list ABAP Statement
SET CURSOR>, List Short Reference >
ABAP_SYNTAX SET 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 sets the cursor in the next list displayed on the screen. This is either the current list or, if no details list is created in an event block after an interactive list event, the previous list. The cursor can be positioned by specifying a field after FIELD> or a line after LINE>, or by specifying a specific position using col> and lin>. If the statement SET CURSOR> is not specified, the cursor is set by default on 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 entire area in which the cursor is positioned is selected. ABAP_HINT_END • FIELD SET CURSOR - list • LINE SET CURSOR FIELD- list • DISPLAY OFFSET SET CURSOR FIELD - list • MEMORY OFFSET SET CURSOR FIELD - list • OFFSET SET CURSOR FIELD - list
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 is not 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 off> in the list buffer in the output of the data object in field>. If this character is cut off in the list display, the cursor is set on the corresponding indicator ( < or >). The data object field> must be character-like and flat>. line> and off> expect data objects of type i>. If the data object specified in field> was contained in the 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 the cursor is to be positioned in the output area of a data object 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. ABEXA 00648 ABAP_EXAMPLE_END • LINE SET CURSOR - list • DISPLAY OFFSET SET CURSOR - list • MEMORY OFFSET SET CURSOR - list • OFFSET SET CURSOR - list
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 row.
If OFFSET> is specified without an addition, or with the addition DISPLAY>, the cursor is positioned in the column entered 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, the cursor is set on the corresponding indicator ( < or >). line> and off> expect data objects of type i>.
Latest notes: This variant of the SET CURSOR> statement does not work in screen layouts>. ABAP_HINT_END
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. col> and lin > expect data objects of the type i>. Column counting begins at 2.