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

Error message in user exit

Former Member
0 Likes
2,431

Hi friends,

I want to show an error message in ZXCOFU05 user exit.

When I write :

message 'Fill value' type 'W'.

leave message.

It is ok for first time. When my clause executed. It is display Fill value message and after that return prev. screen.

But when I press again save button it couldn't handle message.

Shortly : How can I display an error message in user exit and after message return prev.screen?

Thanks

8 REPLIES 8
Read only

Former Member
0 Likes
1,484

What is best way for displaying error messages after that turn previous screen?

Read only

0 Likes
1,484

Hi,

You want to show an error message or a warning ?

regards,

Advait

Read only

0 Likes
1,484

Try with Error message and see..Ideally it should stop in the screen from where the error triggered.

Read only

0 Likes
1,484

Doesn't matter. Error will be good.

Read only

0 Likes
1,484

Hi,

Then simply change the Type of the Message to 'E' instead of 'W', this will solve your problem.

regards,

Advait

Read only

Former Member
0 Likes
1,484

>

> But when I press again save button it couldn't handle message.

>

> Shortly : How can I display an error message in user exit and after message return prev.screen?

This means that the second time you press save your userexit code is not executed, so try coding a breakpoint before the message statement and check whether the program control stops in that.

Regards

Karthik D

Read only

0 Likes
1,484

Dear Karthik,

You are right. First time my user exit execute, after that report automatically call message located Function Module LCOPDU13 504th row

IF NOT SY-MSGID IS INITIAL.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

Message number is 806 message id is RU.

Can you help me for fix this situation? I just want to add a data control in ZXCOFU05 user exit. For user fill data (werks based)

Thanks your helpful answer

Read only

rahul2000
Contributor
0 Likes
1,484

Hi Mehmet

Remove leave message. and try

Rahul