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

Urgent

Former Member
0 Likes
990

Hi Experts,

How to display error messages when user enter incorrect data in a particular field?

Thanks & Regards,

Venkatarathnam.

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
973

you can use the even at selection-screen

and raise a message as you prefer.

at selection screen

select single werks from T001w

where werks = pa_werks.

if sy-subrc ne 0.

message ....

endif.

>after your urgency is over, award points for helpful answers

Hi Experts,

How to display error messages when user enter incorrect data in a particular field?

Thanks & Regards,

Venkatarathnam.

5 REPLIES 5
Read only

Former Member
0 Likes
973

Please put a more informative title on your questions.

Rob

Read only

Former Member
0 Likes
973

Hello,

DO like this.

If user enters the value in selection screen.

Then write ur code in at selection scren.

for example

parameters: matnr like mara-matnr.

at selection-screen on matnr.

select single * from mara where matnr eq matnr.

if sy-subrc ne 0.

error message.

endif.

Cheers,

Vasanth

Read only

Former Member
0 Likes
973

Hi,

If you are talking in context of a report, use at selection screen event and use message syntax to raise an error message.

eg:

at selection-screen.

if table-field = 'xyz'.

message e001(v1).

endif.

hope it helps.

Regards,

Siddhesh.

Read only

0 Likes
973

*correction: if screenfieldname = 'xyz'.

Read only

former_member156446
Active Contributor
0 Likes
974

you can use the even at selection-screen

and raise a message as you prefer.

at selection screen

select single werks from T001w

where werks = pa_werks.

if sy-subrc ne 0.

message ....

endif.

>after your urgency is over, award points for helpful answers