cancel
Showing results for 
Search instead for 
Did you mean: 

Exception adding events

Former Member
0 Kudos

I'm trying to add a filter event to my own form:

Dim oFilters As SAPbouiCOM.EventFilters

Dim oFilter As SAPbouiCOM.EventFilter

oFilters = New EventFilters

oFilter=oFilters.Add(et_ITEM_PRESSED)

oFilter.Addex("MyForm")

SBO_Application.SetFilter(oFilters)

When I do the last instruccion, it gives me an exception "General Failure".

If I use the method oFilter.Add(200000010)(so i change de uid of my form), it doesn't gives me any exception, but i want to refer to my forms with strings, not with numbers.

Can anyone help me? Thanks!

View Entire Topic
Former Member
0 Kudos

Yes, i've done the SBO connection.

If i use oFilter.addex, gives me the exception when i do SBO_Application.SetFilter(oFilters)

If i use oFilter.add, all works ok, but i want to work with addex.

Former Member
0 Kudos

Hi Miguel,

You should not set the form uid, but the form type. Syntax is

Public Function AddEx(ByVal FormType As String) As FormType

<i>Parameters

FormType

A string specifying the form type you want to add.</i>

Hope this solves your problem,

Adele.