11-02-2007 8:49 AM
Hello, I do something like that:
1. enter some data on screen
2. call another screen
3. back to first screen
the problem is.. after the 3. step SAP set default focus (cursor) on first field on screen. I need to set cursor (by calling some code) on field that I choose. How to do it? Please help.
11-02-2007 8:58 AM
Hi
SET CURSOR { { FIELD field [LINE line] [[DISPLAY] OFFSET off] }
| { col lin } }.
is the code to set focus on a field in the screen
Message was edited by:
Vasudha L
11-02-2007 9:00 AM
Hi,
We SET CURSOR or GET CURSOR to place the cursor on the desire field.Is this wat you were looking out for?
Thanks,
pavithra
11-02-2007 9:12 AM
Before I post this problem to this forum I've checked SET CURSOR command... It doesn't work. SAP still place CURSOR on first field on screen. Any other ideas?
03-12-2013 8:12 AM
The command SET CURSOR should work.
But please be noted that when you use it, you should mark the field name with ''.
for example:
you have a field named MARA-ZZPROCESS on the screen, you should use as below to place the focus on it in the PBO module of the main screen.
SET CURSOR FIELD 'MARA-ZZPROCESS'
03-12-2013 9:50 AM
Hi Marcin,
There are different ways to do this:
1.If this field on the selection screen is a standard field, it may have a parameter id. You can use SET PARAMETER/GET PARAMETER and get the field.
2. Else, you can use IMPORT/EXPORT statements.
IMPORT <selection field value> from <selection field value> to MEMORY ID 'MEM'.
EXPORT <selection field value> to <selection field value> from MEMORY ID 'MEM'
Let me know if you need any more information. Hope this helps!
03-12-2013 10:21 AM
As already written, use SET CURSOR, but code this IN PBO and with actual field name (uppercase) as it appears in LOOP AT SCREEN.
Regards,
Raymond