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: 

Unable to input data after getting an error message in module pool programming.

former_member806437
Participant
0 Kudos
925

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.

1 ACCEPTED SOLUTION

anujawani2426
Active Participant
843

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

8 REPLIES 8

venkateswaran_k
Active Contributor
843

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'.

anujawani2426
Active Participant
844

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

0 Kudos
843

Hi,

In PAI the logic is generated by default. So do I need to add this the logic again.

0 Kudos
843

Hi,

If logic is same and it is already there then no need add it again.

Yogesh_bagul
Explorer
843

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

0 Kudos
843

Hi,

In PAI the logic is generated by default. So do I need to add this the logic again.

former_member806437
Participant
0 Kudos
843

Hi,

thanks. It worked.

Sandra_Rossi
Active Contributor
843

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.