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: 

Error message in user exit

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Hi,

You want to show an error message or a warning ?

regards,

Advait

0 Kudos

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

0 Kudos

Doesn't matter. Error will be good.

0 Kudos

Hi,

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

regards,

Advait

Former Member
0 Kudos

>

> 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

0 Kudos

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

rahul2000
Contributor
0 Kudos

Hi Mehmet

Remove leave message. and try

Rahul