Application Development and Automation 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: 
Read only

Problem with SET CURSOR FIELD

Former Member
0 Likes
849

Hi,

i use this code:


...

SELECTION-SCREEN: SKIP 2.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 01(31) T_AUFNR.
PARAMETERS:       P_AUFNR  LIKE CAUFV-AUFNR
                  MATCHCODE OBJECT ORDEB.
SELECTION-SCREEN: END   OF LINE.
*
SELECTION-SCREEN: SKIP.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 01(31) T_VORNR.
PARAMETERS:       P_VORNR  LIKE RESB-VORNR.
SELECTION-SCREEN: END   OF LINE.
*
...
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VORNR.
*
...
  IF NOT WA_RETURN IS INITIAL.
    MESSAGE I010 WITH WA_RETURN-MESSAGE.
    SET CURSOR FIELD 'P_AUFNR'.
    EXIT.
  ENDIF.
*
...

My problem is, that the command SET CURSOR FIELD 'P_AUFNR' doesn't set the cursor on 'P_AUFNR'.

I searched in this forum, and find that's not possible to set the cursor in this case.

Has anyone another idea?

Regards, Dieter

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
783

Hi Dieter Gröhn,

You may have to use LINE option here...

Also make sure you are passing P_AUFNR in CAPS between quotes...

Refer Syntax as well as ABAP help documentation also...

SET CURSOR { { FIELD field [LINE line] [[DISPLAY] OFFSET off] } 
           | { col lin } }.

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

ilesh Nandaniya

5 REPLIES 5
Read only

Former Member
0 Likes
783

Dear Diaeter,

AT SELECTION OUTPUT.

please try to use the above event that might be works.

Regds,

Parekh Nirav

Read only

Former Member
0 Likes
784

Hi Dieter Gröhn,

You may have to use LINE option here...

Also make sure you are passing P_AUFNR in CAPS between quotes...

Refer Syntax as well as ABAP help documentation also...

SET CURSOR { { FIELD field [LINE line] [[DISPLAY] OFFSET off] } 
           | { col lin } }.

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

ilesh Nandaniya

Read only

0 Likes
783

Hi,

thanks for your answer. I tried as you said, but no effect. The cursor is on P_VORNR

not in P_AUFNR:

Regards, Dieter

Read only

Former Member
0 Likes
783

Hi,

try to set cursor before error message is fired.

regards,

Himanshu

Read only

0 Likes
783

Hi,

i tried it, but no effects.

Regards, Dieter