Skip to Content
Former Member
Oct 29, 2004 at 12:49 AM

Create a UDT via DI API



I just finished a small add on for a client and I need to create an installation program rto create the required UDF and UDT.

When, I use that code to create a UDT, it does not work. BTW, I'm using VB6

' Declaration of the variable

Dim oTable As SAPbobsCOM.UserTables

'Initialisation of the Meta object

oTable = oCompany.GetBusinessObject(oUserTables)

' Settings for the table 333

oTable.TableName = "TEST"

oTable.TableDescription = "Unit of Measure"

' Creation of the table

lRetCode = oTable.Add

If lRetCode <> 0 Then


MsgBox ("Table TEST was added correctly")

End If

I don't understand why it does not work. I also tried to replace the second line by

oTable = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables) but without success.

Any idea?