cancel
Showing results for 
Search instead for 
Did you mean: 

How to update a existing billto address

Former Member
0 Kudos

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 += "<env:Envelope xmlns:env=""http://schemas.xmlsoap.org/soap/envelope/"">"

sCmd += "<env:Header>"

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

sCmd += "</env:Header>"

sCmd += "<env:Body><dis:UpdateObject xmlns:dis=""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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks

YatseaLi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi John,

Just remove the following line, then it will work. Because Line is read-only.

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

Kind Regards, Yatsea