cancel
Showing results for 
Search instead for 
Did you mean: 

Messagebox FORM_LOAD in 2004

Former Member
0 Kudos
54

Hi,

I know SBO 2004 is no longer supported, but one customer is still running 2004. Before upgrading to the next version its required to cancel some (10.000+) journal entries. For this reason I developed a little tool which does the required mouseclicks via UI-API.

My problem is to catch the messagebox form load event from the "Create Reversal from transaction" popup. In 2005 everything works... but in 2004 I am not able to handle the event.

I am using following code:

The m_MsgBoxEvent is true if the event should be triggered. In my case the bool is set to true.

 private void UI_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
        {
           

            
            if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD &&
                pVal.FormType == 0 &&
                pVal.BeforeAction)
            {
                if (m_MsgBoxEvent)
                {

                    this.OnMessageBoxShow(FormUID, ref pVal, out BubbleEvent);
                }
            }
            else
            {
                                this.OnAnyItem(FormUID, ref pVal, out BubbleEvent);
            }
            BubbleEvent = true;
        }

Accepted Solutions (1)

Accepted Solutions (1)

AdKerremans
Active Contributor
0 Kudos

Hi Sebastion,

In 2004 the before formLoad event is not sent to the addon. That's why your code is never executed.

Regards

Ad

Former Member
0 Kudos

And whats about the after formload event?!

Answers (0)