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 Messgage Handling

Former Member
0 Likes
2,687

Hi all,

have a look at this error message

Code : MESSAGE E252(I0) WITH <param_1> <param_2>.

Now I want to Display This Message in Status Bar (Below) and the transaction should not allow to save.

I have used this also :

MESSAGE E252(I0) WITH <param_1> <param_2> display Like 'S'.

In this Case message is coming below but, It allowing the Transaction to SAVE.

Kindly, Help

1 ACCEPTED SOLUTION
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
2,419

Your company, SAP, provides extensive documentation about messages.

https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenabap_messages....

In TA ABAPHELP you can even search for terms with typos as MESSGAGE ...

10 REPLIES 10
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
2,420

Your company, SAP, provides extensive documentation about messages.

https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenabap_messages....

In TA ABAPHELP you can even search for terms with typos as MESSGAGE ...

Read only

Former Member
0 Likes
2,419

Hi ,

could you please also use Exit command in the code and check ?

thanks

prem

Read only

0 Likes
2,419

Hi,

use Leave to transaction after the error message.

Read only

Former Member
0 Likes
2,419

Try this:

MESSAGE S252(I0) WITH <param_1> <param_2> display Like 'E'.

LEAVE LIST-PROCESSING.

Read only

0 Likes
2,419

Hi Elzkie,

I Tried This " Error Message Is Coming in the Status Bar ". But, When I am Clicking "Save" Button Transaction is Getting Saved.

Since, we are Displaying Errror Message It Should Not Allow to Save.

Thanks,

Santosh Kumar

Read only

0 Likes
2,419

Did you read the ABAP documentation (link given by Horst)? You'd understand what's going on and you'd be able to find a workaround! Effect of MESSAGE depends on context. If you don't understand something in the doc, then tell us (and give the context too please).

Read only

retired_member
Product and Topic Expert
Product and Topic Expert
2,419

Again, read the documentation ...

Under Messages in Dialog Processing you find:

"The function adjustment of local layout in the standard toolbar of the GUI status can be used to specify that error, warning, and status messages are displayed in a dialog box instead of in the status bar."

-> The behavior can depend on user settings and you have to code it in a way that it always works.

Read only

0 Likes
2,419

Hi Keller,

In the Local Layout of Standard Toolbar of the GUI it is Uncheck. As you can see in the Screenshot.

Then also, error Message is Getting Displayed as Pop-UP Window.

I want it to Display in the Status Bar and it should not allow to save the Transaction.

Read only

0 Likes
2,419

@Horst, isn't the display option misleading the OP? I think the issue is that he issues an error message outside the dynpro flow logic or in the PBO, so it's "converted" into an A message. The solution is to issue the error message during the PAI.

Read only

2,419

Well, from his description it is not clear in which context he sends the message, that's why I hinted him to the MESSAGE documentation in my first answer. Since this didn't help, I assumed another reason that is not so obvious.