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: 

Setting cursor position on error in module pool

jitendra_it
Active Contributor
0 Kudos

Hello,

I have three fields(F1, F2 and F3) on module pool screen and processing them in CHAIN..ENDCHAIN in PAI as below

PBO

module set_cursor. - Here logic sets the cursor if field is blank

PAI

Chain

field f1 module check_f1 on request.

field f2 module check_f2 on request.

field f3 module check_f3 on request.

Endchain.

When error occures in F1, cursor automatically sets on F1 after error. But when error occures in F2 then cursor moves to F1 fields.

Since all these is being processed in Chain.. End chain so PBO will not be called until

valid input is entered.

Could you please let me know how to control cursor position in this scenario ?

1 ACCEPTED SOLUTION

rajkumarnarasimman
Active Contributor
0 Kudos

Hi Jitendra Soni,

Before calling the ERROR message, call the SET CURSOR statement as shown below.

Regards

Rajkumar Narasimman

3 REPLIES 3

Former Member
0 Kudos

Should be enough to remove CHAIN. ENDCHAIN. , because you want to process each field as a single action.

Or create three different chains like

CHAIN.
  FIELD f1.
  MODULE check_f1 ON CHEIN-REQUEST.
ENDCHAIN.
...

JRDEVELOPEE
Explorer
0 Kudos

Hi

You can try the sentence

SET CURSOR FIELD field

For dont lost the focus field

rajkumarnarasimman
Active Contributor
0 Kudos

Hi Jitendra Soni,

Before calling the ERROR message, call the SET CURSOR statement as shown below.

Regards

Rajkumar Narasimman