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

ModulePool cursor position after Error message inside chain endchain

Former Member
0 Likes
2,548

Hi

Chain .

FIELD gs_lfa1-zPROTYPE MODULE check_proto ON REQUEST.

FIELD gs_lfa1-zycode MODULE check_code ON REQUEST.

...

...

...

Endchain.

Inside Modules I have few validations. So if it fails Error message will come up.

Here problem is, suppose I got the error message for field gs_lfa1-zycode then the cursor is not highlighting the error field instead it's always highlighting one field(first field) for all errors.

So how can I highlight the perticular error field incase if error message .

I have checked all the threads for the same issue but didn't get the solution.

Please any solution and let me know for further details.

Thanks,

Prabin

7 REPLIES 7
Read only

Former Member
0 Likes
1,765

Any one please.

Read only

rajkumarnarasimman
Active Contributor
1,765

Hi Prabin Kumar,

Have you tried the SET CURSOR statement before throwing the error message like below?

if <condition>.
 set cursor field '<FIELD_NAME>'.
 message e003(zfi01) with 'Error Message.
endif.

Regards

Rajkumar Narasimman

Read only

0 Likes
1,765

Hi Rajkumar,

As I know set cursor is intended to use in PBO .

And my logic is insde PAI.

Thanks,

Prabin

Read only

0 Likes
1,765

Hi Prabin.

And my logic is insde PAI.

Yes, you are right, by default, we will write the validation logic inside PAI only. But at the same time, if the error message is raised in PAI, the screen will be displayed to the user without raising PBO event. So even if we write the SET CURSOR logic inside PBO, it won't trigger.

Kindly refer the link Handling of Messages from the PAI Event shared by Raymond Giuseppi

Read only

0 Likes
1,765

Hi Rajkumar,

It seems cursor behavior is standard inside PAI with error message and chain Endchain.

So there is no work arround in my case.

Thanks .

Regards,

Prabin

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,765

In this case don't use CHAIN/ENDCHAIN, does one of your modules actually require value(s) of some other field(s) Also read first some documentation like Handling of Messages from the PAI Event

  FIELD f1 MODULE check_f1 ON REQUEST. " cursor -> f1
  FIELD f2 MODULE check_f2 ON REQUEST. " cursor -> f2
  CHAIN.
    FIELD f2.
    FIELD f3 MODULE check_f3 ON REQUEST. " cursor -> f2
    MODULE check_f2_f3 ON CHAIN-REQUEST. " cursor -> f2
  ENDCHAIN.
Read only

0 Likes
1,765

If I will not use CHAIN/ENCHAIN then error message will gray out all the fields except the error field.

Specific field has different validation so there are modules for specific fields.

So i can say in this case cursor behavior is standard No chnage required.