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

set cursor not working!

Former Member
0 Likes
420

friends,

am trying to set the cursor in a tablecontrol line, where the entry is made wrongly...but it always goes to the first line of the field, which i have set the cursor for...can anyone tell me the exact logic behind this set cursor?

where am i going wrong in my code?

my pbo flow logic:

LOOP AT ITAB_TBL2

WITH CONTROL TBLCTRL2

CURSOR TBLCTRL2-CURRENT_LINE.

MODULE SET_CURSOR_VERID.

ENDLOOP.

MODULE SET_CURSOR_VERID OUTPUT.

IF VER = 'X''.

SET CURSOR FIELD 'VERID' LINE TBLCTRL2-CURRENT_LINE .

ENDIF.

CLEAR: VER.

ENDMODULE.

if the error msg. is triggered, i am setting a flag ver and in the pbo of the tblctrl2, i am trying to set the cursor, but it's by default, going to first line of the tblctrl2...i tried even assigning the current_line to a variable and hardcoded like set cursor field verid line 1...still the same result...moreover, will set cursor work for character fields or is it confined only for num. fields? thanks all

2 REPLIES 2
Read only

Former Member
0 Likes
375

Hi,

Try using set cursor field in loop.

Asvhen

Read only

Former Member
0 Likes
375

Hi,

SET CURSOR FIELD 'VERID' LINE TBLCTRL2-CURRENT_LINE . should be

in the last line of the PBO logic. i.e after this statement there should not be any other statement in PBO.

Regds,

Vinsa.R