‎2018 Mar 21 8:10 AM
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
‎2018 Mar 21 11:33 AM
‎2018 Mar 21 11:39 AM
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
‎2018 Mar 21 4:52 PM
Hi Rajkumar,
As I know set cursor is intended to use in PBO .
And my logic is insde PAI.
Thanks,
Prabin
‎2018 Mar 22 5:54 AM
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
‎2018 Mar 22 6:08 AM
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
‎2018 Mar 21 12:35 PM
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.
‎2018 Mar 21 3:23 PM
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.