Skip to Content
avatar image
Former Member

Error business partner update di api

Hello ,

I would like to update a business partner but i received the error "This entry already exists in the following table ODBC-2035".SAP : 9.2 PL04.The code is the following :

Try

Dim oBusPartner As SAPbobsCOM.BusinessPartners
                    oBusPartner = oCompany.GetBusinessObject(BoObjectTypes.oBusinessPartners)
                    oBusPartner.GetByKey("1256935")

                    oBusPartner.CardName="Test"

                    lRetCode = oBusPartner.Update()

Catch ex As Exception
End Try

Kind Regards ,

Ifigeneia Koumbarda

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 13, 2017 at 01:04 PM

    Hi,

    To troubleshoot this error I would first check if I am doing sth wrong removing the empty try catch, checking the GetByKey and checking the LastErrorDescription, try to change your code and post your GetByKey result, LastErrorDescription and lRetCode.

    Also double check if there is something in the Transaction procedure

    Dim lastError As String
    Dim oBusPartner As SAPbobsCOM.BusinessPartners
                        oBusPartner = oCompany.GetBusinessObject(BoObjectTypes.oBusinessPartners)
                        if (oBusPartner.GetByKey("1256935")) then
    
                        oBusPartner.CardName="Test"
    
                        lRetCode = oBusPartner.Update()
    lastError = oCompany.GetLastErrorDescription()
    
    End If
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello ,

      For other results if you mean other cardcodes, i have successfully update others .I am wondering if something in this specific cardcode doesn' t let to be updated.

      Kind Regards ,

      Ifigeneia Koumbarda

  • avatar image
    Former Member
    Jul 14, 2017 at 07:02 AM

    Hello ,

    Deleting one address from addresses the update had no error.

    I cannot understand why this happened.Any idea?

    Kind Regards,

    Ifigeneia Koumbarda

    Add comment
    10|10000 characters needed characters exceeded