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

Former Member
0 Kudos

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

horst_keller
Product and Topic Expert
Product and Topic Expert

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

horst_keller
Product and Topic Expert
Product and Topic Expert

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

Former Member
0 Kudos

Hi ,

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

thanks

prem

0 Kudos

Hi,

use Leave to transaction after the error message.

Former Member
0 Kudos

Try this:

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

LEAVE LIST-PROCESSING.

0 Kudos

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

0 Kudos

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

horst_keller
Product and Topic Expert
Product and Topic Expert

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.

0 Kudos

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.

0 Kudos

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

horst_keller
Product and Topic Expert
Product and Topic Expert

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.