2022 Jun 17 8:09 AM
Hi,
My requirement is in module pool programming when the wrong input is given it has to display an error message and allow to give the correct input again.
But when I give the wrong input it is not allowing me to give the input . The fields are getting greyed out.
Please provide a solution to resolve this.
Thanks.
2022 Jun 17 8:22 AM
Hi,
To make all the fields ready for Input, even if a single field was entered wrongly.
Write code in PAI.
CHAIN.
fields: f1, f2, f3.
module < mod Name>.
endchain.
Regards,
Anuja Kawadiwale
2022 Jun 17 8:17 AM
Please provide your code The message statement.
However, try this
MESSAGE 'Your Message .!' TYPE 'W' DISPLAY LIKE 'E'.
LEAVE TO SCREEN sy-dynnr.
or
MESSAGE 'Your Message !' TYPE 'S' DISPLAY LIKE 'E'.
2022 Jun 17 8:22 AM
Hi,
To make all the fields ready for Input, even if a single field was entered wrongly.
Write code in PAI.
CHAIN.
fields: f1, f2, f3.
module < mod Name>.
endchain.
Regards,
Anuja Kawadiwale
2022 Jun 17 8:42 AM
Hi,
In PAI the logic is generated by default. So do I need to add this the logic again.
2022 Jun 17 9:35 AM
Hi,
If logic is same and it is already there then no need add it again.
2022 Jun 17 8:25 AM
Hello kunimbedu30
Use CHAIN.....ENDCHAIN
In PAI
CHAIN.
fields : field1, field2 MODULE validate_field.
ENDCHAIN.
and In program
MODULE validate_field.
"write validation in this area and give error message here
ENDMODULE.
Note : for more detail please check F1 help on CHAIN keyword, you will get detail idea.
Thanks
Yogesh
2022 Jun 17 8:43 AM
Hi,
In PAI the logic is generated by default. So do I need to add this the logic again.
2022 Jun 17 8:39 AM
2022 Jun 17 10:25 AM
I don't recommend this trick:
MESSAGE 'Your Message .!' TYPE 'W' DISPLAY LIKE 'E'.
LEAVE TO SCREEN sy-dynnr.
or
MESSAGE 'Your Message !' TYPE 'S' DISPLAY LIKE 'E'.
The right way to do was already answered, is to define a CHAIN FIELDS ... MODULE pai_module... ENDCHAIN in the PAI, with the list of fields that need to be input, and define:
MODULE pai_module INPUT.
IF <some condition>.
MESSAGE 'Your Message' TYPE 'E'.
ENDIF.
ENDMODULE.