‎2007 Mar 20 7:31 PM
The set cursor statement in the code below has no effect. Whatever field is in the first 'get cursor' statement is exactly the same in the last 'get cursor' statement.
Any idea why the set cursor statement is ignored?
get cursor field cursorfield.
cursorfield = 'ACCNT'.
set cursor field cursorfield.
get cursor field cursorfield.
Thanks.
‎2007 Mar 20 7:36 PM
Hi,
Please try this instead.
...
set cursor field 'ACCNT'. <--- in capital letter and quotes
...
Regards,
Ferry Lianto
‎2007 Mar 20 7:36 PM
‎2007 Mar 20 7:36 PM
Hi,
Please try this instead.
...
set cursor field 'ACCNT'. <--- in capital letter and quotes
...
Regards,
Ferry Lianto
‎2007 Mar 20 7:41 PM
Same result if using
set cursor field 'ACCNT'.
It is in the AT Selection-screen part of the program. I am trying to set the cursor at the first field on the variant screen when the screen comes back if the user wants to enter another record. The cursor defaults to whichever was the the last field the user had their cursor in.
‎2007 Mar 20 7:52 PM
Hi
AT SELECTION-SCREEN is triggered after doing something, so here you can't <u>SET</u> the cursor, here you can only <u>GET</u> it.
U should use the event AT SELECTION-SCREEN OUTPUT to set the cursor:
PARAMETERS: P1(2), P2(2).
DATA FIELD(30).
AT SELECTION-SCREEN OUTPUT.
SET CURSOR FIELD 'P2'.
AT SELECTION-SCREEN.
GET CURSOR FIELD FIELD.
START-OF-SELECTION.
WRITE FIELD.Max
‎2007 Mar 20 7:49 PM
Hi,
Please try this.
SET CURSOR FIELD 'ACCNT' LINE SY-LILLI.
Also check this link on SET CURSOR FIELD f.
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/set_curs.htm
Regards,
Ferry Lianto
‎2007 Mar 20 7:57 PM
Still the same. I had looked at that documentation and can not see the problem.
My guess is that it isn't finding the field that is on the selection screen so it is ignoring the statement.
‎2007 Mar 20 7:58 PM