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.
Showing results for 
Search instead for 
Did you mean: 

display error message and stop saving the PO using badi ME_PURCHDOC_POSTED

Former Member

Hello experts,

How can i display an error message and stop saving of PO when creating using ME_PURCHDOC_POSTED badi. Problem i am facing is that though i used message statement to display an Error message , i am getting an information message and PO is get saved.


Active Contributor
0 Kudos


I think, messages of type "E" or "W", in particular, should never be used in other contexts.....

Use method concept ......


Shailaja Ainala.

0 Kudos

Thanks for ur reply,

i have tried using method too , but i am getting the message as information though i have given as Error message and the i get System Error ( Error in method PO_POST) and the PO is being saved. But i need the PO not to be saved. Is tehre any alterantive method to validate the values by fetching the all the condition types of PO and giving an error message.

0 Kudos


Try this MM06E005 -

> EXIT_SAPMM06E_012--->ZXM06U43


Shailaja Ainala.

Former Member
0 Kudos

Thank u experts for ur replies

0 Kudos

Hi I have the same requirement did u get the solution .

kindly suggest.

Best regards,


0 Kudos

We are using error message (of the type) in ME_PURCHDOC_POSTED

message e000(zmm) with 'Budget Deficit'


message 'Budget Deficit' type 'E'.

I am getting this error in pop-up AND soon followed up by

"System error (error in method PO_POST)"

Then, the PO update/release window closes, but PO gets released or PO changes gets saved in EKKO,EKPO etc.

If the termination is happening, why is implicit rollback not happening and why data is getting saved to DB..this is against our business requirements. Pls suggest.