Skip to Content

How to add data in UDT of SAP B1 in SDK?

Hi all,

I have a problem of adding record in UDT of SAP B1 in SDK.

    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
        If pVal.FormTypeEx = "UDO_FT_RPRL" AndAlso pVal.ActionSuccess = False AndAlso pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED AndAlso pVal.ItemUID = "1" AndAlso pVal.FormMode = 3 Then

            Dim oUsrTbl As SAPbobsCOM.UserTable
            Dim Res As Integer
            oCompany = New SAPbobsCOM.Company
            oUsrTbl = oCompany.UserTables.Item("@TODD")
            oUsrTbl.Code = "1"
            oUsrTbl.Name = "189"
            oUsrTbl.UserFields.Fields.Item("U_Amount").Value = 4000
            Res = oUsrTbl.Add()
            If Res = 0 Then
                SBO_Application.MessageBox("Error, failed to add Record")
            End If
        End If

    End Sub

I tried to do research but not help

Actually what I want to do is if I click on Add button of UDO then it updates my UDT called @TODD, but if I click Add button above codes bring the following error message " Addon 9000058 failed with exception; Event Type: 1"

Please anyone can help me

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Feb 19, 2018 at 01:36 PM

    Hi all,

    I did it by connecting to DIAPI

    Thank you all

    Add comment
    10|10000 characters needed characters exceeded