Skip to Content
author's profile photo Former Member
Former Member

Business Partner Update

We are not able to <b>add any new BP</b> in our existing BP Master after transferring data via DTW

It says Entry already exists OCRD ODBC 2035 (131-183)

What could be the problem

Cheers

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Nov 22, 2007 at 10:01 AM

    Hello,

    try to use this work around :

    1. GetByKey

    2. Change BP code

    3. Add object

    4. Remove old BP.

    As demonstrated in the code below:

    Private Sub UpdateBP()

    Dim RetVal As Long

    Dim ErrCode As Long

    Dim ErrMsg As String

    Dim oBP1 As SAPbobsCOM.BusinessPartners

    Set oBP1 = oComp.GetBusinessObject(oBusinessPartners)

    Dim oBP2 As SAPbobsCOM.BusinessPartners

    Set oBP2 = oComp.GetBusinessObject(oBusinessPartners)

    '1) Add BP

    oBP1.CardCode = "Amik"

    oBP1.CardName = "Amik"

    RetVal = oBP1.Add

    If RetVal <> 0 Then

    oComp.GetLastError ErrCode, ErrMsg

    MsgBox ErrCode & " " & ErrMsg

    End If

    '2) Update BP Cardcode

    RetVal = oBP2.GetByKey("Amik")

    If RetVal <> -1 Then

    oComp.GetLastError ErrCode, ErrMsg

    MsgBox ErrCode & " " & ErrMsg

    End If

    oBP2.CardCode = "Amik18"

    RetVal = oBP2.Add

    If RetVal <> 0 Then

    oComp.GetLastError ErrCode, ErrMsg

    MsgBox ErrCode & " " & ErrMsg

    End If

    RetVal = oBP1.Remove

    If RetVal <> 0 Then

    oComp.GetLastError ErrCode, ErrMsg

    MsgBox ErrCode & " " & ErrMsg

    End If

    End Sub

    let me know if problem still persists.

    Rgds,

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.