Set Cursor

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


Related Terms

Margaret Rouse
Technology Expert

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.