cancel
Showing results for 
Search instead for 
Did you mean: 

Error business partner update di api

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello ,

Deleting one address from addresses the update had no error.

I cannot understand why this happened.Any idea?

Kind Regards,

Ifigeneia Koumbarda

former_member233854
Active Contributor
0 Kudos

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
Former Member
0 Kudos

Hello Danilo Kasparian,

There is no transaction at bp and the getbykey it is ok.Without using add-on i can update the specific cardcode.

Kind Regards,

Ifigeneia Koumbarda

former_member233854
Active Contributor
0 Kudos

What about the other results?

Former Member
0 Kudos

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