Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Set Cursor on chosen field

colin_cheong
Contributor
0 Kudos

The order of screen input is not correct.

What command should I issue to bring the cursor to the correct field after User hit the enter key.

Now,

order is as follow

field A -- field B -- Field C-- field D-- Field E--

field A -- field B -- Field C-- field D-- Field E--

Intended as follow:-

field A -- field B -- Field C-- field D-- Field E--

field C - Field D - field E

field C - Field D - field E

field C - Field D - field E

field C - Field D - field E

will reward points

Bye

3 REPLIES 3

Former Member
0 Kudos

hiiii

use following syntax of SET CURSOR

SET CURSOR { { FIELD field LINE line } }.

it will set cursor on fields whatever you want.

reward if useful

thx

twinkal

Former Member
0 Kudos

Hi,

use the command

SET CURSOR FIELD f LINE lin [OFFSET off].

ref

[http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba47e35c111d1829f0000e829fbfe/content.htm|http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba47e35c111d1829f0000e829fbfe/content.htm]

example

PARAMETERS: P_FLD1(20) TYPE C, P_FLD2 TYPE I. INITIALIZATION. SET CURSOR FIELD u2019P_FLD2u2019.

Regards,

Boobalan Suburaj

former_member230674
Contributor
0 Kudos

Hai Colin chenog,

Static Cursor Position

To define the cursor position statically, enter the name of the required screen element in the Cursor position screen attribute in the Screen Painter.

Dynamic Cursor Position

we are using set cursor command to set the cursor postion dynamically on the screen in the PBO event.

To set the cursor position dynamically, use the following statement in an ABAP dialog module in the PBO event:

SET CURSOR FIELD f [OFFSET off].

f can be a literal or a variable containing the name of a screen element. You can use the OFFSETaddition to place the cursor at a particular point within an input/output field.

Reward points if useful,

Bye

G.V.K.PRASAD