cancel
Showing results for 
Search instead for 
Did you mean: 

how can assign values to no object table

Former Member
0 Kudos

how can assign values to no object table

Accepted Solutions (1)

Accepted Solutions (1)

pedro_magueija
Active Contributor
0 Kudos

Hi Hima,

There is an example in the SDK Help Center:

Private Sub Add_Data_Click()

    Dim oUserTable As SAPbobsCOM.UserTable

    Set oUserTable = oCompany.UserTables.Item("myTable")

    'Set default, mandatory fields

    oUserTable.Code = "A"

    oUserTable.Name = "Albert"

    'Set user field

    oUserTable.UserFields.Fields.Item("U_AlbUDF").Value = "1"

    oUserTable.Add

    If ret <> 0 Then

        oCompany.GetLastError ret, Str

        MsgBox Str

    Else

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

    End If

End Sub


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Answers (0)