Skip to Content

SDK: How to Read Address Component For Sales Order Form

Oct 26, 2017 at 02:53 PM


avatar image


Currently I’m trying to figure out how to read values in the Address Component from the SO form with the SDK. Below is a screenshot giving you a better idea the values I want to read. The reason for this, when a user click on a button to create SO to PO, I want to copy the values from Address Component from SO and send these values to an PO with the SDK. Can you advise how to read the Address Component for the SO in VB?



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Danilo Kasparian Oct 26, 2017 at 03:36 PM

See below, I got from SDK Help

// Get Invoice document 

SAPbobsCOM.Documents _mDoc;
AddressExtension m_AddrExtension; 

m_Doc = (SAPbobsCOM.Documents)m_Company.GetBusinessObject(BoObjectTypes.oInvoices); 
// Get the address sub object from the document object 
m_AddrExtension = (AddressExtension)m_Doc.AddressExtension; 
// Set bill to address properties 
m_AddrExtension.BillToBlock = "BillToBlockU"; 
m_AddrExtension.BillToBuilding = "BillToBuildingU"; 
m_AddrExtension.BillToCity = "BillToCityU"; 
m_AddrExtension.BillToCountry = "BCU"; 
m_AddrExtension.BillToCounty = "BUt"; 
m_AddrExtension.BillToState = "BSU"; 
m_AddrExtension.BillToStreet = "BillToStreetU"; 
m_AddrExtension.BillToStreetNo = "BillToStreetNoU"; 
m_AddrExtension.BillToZipCode = "BillToZipCodeU"; 
m_AddrExtension.BillToAddressType = "BillToAddressTypeU"; 
// Set ship to address properties 
m_AddrExtension.ShipToBlock = "ShipToBlockU"; 
m_AddrExtension.ShipToBuilding = "ShipToBuildingU"; 
m_AddrExtension.ShipToCity = "ShipToCityU"; 
m_AddrExtension.ShipToCountry = "SCU"; 
m_AddrExtension.ShipToCounty = "SUt"; 
m_AddrExtension.ShipToState = "SUt"; 
m_AddrExtension.ShipToStreet = "ShipToStreetU"; 
m_AddrExtension.ShipToStreetNo = "ShipToStreetNoU"; 
m_AddrExtension.ShipToZipCode = "ShipToZipCodeU"; 
// Update the document 
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Danilo,

Thanks for the solution. I was able to use your code as a guide and workout the conversion in VB.