What Does Set Cursor Mean?
A set cursor is a keyword used in ABAP programming for dynamically placing a cursor in the current screen’s layout. This is useful for directing users when executing an SAP screen program or checking the list output. It is mostly used in SAP module pool programming.
There are two ways to provide the exact location of the cursor for the set cursor to work. One is to provide the required screen element after the keyword FIELD; the alternative involves specifying the position by making use of column and line numbers. With the help of the SET CURSOR statement, a cursor can be placed in any position, field or even on a line on the screen.
Techopedia Explains Set Cursor
The Syntax for SET CURSOR is as follows:
SET CURSOR { { FIELD field [LINE line] [[DISPLAY] OFFSET off] }
| { col lin } }.
In case the keyword SET CURSOR is not mentioned, the rules below are used to position the cursor.
Based on the screen properties, the statically determined position of the cursor
The first input field on the current screen
On the screen, the first screen element
In the system toolbar, on the command field