Skip to Content

SAPbouiCOM.Framework.Application.SBO_Application.MessageBox cancelling sap event


We are trying to prompt a message box and if user press cancel, we cancel the adding of SAP document. We have added the AddButton_ClickBefore handler. The prompt appears as expected, but setting bubbleevent to true doesnt make the SAP continue processing.

We have noticed that, if the message box is shown then SAP is not continuing its process any more. if no messagebox, it works.

            this.AddButton.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.AddButton_ClickBefore);

 private void AddButton_ClickBefore(object sboObject, SAPbouiCOM.SBOItemEventArg pVal, out bool BubbleEvent)
            BubbleEvent = true;
                if (2 == SAPbouiCOM.Framework.Application.SBO_Application.MessageBox("msg", DefaultBtn: 1, Btn1Caption: "ok", Btn2Caption: "cancel"))
                                BubbleEvent = false;
Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.