Skip to Content
0
Former Member
May 31, 2009 at 11:05 AM

How to update a existing billto address

18 Views

Hi all,

How to update a existing billto address by BPAddresses in DI Server? following is my code, but it seems that it does not work:

sCmd = "<?xml version=""1.0"" encoding=""UTF-16""?>"

sCmd += " http://schemas.xmlsoap.org/soap/envelope/"">"

sCmd += "<env:Header>"

sCmd += "<SessionID>" & msSessionID & "</SessionID>"

sCmd += "</env:Header>"

sCmd += " http://www.sap.com/SBO/DIS"">"

sCmd += "<BOM>"

sCmd += "<BO>"

sCmd += "<AdmInfo>"

sCmd += "<Object>oBusinessPartners</Object>"

sCmd += "</AdmInfo>"

sCmd += "<QueryParams>"

sCmd += "<CardCode>" & lcLeadNo & "</CardCode>"

sCmd += "</QueryParams>"

sCmd += "<BusinessPartners>"

sCmd += "<row>"

sCmd += "<CardName>" & lcCardName & "</CardName>"

sCmd += "<GroupCode>" & lcGroupCode & "</GroupCode>"

sCmd += "<Website>" & lcWebSite & "</Website>"

sCmd += "<SalesPersonCode>" & lcSlpCode & "</SalesPersonCode>"

sCmd += "<EmailAddress>" & lcEMail & "</EmailAddress>"

sCmd += "<Phone1>" & lcPhone1 & "</Phone1>"

sCmd += "<Fax>" & lcFax & "</Fax>"

sCmd += "<Notes>" & lcNotes & "</Notes>"

sCmd += "</row></BusinessPartners>"

sCmd += "<BPAddresses>"

sCmd += "<row>"

sCmd += "<AddressName>Bill To</AddressName>"

sCmd += "<AddressType>bo_BillTo</AddressType>"

sCmd += "<Street>" & lcStreet & "</Street>"

sCmd += "<Block>" & lcBlock & "</Block>"

sCmd += "<ZipCode>" & lcZipCode & "</ZipCode>"

sCmd += "<City>" & lcCity & "</City>"

sCmd += "<Country>" & lcCountry & "</Country>"

sCmd += "<State>" & lcState & "</State>"

sCmd += "<Line>0</Line>"

sCmd += "</row>"

sCmd += "</BPAddresses>"

sCmd += "</BO></BOM></dis:UpdateObject></env:Body></env:Envelope>"

Please help, thanks.