Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Error While Updating User object / User Table Using DIAPI


I am using following code for Enter Entries in User Define Object / User Define Table .

Dim ret As Long

Dim Str As String

Dim oUserTable As SAPbobsCOM.UserTable

oUserTable = oCompany.UserTables.Item("MCHAR")

oUserTable.Code = "A"

oUserTable.Name = "Albert"


If ret <> 0 Then

oCompany.GetLastError(ret, Str)



MsgBox("Value to field: '" & oUserTable.UserFields.Fields.Item("U_AlbUDF").Name & "' was updated successfuly to " & oUserTable.TableName & " Table")

End If

But I am Facing following Error :

oUserTable = oCompany.UserTables.Item("MCHAR")

Invalid field name

Please guide me on this

Thanks & Regards:

Pravin Baji

Not what you were looking for? View more on this topic or Ask a question