cancel
Showing results for 
Search instead for 
Did you mean: 

How to Bubble Event use in SAP??

former_member209771
Active Participant
0 Kudos

Hi all ,

I have a UDO Addon .I used one more validation for user fields value in Add /Update as i return False for validation .B1 bubble Checker show error for return false.B1 bubble checker not show error with bubble value false for Item add validation .Any one help how to SAP maintain Bubble event for validation but B1 bubble Checker not showing bubble event false .

thanks

surajit

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member209771
Active Participant
0 Kudos

Hi arun ,

Thanks for the reply. our addon is running successfully.But question is that when our code stop add/update data then 'B1 bubble checker' testing tool show error with bubble value fasle.for that our addon not pass from Queue Team to certify the addon.But SAP how it handle because when SAP stop any data add/update then 'B1 bubble Checker' testing tool not showing any error bubble value is true. please help this is big issue for me and addon certification stop from Queue.

thanks

surajit

former_member689126
Active Contributor
0 Kudos

Hi

You can bypass that message using the following code , also use message box instead of status bar in form data event ...

Public Overrides Sub OnStatusBarErrorMessage(ByVal txt As String)
            'ADD YOUR CODE HERE	...
            Try
                If txt.Contains("UI_API -7780") Then B1Connections.theAppl.StatusBar.SetText("", 0, BoStatusBarMessageType.smt_None)
            Catch ex As Exception
            End Try

        End Sub

Refer these threads for more information

Hope this helps

Arun

former_member209771
Active Participant
0 Kudos

Hi Shafi ,

our code is like below :

[B1Listener(BoEventTypes.et_FORM_DATA_ADD, true)]

public virtual bool OnBeforeFormDataAdd(BusinessObjectInfo pVal)

{

Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);

// ADD YOUR ACTION CODE HERE ...

if (pVal.FormTypeEx == "4")

{

ComboBox oCombo_type = (ComboBox)form.Items.Item("CO_Type").Specific;

if (string.IsNullOrEmpty(oCombo_type .Value.ToString().Trim()))

{

B1Connections.theAppl.MessageBox("Please select Type ! ", 1, "OK", "", "");

return false;

}

}

here we can't use Bubbleevent .This method is boolean return type as i return false at the time of validation.that's error show in b1 bubble checker . how to use this addon listener without error.

thanks

surajit

}

former_member689126
Active Contributor
0 Kudos

Hi surajit

In B1DE events return false is equivalent to setting BubbleEvent = False, if you return a false in before form data add/update/delete event B1 will automatically generate a statusbar error message (" Action stopped by addon..........") that is known behavior .

Hope this helps you

Regards

Arun

Former Member
0 Kudos

Hi Surajit,

BubbleEvent:

A boolean value specifying whether or not the application will continue processing this event. The parameter is available only when BeforeAction=True.

True - Default. The application continues processing this event regularly.

False - The application stops handling this event.

Try This......


'For Validation before (user defined form)form data is added in sap b1
 If pVal.ItemUID = "1" And pVal.FormUID = "Frm_Emp" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.BeforeAction = True Then
            Try
                oform = sbo_application.Forms.Item(FormUID)
                If oform.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE Then
                    Dim oedit As SAPbouiCOM.EditText
                    oedit = oform.Items.Item("edit_empid").Specific
                    If oedit.Value = "" Then
                    sbo_application.MessageBox("Emp Id Should not be Empty")
                    BubbleEvent = False
                 End If
end if 
 Catch ex As Exception
                sbo_application.MessageBox(ex.Message)
            End Try
end if

Thanks

Shafi