Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
knutheusermann
Product and Topic Expert
Product and Topic Expert


SAP Business ByDesign provides the web service QueryCodeListIn to query and read ByD code lists.

You'll find a documentation of the web service on SAP Business ByDesign – SAP Help Portal Page > Web Service APIs.

 

Below, I explain how to use web service QueryCodeListIn in context of other ByD web services.

 

 

Example Scenario


 

Assume we have a master data integration scenario in which we query, read, create and update accounts in ByD. ByD web services for accounts always request and return language-independent codes, for example industrial sector code 23 (meaning "Construction").

However, for some integration scenarios the code description is required as well, to be able to display account data in a human readable form.

 

 

How to use web service QueryCodeListIn?


 

The request signature of web service QueryCodeListIn mainly contain 3 elements:

  • Code data type name

  • Code data type namespace

  • Language code


 

The code data type specifies the data type for which the code list shall be requested.

The language code specifies in which language the code list descriptions shall be returned.

 

The key question is: How do I get the code data type name and namespace?

 

Step 1:

Get the WSDL of the web service which used the code; in our example scenario QueryCustomerIn or ManageCustomerIn.

You can download the web service WSDL via ByD UI, work center view Application and User Management > Communication Arrangements.

The code data type name and namespace URI are provided by the WSDL of the account/contact web service (the data type of the corresponding element):

 

Step 2:

Get the code data type name from the WSDL:



 

Step 3:

Get the code data type namespace URI from the WSDL:



 

Now you have all information available to query the code list for industrial sector codes:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">


   <soapenv:Header/>


   <soapenv:Body>


      <glob:CodeListByIDQuery_sync>


         <CodeListSelectionByID>


            <SelectionByCodeDataType>


               <Name>IndustrialSectorCode</Name>


               <NamespaceURI>http://sap.com/xi/AP/Common/GDT</NamespaceURI>


            </SelectionByCodeDataType>


            <SelectionByLanguageCode>EN</SelectionByLanguageCode>


         </CodeListSelectionByID>


      </glob:CodeListByIDQuery_sync>


   </soapenv:Body>


</soapenv:Envelope>


 

 

... some more Query Code List Request Examples


 

Country Codes:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">


   <soapenv:Header/>


   <soapenv:Body>


      <glob:CodeListByIDQuery_sync>


         <CodeListSelectionByID>


            <SelectionByCodeDataType>


               <Name>CountryCode</Name>


               <NamespaceURI>http://sap.com/xi/AP/Common/GDT</NamespaceURI>


            </SelectionByCodeDataType>


            <SelectionByLanguageCode>EN</SelectionByLanguageCode>


         </CodeListSelectionByID>


      </glob:CodeListByIDQuery_sync>


   </soapenv:Body>


</soapenv:Envelope>


 

Region Codes:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

   <soapenv:Header/>


   <soapenv:Body>


      <glob:CodeListByIDQuery_sync>


         <CodeListSelectionByID>


            <SelectionByCodeDataType>


               <Name>RegionCode</Name>


               <NamespaceURI>http://sap.com/xi/AP/Common/GDT</NamespaceURI>


            </SelectionByCodeDataType>


            <SelectionByLanguageCode>EN</SelectionByLanguageCode>


            <SelectionByContext>


               <Parameter>


                  <Name>CountryCode</Name>


                  <Value>DE</Value>


                  <ListAgencyID></ListAgencyID>


               </Parameter>


            </SelectionByContext>


         </CodeListSelectionByID>


      </glob:CodeListByIDQuery_sync>


   </soapenv:Body>


</soapenv:Envelope>


 

Customer ABC Classification Codes:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">


   <soapenv:Header/>


   <soapenv:Body>


      <glob:CodeListByIDQuery_sync>


         <CodeListSelectionByID>


            <SelectionByCodeDataType>


               <Name>CustomerABCClassificationCode</Name>


               <NamespaceURI>http://sap.com/xi/AP/Common/GDT</NamespaceURI>


            </SelectionByCodeDataType>


            <SelectionByLanguageCode>EN</SelectionByLanguageCode>


         </CodeListSelectionByID>


      </glob:CodeListByIDQuery_sync>


   </soapenv:Body>


</soapenv:Envelope>


 

Company Legal Form Codes:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">


   <soapenv:Header/>


   <soapenv:Body>


      <glob:CodeListByIDQuery_sync>


         <CodeListSelectionByID>


            <SelectionByCodeDataType>


               <Name>CompanyLegalFormCode</Name>


               <NamespaceURI>http://sap.com/xi/AP/Common/GDT</NamespaceURI>


            </SelectionByCodeDataType>


            <SelectionByLanguageCode>EN</SelectionByLanguageCode>


         </CodeListSelectionByID>


      </glob:CodeListByIDQuery_sync>


   </soapenv:Body>


</soapenv:Envelope>


 

Tax Rate Type Codes:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

   <soapenv:Header/>


   <soapenv:Body>


      <glob:CodeListByIDQuery_sync>


         <CodeListSelectionByID>


            <SelectionByCodeDataType>


               <Name>TaxRateTypeCode</Name>


               <NamespaceURI>http://sap.com/xi/AP/Common/GDT</NamespaceURI>


            </SelectionByCodeDataType>


            <SelectionByLanguageCode>EN</SelectionByLanguageCode>


            <SelectionByContext>


               <Parameter>


                  <Name>CountryCode</Name>


                  <Value>DE</Value>


                  <ListAgencyID></ListAgencyID>


               </Parameter>


               <Parameter>


                  <Name>TaxTypeCode</Name>


                  <Value>2</Value>


                  <ListAgencyID></ListAgencyID>


               </Parameter>


            </SelectionByContext>


            </SelectionByContext>


         </CodeListSelectionByID>


      </glob:CodeListByIDQuery_sync>


   </soapenv:Body>


</soapenv:Envelope>


Chart of Account Codes:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">


   <soapenv:Header/>


   <soapenv:Body>


      <glob:CodeListByIDQuery_sync>


         <CodeListSelectionByID>


            <SelectionByCodeDataType>


               <Name>ChartOfAccountsCode</Name>


               <NamespaceURI>http://sap.com/xi/AP/FinancialAccounting/Global</NamespaceURI>


            </SelectionByCodeDataType>


            <SelectionByLanguageCode>EN</SelectionByLanguageCode>


         </CodeListSelectionByID>


      </glob:CodeListByIDQuery_sync>


   </soapenv:Body>


</soapenv:Envelope>


 

Chart of Account Item Codes:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">


   <soapenv:Header/>


   <soapenv:Body>


      <glob:CodeListByIDQuery_sync>


         <CodeListSelectionByID>


            <SelectionByCodeDataType>


               <Name>ChartOfAccountsItemCode</Name>


               <NamespaceURI>http://sap.com/xi/AP/FinancialAccounting/Global</NamespaceURI>


            </SelectionByCodeDataType>


            <SelectionByLanguageCode>EN</SelectionByLanguageCode>


            <SelectionByContext>


               <Parameter>


                  <Name>ChartOfAccountsCode</Name>


                  <Value>CAAT</Value>


                  <ListAgencyID></ListAgencyID>


               </Parameter>


            </SelectionByContext>


         </CodeListSelectionByID>


      </glob:CodeListByIDQuery_sync>


   </soapenv:Body>


</soapenv:Envelope>


 

Accounting Document Type Code (aka Journal Entry Type Code):

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">


<soapenv:Header/>


<soapenv:Body>


<glob:CodeListByIDQuery_sync>


<CodeListSelectionByID>


<SelectionByCodeDataType>


<Name>AccountingDocumentTypeCode</Name>


<NamespaceURI>http://sap.com/xi/AP/FinancialAccounting/Global</NamespaceURI>


</SelectionByCodeDataType>


<SelectionByLanguageCode>EN</SelectionByLanguageCode>


</CodeListSelectionByID>


</glob:CodeListByIDQuery_sync>


</soapenv:Body>


</soapenv:Envelope>


 

Object Type Codes (for example Journal Entry Source Document Type Codes):

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">


<soapenv:Header/>


<soapenv:Body>


<glob:CodeListByIDQuery_sync>


<CodeListSelectionByID>


<SelectionByCodeDataType>


<Name>ObjectTypeCode</Name>


<NamespaceURI>http://sap.com/xi/Common/DataTypes</NamespaceURI>


</SelectionByCodeDataType>


<SelectionByLanguageCode>EN</SelectionByLanguageCode>


</CodeListSelectionByID>


</glob:CodeListByIDQuery_sync>


</soapenv:Body>


</soapenv:Envelope>


 

Industry Classification System Code and Industrial Sector Code:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

   <soapenv:Header/>


   <soapenv:Body>


      <glob:CodeListByIDQuery_sync>


         <CodeListSelectionByID>


            <SelectionByCodeDataType>


               <Name>IndustrialSectorCode</Name>


               <NamespaceURI>http://sap.com/xi/AP/Common/GDT</NamespaceURI>


            </SelectionByCodeDataType>


            <SelectionByLanguageCode>EN</SelectionByLanguageCode>


            <SelectionByContext>


               <Parameter>


                  <Name>IndustryClassificationSystemCode</Name>


                  <Value>0005</Value>


                  <ListAgencyID></ListAgencyID>


               </Parameter>


            </SelectionByContext>


         </CodeListSelectionByID>


      </glob:CodeListByIDQuery_sync>


   </soapenv:Body>


</soapenv:Envelope>


Payment Method / Payment Form Code


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

   <soapenv:Header/>

   <soapenv:Body>

      <glob:CodeListByIDQuery_sync>

         <CodeListSelectionByID>

            <SelectionByCodeDataType>

               <Name>PaymentFormCode</Name>

               <NamespaceURI>http://sap.com/xi/AP/Common/GDT</NamespaceURI>

            </SelectionByCodeDataType>

            <SelectionByLanguageCode>EN</SelectionByLanguageCode>

         </CodeListSelectionByID>

      </glob:CodeListByIDQuery_sync>

   </soapenv:Body>

</soapenv:Envelope>

 

 

16 Comments