Skip to Content

SDK: How to Read Address Component For Sales Order Form


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?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    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 
    Add comment
    10|10000 characters needed characters exceeded