Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Address of business partner

I am using the following code to enter business partner

 Dim objCustomer As SAPbobsCOM.BusinessPartners

 objCustomer = objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners)
            objCustomer.CardCode = objDT.Rows(intI).Item("CardCode")

 If IsDBNull(objDT.Rows(intI).Item("StreetNo")) = False Then
                    objCustomer.Address = objDT.Rows(intI).Item("StreetNo")
                End If

                If IsDBNull(objDT.Rows(intI).Item("ZipCode")) = False Then
                    objCustomer.ZipCode = objDT.Rows(intI).Item("ZipCode")
                End If

                If IsDBNull(objDT.Rows(intI).Item("MailStrNo")) = False Then
                    objCustomer.MailAddress = objDT.Rows(intI).Item("MailStrNo")
                End If

                If IsDBNull(objDT.Rows(intI).Item("MailZipCod")) = False Then
                    objCustomer.MailZipCode = objDT.Rows(intI).Item("MailZipCod")
                End If

                If IsDBNull(objDT.Rows(intI).Item("Phone1")) = False Then
                    objCustomer.Phone1 = objDT.Rows(intI).Item("Phone1")
                End If
objCustomer.Add()

The business partner us getting added but the address is not visible in SAP.I can see the address in OCRD but it is not

Former Member
replied

Hi,

1.

you set AddressName2 but AddressName is mandatory !

2.

try to remove objCustomer.Addresses.Add()

you add a new address when you use the add after setting the properties

lg David

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question