Skip to Content

Setting cursor position on error in module pool

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 ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 09 at 12:16 PM

    Hi Jitendra Soni,

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

    Regards

    Rajkumar Narasimman

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 03 at 09:25 AM

    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.
    ...
    
    Add comment
    10|10000 characters needed characters exceeded

  • Jan 09 at 09:15 AM

    Hi

    You can try the sentence

    SET CURSOR FIELD field

    For dont lost the focus field

    Add comment
    10|10000 characters needed characters exceeded