Skip to Content
Technical Articles
Author's profile photo Knut Heusermann

Create ByD Sales Orders using Web Services

SAP Business ByDesign (ByD) provides web services to create ByD Sales Orders in context of three main use cases:

  • Manage ByD sales orders from a remote ordering system: Using web service APIs you can create and change ByD sales orders similar to manual sales orders that can be created via ByD UI.
  • eCommerce/webshop integration: Using the same web service APIs you can create and released provisional internet orders and request real-time information, such as availability, prices, tax and freight from ByD.
  • B2B collaboration: Using the B2B inbound interface for sales orders you can receive sales orders from your customers automatically via xml messages.

This blog post provides you with an overview on ByD web services used for those 3 use cases and considers some frequently asked questions related to sales order integration scenarios.

Additionally to the web services that are subject of this blog post, ByD offers 2 OData APIs for ByD sales orders:

  • OData for Analytics can be used to access ByD sales order reports; you find a detailed description in our ByD Community: OData for SAP Business ByDesign Analytics.
  • The work center view OData Servicescan be used to assemble your own custom OData services to access ByD sales orders. This API is designed for UI-like remote applications that interactively query, read, create, update or perform actions on ByD sales orders.

However, ByD OData capabilities might be subject of some other blog post in the future.

 

Sales Order Web Service APIs

SAP Business ByDesign provides 2 web service APIs for read and write access to ByD sales orders:

  • The web service API QuerySalesOrderIn can be used to search and read ByD sales orders. The sales orders are returned in a deeply structured xml that contains all relevant sales order data.
  • The web service API ManageSalesOrderIn is designed to create and change sales orders. However, this service can be used to release or delete sales orders as well.

You find a detailed documentation with examples for all web service APIs on SAP Help > Integration > Web Service APIs.
Please check as well the general ByD web service documentation that is linked in the API documentation in chapter “General Information“.

In the following I consider some special use cases:

 

Create Sales Orders and change the Item Price

Using web service ManageSalesOrderIn item prices are calculated by the system based on the ByD price and tax determination. However you can change the item price in a second web service call and overwrite the calculated price components.

The steps to be performed are basically:

  1. Create order with all data except prices
  2. Update the order item price

Depending on your detailed requirements 3 web service choreographies make sense:

Update the item main price:

  1. Create SO
  2. Update SO item main price

Update price component using the price component key:

  1. Create SO
  2. Query SO and get price component UUID
  3. Update SO price component with the given price component UUID from step 2.

Update price component using the price component type:

  1. Create SO
  2. Update SO price component with the given price component type code.

Example xml to create a sales order:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
	<soapenv:Header/>
	<soapenv:Body>
		<glob:SalesOrderBundleMaintainRequest_sync>
			<BasicMessageHeader>
			</BasicMessageHeader>
			<SalesOrder actionCode="01">
				<ReleaseAllItemsToExecution>false</ReleaseAllItemsToExecution>
				<SalesUnitParty actionCode="04">
					<PartyID>S1121</PartyID>
				</SalesUnitParty>
				<AccountParty actionCode="04">
					<PartyID>CS200125</PartyID>
				</AccountParty>
				<PricingTerms actionCode="04">
					<CurrencyCode>USD</CurrencyCode>
					<PriceDateTime timeZoneCode="UTC">2017-05-07T13:58:00Z</PriceDateTime>
					<GrossAmountIndicator>false</GrossAmountIndicator>
				</PricingTerms>        
				<Item actionCode="04">
					<ID>10</ID>
					<ProcessingTypeCode>TPTM</ProcessingTypeCode>
					<ReleaseToExecute>false</ReleaseToExecute>
					<ItemProduct actionCode="04">
						<ProductInternalID>S200102</ProductInternalID>
					</ItemProduct>
					<ItemScheduleLine actionCode="04">
						<ID>1</ID>
						<TypeCode>1</TypeCode>
						<Quantity unitCode="HUR">5.0</Quantity>
					</ItemScheduleLine>
				</Item>
			</SalesOrder>
		</glob:SalesOrderBundleMaintainRequest_sync>
	</soapenv:Body>
</soapenv:Envelope>

Example xml to update the sales order item main price:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
	<soapenv:Header/>
	<soapenv:Body>
		<glob:SalesOrderBundleMaintainRequest_sync>
			<BasicMessageHeader>
			</BasicMessageHeader>
			<SalesOrder actionCode="04">
				<ID>5346</ID>
				<ReleaseAllItemsToExecution>true</ReleaseAllItemsToExecution>
				<Item actionCode="04">
					<ID>10</ID>
					<ReleaseToExecute>true</ReleaseToExecute>
					<PriceAndTaxCalculationItem actionCode="04">
						<ItemMainPrice actionCode="04">
							<Rate>
								<DecimalValue>28.0</DecimalValue>
								<CurrencyCode>USD</CurrencyCode>
								<BaseDecimalValue>5.0</BaseDecimalValue>
								<BaseMeasureUnitCode>HUR</BaseMeasureUnitCode>
							</Rate>
						</ItemMainPrice>
					</PriceAndTaxCalculationItem>
				</Item>
			</SalesOrder>
		</glob:SalesOrderBundleMaintainRequest_sync>
	</soapenv:Body>
</soapenv:Envelope>

 

Since ByD release 1805 you can create a sales order with price components (using main price and main discount or price components) and released the sales order in one single web service call:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
   <soapenv:Header/>
   <soapenv:Body>
      <glob:SalesOrderBundleMaintainRequest_sync>
         <BasicMessageHeader>
         </BasicMessageHeader>
         <SalesOrder actionCode="01">
            <ObjectNodeSenderTechnicalID>S1</ObjectNodeSenderTechnicalID>         
            <ReleaseAllItemsToExecution>true</ReleaseAllItemsToExecution>
            <SalesUnitParty actionCode="04">
               <PartyID>S1121</PartyID>
            </SalesUnitParty>
            <AccountParty actionCode="04">
               <PartyID>CS200125</PartyID>
            </AccountParty>
            <PricingTerms actionCode="04">
               <CurrencyCode>USD</CurrencyCode>
               <PriceDateTime timeZoneCode="UTC">2018-12-21T10:58:00Z</PriceDateTime>
               <GrossAmountIndicator>false</GrossAmountIndicator>
            </PricingTerms>        
            <Item actionCode="04">
            	<ObjectNodeSenderTechnicalID>S1-I1</ObjectNodeSenderTechnicalID>         
               <ID>10</ID>
               <ProcessingTypeCode>TAS</ProcessingTypeCode>
               <ItemProduct actionCode="04">
                  <ProductInternalID>S200102</ProductInternalID>
               </ItemProduct>
               <ItemScheduleLine actionCode="04">
                  <ID>1</ID>
                  <TypeCode>1</TypeCode>
                  <Quantity unitCode="HUR">5.0</Quantity>
               </ItemScheduleLine>
               <PriceAndTaxCalculationItem actionCode="04">
                  <ItemMainPrice actionCode="04">
                     <Rate>
                        <DecimalValue>123.0</DecimalValue>
                        <CurrencyCode>USD</CurrencyCode>
                        <BaseDecimalValue>1.0</BaseDecimalValue>
                        <BaseMeasureUnitCode>HUR</BaseMeasureUnitCode>
                     </Rate>
                  </ItemMainPrice>
               </PriceAndTaxCalculationItem>               
            </Item>
         </SalesOrder>
      </glob:SalesOrderBundleMaintainRequest_sync>
   </soapenv:Body>
</soapenv:Envelope>

 

 

Internet Orders / eCommerce Integration

Using web shop integration capabilities and web service ManageSalesOrderIn you create internet orders (sales orders of type “Internet Order“) provisionally in ByD. These internet orders are not visible in the ByD Sales Order work list, but can be used for price determination, credit limit checks and ATP checks. These real-time information can be requested via web service QuerySalesOrderIn and displayed in the eCommerce/webshop application.

Note: Use xml element OriginTypeCode = 4 to create internet orders.

After completing the checkout process in the webshop, the provisional internet order in ByD can be released and added to the order processing worklist or automatically submitted for order processing. This is done by a second web service call that updates the provisional internet order using xml element ReleaseCustomerRequest = true. As result the internet order is visible in the ByD sales order work list. Typically this step is performed when the web shop shopping cart has been released.

Provisional internet orders that are not released can be deleted periodically using Internet Order Deletion Runs. You find a detailed documentation in the ByD Help Center searching for “Internet Order Deletion Runs”.

You can configure the eCommerce/Web Shop integration in the ByD Business Configuration in step 4 – Questions of your implementation project in scoping element:
Sales > Selling Products and Services > E-Selling.

If you answer the question “Would you like your employees to control the release of sales orders that originate from an E-Shop in order to initiate order processing?” with

  • No, then releasing the provisional internet order results in a sales order in status “Open“.
  • Yes (in scope), then releasing the provisional internet order results in a sales order in status “In preparation” and can be released manually via the ByD UI.

Sales orders with error messages are indicated as inconsistent and remain in status “In preparation“.

 

Delete Sales Orders

Sales orders in status “In preparation” can be deleted using web service ManageSalesOrderIn by applying the sales order action codes 03 (delete) or 05 (remove).

Example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
	   <soapenv:Header/>
	   <soapenv:Body>
	      <glob:SalesOrderBundleMaintainRequest_sync>
	         <BasicMessageHeader>
	         </BasicMessageHeader>
	         <SalesOrder actionCode="03">
	            <ID>3135</ID>
	            <!-- <UUID>?</UUID> -->
	         </SalesOrder>
	      </glob:SalesOrderBundleMaintainRequest_sync>
	   </soapenv:Body>
</soapenv:Envelope>

Provisional internet orders that are not released can be deleted periodically using Internet Order Deletion Runs.

 

Calculate Prices and Check Availability w/o Sales Order

Using web service ManageSalesOrderIn to create sales orders, the ByD system calculates item prices and taxes based on the ByD price and tax determination.

However, the web service APIs CalculatePriceIn and ProductAvailabilityDeterminationIn can be helpful to calculate prices and check the product availability without creating a sales order as well.

The web service CalculatePriceIn can be used to calculate prices for multiple accounts or products. The web service creates sales orders in memory (the sales order will not be saved) with one sales order item for each item in the web service request to run a qualified price and tax determination.

To understand how the web service works it could be helpful to create a sales order via UI and check the resulting prices per item.

Example request

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
   <soap:Header/>
   <soap:Body>
      <glob:CalculatePricesRequest_sync>
         <CalculatePricesRequest>
            <!-- Application: 1 Procurement, 2 Sales -->
            <Application>2</Application>
            <CurrencyCode>USD</CurrencyCode>
            <!-- false: use net price lists, true: use gross price lists -->
            <GrossPricingIndicator>false</GrossPricingIndicator>
            <PricingDate>2016-12-13</PricingDate>
            <AccountID>MC9785</AccountID>
            <Item>
               <ID>1</ID>
               <ProductID>MCF-0002</ProductID>
               <ProductTypeCode>1</ProductTypeCode>
            </Item>
            <Item>
               <ID>2</ID>
               <ProductID>MCF-0036</ProductID>
               <ProductTypeCode>1</ProductTypeCode>
            </Item>
         </CalculatePricesRequest>
      </glob:CalculatePricesRequest_sync>
   </soap:Body>
</soap:Envelope>

Remarks:

  • The Item/ID must be unique.
  • Code for element Application: 1 – Procurement, 2 – Sales
  • GrossPricingIndicator: false => use net price lists, true => use gross price lists

 

External Payments

The payment method “External payment” can be used for external sales orders created via web service.

You find the payment method in the web service request message types as element “SalesOrder/PaymentControl/PaymentFormCode“. Additional to the payment method you have to provide the details for External Payment: “…/PaymentControl/ExternalPayment“.

Payment Form Code for external payments: 20 – External Payment.

Payment Reference Type Code: 5 – Transaction Reference Number of externally paid e-commerce order

Example xml to release a sales order with external payment:

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
	<soap:Body>
		<ns5:SalesOrderBundleMaintainRequest_sync xmlns:ns4="http://sap.com/xi/AP/Common/Global" xmlns:ns5="http://sap.com/xi/SAPGlobal20/Global">
			<SalesOrder actionCode="02">
				<ID>123</ID>
				<ReleaseCustomerRequest>true</ReleaseCustomerRequest>
				<PaymentControl>
					<PaymentProcessingCompanyID>Seller company</PaymentProcessingCompanyID>
					<PropertyMovementDirectionCode>2</PropertyMovementDirectionCode>
					<PaymentFormCode>20</PaymentFormCode>
					<PaymentReferenceID>Ref ID/transaction ID of payment provider</PaymentReferenceID>
					<PaymentReferenceTypeCode>5</PaymentReferenceTypeCode>
					<ExternalPayment actionCode="01">
						<HouseBankAccountKeyInternalID>Bank account in ByD for the payment provider</HouseBankAccountKeyInternalID>
						<PaymentTransactionReferenceID>Ref ID/transaction ID of payment provider</PaymentTransactionReferenceID>
						<DocumentDate>2014-03-31</DocumentDate>
						<ValueDate>2014-03-31</ValueDate>
						<Amount currencyCode="EUR">9.95</Amount>
					</ExternalPayment>
				</PaymentControl>
			</SalesOrder>
		</ns5:SalesOrderBundleMaintainRequest_sync>
	</soap:Body>
</soap:Envelope>

 

Sales Order with reference to marketing campaigns

You can create ByD sales orders with reference to marketing campaigns by adding the marketing campaign as BusinessTransactionDocumentReference with TypeCode “764” (764 is the object type code for business object “Marketing Campaign”) to the sales order web service request.

The following example creates internet sales order with reference to marketing campaign “CAMP-123”:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
   <soapenv:Header/>
   <soapenv:Body>
      <glob:SalesOrderBundleMaintainRequest_sync>
         <BasicMessageHeader>
         </BasicMessageHeader>
         <SalesOrder actionCode="01">
            <Name languageCode="EN">My Sales Order with Marketing Campaign 123</Name>
            <!-- DataOriginTypeCode: 4 = Internet order -->
            <DataOriginTypeCode>4</DataOriginTypeCode>
<!--        <ReleaseCustomerRequest>true</ReleaseCustomerRequest> -->
            <ReleaseAllItemsToExecution>false</ReleaseAllItemsToExecution>
            <BusinessTransactionDocumentReference actionCode="01">
               <BusinessTransactionDocumentReference>
                  <!-- You can use the ID or UUID of the marketing campaign -->
                  <ID>CAMP-123</ID> <!-- campaign ID -->
                  <!-- <UUID></UUID> -->
                  <!-- Type code 764 refers to object "Marketing Campaign" -->
                  <TypeCode>764</TypeCode> 
               </BusinessTransactionDocumentReference>
  <BusinessTransactionDocumentRelationshipRoleCode>1</BusinessTransactionDocumentRelationshipRoleCode>
               <DataProviderIndicator>true</DataProviderIndicator>
            </BusinessTransactionDocumentReference>
            <SalesUnitParty actionCode="04">
               <PartyID>S1121</PartyID>
            </SalesUnitParty>
            <AccountParty actionCode="04">
               <PartyID>CS200125</PartyID>
            </AccountParty>
            <PricingTerms actionCode="04">
               <CurrencyCode>USD</CurrencyCode>
               <PriceDateTime timeZoneCode="UTC">2015-05-07T13:58:00Z</PriceDateTime>
               <GrossAmountIndicator>false</GrossAmountIndicator>
            </PricingTerms>        
            <Item actionCode="04">
               <ID>10</ID>
               <ProcessingTypeCode>TPTM</ProcessingTypeCode>
               <ReleaseToExecute>false</ReleaseToExecute>
               <ItemProduct actionCode="04">
                  <ProductInternalID>S200102</ProductInternalID>
               </ItemProduct>
               <ItemScheduleLine actionCode="04">
                  <ID>1</ID>
                  <TypeCode>1</TypeCode>
                  <Quantity unitCode="HUR">5.0</Quantity>
               </ItemScheduleLine>
            </Item>
         </SalesOrder>
      </glob:SalesOrderBundleMaintainRequest_sync>
   </soapenv:Body>
</soapenv:Envelope>

 

 

B2B Collaboration for Sales Orders

Using B2B integration scenarios you can replace mail or e-mail based communication with your business partners by an automated message-based business document exchange.

B2B communication scenarios can be configured in work center view “Communication Arrangements”. Using B2B messages as output channel can be configured in the corresponding business partner master (for work center Business Partner Data, work center view Accounts) on page “Communication”. This means you can decide which output channel shall be used per business partner and business document.

SAP Business ByDesign B2B inbound channels and B2B outbound channels are aligned, such that B2B communication scenarios can be easily configured with mapping or development efforts, if both communication parties (buyer and seller) use SAP Business ByDesign.

You find more information about integration scenarios on SAP Help > Integration > Integration Scenarios.

In context of sales scenarios the following communications might be interesting:

Seller side: Buyer side:
Communication Partner: Business Document Flow: ByD Interface: ByD Communication Scenario: ByD Interface: ByD Communication Scenario:

Buyer business partner

>>

Seller Company in ByD

Purchase Order

>>

Sales Order

 

Sales Order Inbound (SAP ESD) Sales Order Integration Purchase Order Purchase Order Integration
Seller Company in ByD

>>

Buyer business partner

Sales Order Confirmation

>>

Purchase Order Acknowledge-ment

Sales Order Confirmation Outbound (SAP ESD) Sales Order Integration Purchase Order Acknowledge-ment Purchase Order Integration
Seller Company in ByD

>>

Buyer business partner

Advanced Shipping Notification (ASN)

>>

Advanced Shipping Notification (ASN)

Outbound advanced shipping notification (SAP ESD) Output of Advanced Shipping Notification Inbound advanced shipping notification (SAP ESD) Input of Advanced Shipping Notification
Seller Company in ByD

>>

Buyer business partner

Customer Invoice

>>

Supplier Invoice

Customer Invoice Outbound (SAP ESD) Output of Customer Invoices Supplier Invoice (SAP ESD) Input of Supplier Invoices

 

Most B2B interfaces support 2 application protocols: SAP NetWeaver XI 3.0 and Web Service (Plain Soap). You can choose the application protocol in the technical data of the ByD communication arrangement: Enter ‘1’ for SAP NetWeaver XI 3.0 or enter ‘5’ for Web Service (Plain Soap) in field “Application Protocol”.

Please note: SAP NetWeaver XI 3.0 and Web Service use different endpoints. Please make sure the protocol selected fits to the endpoint used.

If you use the protocol Web Service (Plain Soap) you can use message ID and queue ID in order to archive exactly once in order processing (EOIO). Message ID and queue ID can be transferred as Soap header fields according the WS Addressing standard or as parameter in the web service URL.

You find a detailed description how to setup the B2B communication scenario “Sales Order Integration” in blog post Setup B2B Sales Order Integration with SAP Business ByDesign.

For example:
https://my338338.sapbydesign.com/sap/bc/srt/scs/sap/salesorderprocessingorderingi1?MessageId=989C6E5C-4672-2CC1-11CA-A044-08002B1BB4F5&QueueId=MyQueue123

Example for a B2B message to receive a sales order (Sales Order Inbound):

Business partner in ByD representing the Buyer (sender of the message):

  • Business partner ID: BAUS
  • GLN: 898989

Company in ByD representing the Seller (recipient of the message):

  • Company ID: 1000
  • Business partner ID (of company): 1000000
  • GLN: 767676

Sample xml request:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
	<soap:Header/>
	<soap:Body>
		<glob:PurchaseOrderRequest>
			<MessageHeader>
				<!-- Unique message ID provided by the sender -->
				<ID>KH123</ID>
				<ReferenceID schemeAgencyID="898989" schemeAgencySchemeAgencyID="9" schemeID="ORDER">ABC0100</ReferenceID>
				<!-- Sender date time in UTC, ISO format -->
				<CreationDateTime>2017-12-11T10:06:00.440117Z</CreationDateTime>
				<!-- Sender party refering to the business partner representing the sender (here: the buyer) -->
				<!-- Must be the same as used in the communication arrangement -->
				<SenderParty>
					<!-- Standard ID (GLN) of ByD business partner acting as buyer -->
					<!-- Scheme agency IDs: 9 GLN, 16 DUNS -->
					<StandardID schemeAgencyID="9">898989</StandardID>
				</SenderParty>
				<!-- Receiver party refering to the business partner representing the receiver (here: the seller) -->
				<!-- Must be the same as used in the communication arrangement -->
				<RecipientParty>
					<!-- Standard ID (GLN) of ByD company acting as seller -->
					<!-- Scheme agency IDs: 9 GLN, 16 DUNS -->
					<StandardID schemeAgencyID="9">767676</StandardID>
				</RecipientParty>
				<!-- Business Scope Type Code: 2 sending process, 3 receiving process -->
				<!-- Business Scope ID: 97 Purchase Order Processing at Customer, 7 Sales Order Processing -->
				<BusinessScope>
					<TypeCode listID="25201" listAgencyID="310">2</TypeCode>
					<ID schemeID="10555" schemeAgencyID="310">97</ID>
				</BusinessScope>
				<BusinessScope>
					<TypeCode listID="25201" listAgencyID="310">3</TypeCode>
					<ID schemeID="10555" schemeAgencyID="310">7</ID>
				</BusinessScope>
			</MessageHeader>
			<PurchaseOrder reconciliationPeriodCounterValue="1" itemListCompleteTransmissionIndicator="true">
				<ID>KH-11</ID>
				<BuyerParty>
					<!-- Buyer IDs: Business Partner Internal ID: BAUS, GLN: 898989, DUNS: <n.a.> -->
					<StandardID schemeAgencyID="9">898989</StandardID>
					<!-- <SellerID>BAUS</SellerID> -->
					<!-- Type codes: 147 Business Partner, 154 Company, 159 Account, 167 Employee, 200 Organizational Unit, 251 Sales Unit, 266 Supplier -->
					<TypeCode>147</TypeCode>
				</BuyerParty>
				<SellerParty>
					<!-- Seller IDs: Company ID: 1000, GLN: 767676, DUNS: <n.a.> -->
					<StandardID schemeAgencyID="9">767676</StandardID>
					<!-- <SellerID>1000</SellerID> -->
					<TypeCode>154</TypeCode>
				</SellerParty>
				<TextCollection actionCode="01">
					<Text actionCode="01">
						<TypeCode>10024</TypeCode>
						<ContentText languageCode="EN">Customer Info: Sales Order created via B2B message</ContentText>
					</Text>
				</TextCollection>
				<Item actionCode="01">
					<ID>1</ID>
					<Product>
						<BuyerID>S200112</BuyerID>
						<SellerID>S200112</SellerID>
						<TypeCode>2</TypeCode>
					</Product>
					<ScheduleLine>
						<ID>1</ID>
						<DeliveryPeriod>
							<StartDateTime timeZoneCode="EST">2017-12-11T04:00:00Z</StartDateTime>
							<EndDateTime timeZoneCode="EST">2017-12-12T04:00:00Z</EndDateTime>
						</DeliveryPeriod>
						<Quantity unitCode="EA">1</Quantity>
					</ScheduleLine>
				</Item>
			</PurchaseOrder>
		</glob:PurchaseOrderRequest>
	</soap:Body>
</soap:Envelope>

Assigned Tags

      44 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Web services has helped a lot when it comes to business aspects. Thank you for this article, it is very informative and it will help a lot. Web services are now trending today because the technology is evolving. It can make the business to be more efficient and effective.

      Regards,
      Maryan Farrugia, Sales Marketing
      https://www.crunchbase.com/person/maryann-farrugia

      Author's profile photo Nguyen Ly
      Nguyen Ly

      Hi Knut,

      Thank you for the great blog! This helped us successfully created the Sales Order and Maintain the Price in ByD.

      We are also trying to maintain the Item Discount (Percentage) but has not succeeded so far. Could you please let us know if you have the sample XML message?

      Regards,

      Nguyen Ly

      Author's profile photo Nguyen Ly
      Nguyen Ly

      Hi,

      I successfully can maintain the item discount using this message below:

      Cheers,

      Ly

       

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
      	<soapenv:Header/>
      	<soapenv:Body>
      		<glob:SalesOrderBundleMaintainRequest_sync>
      			<BasicMessageHeader>
      			</BasicMessageHeader>
      			<SalesOrder actionCode="04">
      				<ID>48</ID>
      				<Item actionCode="04">
      					<ID>10</ID>
      					<PriceAndTaxCalculationItem actionCode="04">
      					<ItemMainDiscount actionCode="04">
                           <Rate>
                              <DecimalValue>10</DecimalValue>
                           </Rate>
      					</ItemMainDiscount>
      					</PriceAndTaxCalculationItem>
      				</Item>
      			</SalesOrder>
      		</glob:SalesOrderBundleMaintainRequest_sync>
      	</soapenv:Body>
      </soapenv:Envelope>
      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Update: I added chapter "Sales Order with reference to marketing campaigns" to explain how to create a sales order with reference to a marketing campaign.

       

      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Using SoapUI to test B2B Inbound Interfaces:

      You can test ByD inbound interfaces of B2B communication scenarios using SoapUI by the following steps:

      Step 1:

      Configure the B2B communication scenario using the application protocol “Web Service”. Compare blog post Setup B2B Sales Order Integration with SAP Business ByDesign for more details.

      Step 2:

      Open the communication arrangement and download the WSDL of the ByD inbound interface.

      Step 3:

      Create a new project in SoapUI using the WSDL.

      Step 4:

      Create and test your sample web service request in SoapUI, taking into account the following aspects:

      The addressing used in the xml payload message header must be in sync with the communication parties used in the communication arrangement.
      B2B message header should contain at minimum the following information:

      • ID: Unique message ID provided by the sender
      • CreationDateTime: Sender date time in UTC, iso format
      • SenderParty referring to the business partner representing the sender (e.g. the buyer)
      • RecipientParty referring to the business partner representing the receiver (e.g. the company in ByD representing the seller)
      • BusinessScope referring to the sending process (e.g. Purchase Order Processing at Customer) 
      • BusinessScope referring to the receiving process (e.g. Sales Order Processing)

      Example message header for interface Sales Order Inbound (SAP ESD):

      <MessageHeader>
      	<!-- Unique message ID provided by the sender -->
      	<ID>KH123</ID>
      	<!-- Sender date time in UTC, iso format -->
      	<CreationDateTime>2017-10-10T14:06:00.440117Z</CreationDateTime>
      	<!-- Sender party refering to the business partner representing the sender (here: the buyer) -->
      	<!-- Must be the same as used in the communication arrangement -->
      	<SenderParty>
      		<!-- Standard ID (GLN) of ByD business partner acting as buyer -->
      		<!-- scheme agency IDs: 9 GLN, 16 DUNS -->
      		<StandardID schemeAgencyID="9">898989</StandardID>
      	</SenderParty>
      	<!-- Receiver party refering to the business partner representing the receiver (here: the seller) -->
      	<!-- Must be the same as used in the communication arrangement -->
      	<RecipientParty>
      		<!-- Standard ID (GLN) of ByD company acting as seller -->
      		<!-- scheme agency IDs: 9 GLN, 16 DUNS -->
      		<StandardID schemeAgencyID="9">767676</StandardID>
      	</RecipientParty>
      	<!-- Business Scope Type Code: 2 sending process, 3 receiving process -->
      	<!-- Business Scope ID: 97 Purchase Order Processing at Customer, 7 Sales Order Processing -->
      	<BusinessScope>
      		<TypeCode listID="25201" listAgencyID="310">2</TypeCode>
      		<ID schemeID="10555" schemeAgencyID="310">97</ID>
      	</BusinessScope>
      	<BusinessScope>
      		<TypeCode listID="25201" listAgencyID="310">3</TypeCode>
      		<ID schemeID="10555" schemeAgencyID="310">7</ID>
      	</BusinessScope>
      </MessageHeader>

      The web service interface Sales Order Inbound (SAP ESD) is an asynchonous interface and hence you don’t see a web service response in SoapUI if the web service request has been accepted by ByD. However, you can see the message in the ByD Business Communication Monitor.

      B2B interfaces expect EOIO processing and hence SoapUI has to provide WS-A addressing (see trouble shooting below).

       

      Some trouble Shooting:

      If you are using SoapUI to test the B2B communication scenario “Sales Order Integration” respectively interface Sales Order Inbound (SAP ESD) you may observe the following error message:

      ByD returns a fault message and SoapUI displays the web service response
      Web service processing error; more details in the web service error log on provider side (UTC timestamp …; Transaction ID …).

      In ByD the failed web service call is listed in the Business Communication MonitorRejected Web Service Calls with status “Technical Error” and error description
      “SRT: Plain SOAP: Reliable messaging (RM) configured, but no Message ID and no WSRM assertion provided”.

      To solve the issue in SoapUI you have to enabling WS-A addressing and let SoapUI generate/add the message ID:

       

      In the ByD Business Communication Monitor you may see business messages with status “Content Error” and error description
      "Error reported by application: Processing purchase order not possible; sender or receiver is unknown: Creation of sales order not possible; inconsistent reference".

      The ByD message inbound processing raises this error message if you send a second web service request using the same MessageHeader/MessageID or PurchaseOrder/ID.
      If you send the same order again to ByD, then ByD expects an update on the sales order, which requires to use interface operation “ChangeSalesOrder” instead of using “CreateSalesOrder” (create is not possible, because a sales order for the sender purchase order has already been created in ByD).

      Therefore the solution is

      1. Make sure that the MessageHeader/MessageID is unique for each message
      2. Make sure to use the correct interface operation:
        • CreateSalesOrder” to create sales orders
        • ChangeSalesOrder” to change an sales order that already exists in ByD
      Author's profile photo Murthy V
      Murthy V

      Very informative and detailed blog along with examples, would be very useful in easy consumption of ByDesign Sales Order web service API

      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Update ByD release 1805: Since 1805 sales orders can be create with price components (using main price and main discount or price components) and released in one single web service call.

      Author's profile photo May Thitsa Oo
      May Thitsa Oo

      Checked it and its really worked on 1805.

      Thanks a lot for valuable info.

      Author's profile photo SAMUELE BARZAGHI
      SAMUELE BARZAGHI

      Hi Knut,

      Very useful, thanks.

      In the documentation there is yet:

      Note: PriceAndTaxCalculation cannot be created but can only be modified. So this means that if the customer wishes to change the Discount or Freight charge, then the customer has to create the order first and then make a second web-service request to the update this sales order with the pricing information that is to be changed. Details on how to create a sample update request is mentioned below.

      https://help.sap.com/doc/a2b4c7ef61d64397b2b1d052082a8a08/2002/en-US/PSM_ISI_R_II_SLO_SO_BUNDLE_MBO.html

      Best Regards

      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Hi Samuele,

      Looks like we have to check our documentation - thanks for the hint.

      Regards, Knut

      Author's profile photo Alexander Wegener
      Alexander Wegener

      Hi Knut,

      I can confirm the creation and release of a sales order with price in one step with ByD release 1805. A big thanks for that!

      Can you confirm that creating a sales order and fulfilling a sales order (confirm service execution) in one step is still not possible? I feel that the release code is being checked while fulfilling the sales order, therefore the interface returns an inconsistency while trying to confirm the order already in the creation message.

      Fulfilling the sales order in two steps is working via subsequent message:

      <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:glob1="http://sap.com/xi/AP/Globalization">
      <soap:Header/>
      <soap:Body>
      <glob:SalesOrderBundleMaintainRequest_sync>
      <BasicMessageHeader />
      <SalesOrder actionCode="02">
      <ID>1234567890</ID>
      <FinishFulfilmentProcessingOfAllItems>true</FinishFulfilmentProcessingOfAllItems>
      </SalesOrder>
      </glob:SalesOrderBundleMaintainRequest_sync>
      </soap:Body>
      </soap:Envelope>

      However, adding the fulfilment indicator to the first message (via Item node)

      <Item>
      	<ID>10</ID>
      	<ReleaseToExecute>true</ReleaseToExecute>
      	<FinishFulfilmentProcessing>true</FinishFulfilmentProcessing>
      ...
      </Item>

      will generate an inconsistency response:

      <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
         <env:Header/>
         <env:Body>
            <n0:SalesOrderBundleMaintainConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:LPK:/1SAI/TAE88DF3AA925C3E49C60CC:804">
               <Log>
                  <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
                  <Item>
                     <TypeID>005(/CL_APCRM_DOCIT/)</TypeID>
                     <SeverityCode>3</SeverityCode>
                     <Note>Document item 10 not fulfilled; document is inconsistent</Note>
                  </Item>
               </Log>
            </n0:SalesOrderBundleMaintainConfirmation_sync>
         </env:Body>
      </env:Envelope>

      Adding <FinishFulfilmentProcessingOfAllItems> in <SalesOrder> within the first message does not do anything at all. It will create the sales order as normal and no warning or error is thrown.

      BR
      Alex

      Author's profile photo Alexander Wegener
      Alexander Wegener

      The complete message I am trying to send:

      <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:glob1="http://sap.com/xi/AP/Globalization">
         <soap:Header/>
         <soap:Body>
            <glob:SalesOrderBundleMaintainRequest_sync>
      	<BasicMessageHeader />
      	<SalesOrder actionCode="01">
      		<!-- An action call to release all service related items to execution.
      			It will be invoked when the value is set to true. -->
      		<ReleaseAllItemsToExecution>true</ReleaseAllItemsToExecution>
      		<!-- An action call to fulfill the processing of all service related items.
      			It will be invoked when the value is set to true. -->
      		<FinishFulfilmentProcessingOfAllItems>true</FinishFulfilmentProcessingOfAllItems>
      		<!-- A coded representation of where the customer specific transaction
      			document data originates. Code Value Description: 1 Manual data entry;
      			2 B2B message; 3 A2A message; 4 Internet; 5 E-Mail; For eCommerce scenario,
      			only code 4 should be utilized. -->
      		<DataOriginTypeCode>4</DataOriginTypeCode>
      		<!-- Posting Date of a sales order -->
      		<PostingDate>2018-04-01T00:00:00Z</PostingDate>
      		<RequestedFulfillmentPeriodPeriodTerms actionCode="04">
      			<StartDateTime timeZoneCode="UTC">2018-04-03T00:00:00Z</StartDateTime>
      		</RequestedFulfillmentPeriodPeriodTerms>     
      		<AccountParty>
      			<PartyID>I000000006</PartyID>
      		</AccountParty>
      		<SalesUnitParty>
      			<PartyID>CXXXX00000</PartyID>
      		</SalesUnitParty>
      		<Item>
      			<ID>10</ID>
      			<ReleaseToExecute>true</ReleaseToExecute>
      			<FinishFulfilmentProcessing>true</FinishFulfilmentProcessing>
      			<PostingDate>2018-04-04T00:00:00Z</PostingDate>
      			<ItemProduct>
      				<ProductID>9000000035</ProductID>
      			</ItemProduct>
      			<ItemScheduleLine actionCode="04">
      				<Quantity unitCode='EA'>1</Quantity>
      				<DateTimePeriod>
      					<StartDateTime timeZoneCode='CET'>2018-06-01T00:00:00Z</StartDateTime>
      					<EndDateTime timeZoneCode='CET'>2018-06-02T00:00:00Z</EndDateTime>
      				</DateTimePeriod>
      			</ItemScheduleLine>
      			<ItemServiceTerms>
      				<ResourceID>XYZ</ResourceID>
      			</ItemServiceTerms>
      			<PriceAndTaxCalculationItem>
      				<ItemMainPrice>
      					<Rate>
      						<DecimalValue>100.00</DecimalValue>
      						<CurrencyCode>EUR</CurrencyCode>
      					</Rate>
      				</ItemMainPrice>
      			</PriceAndTaxCalculationItem>
      		</Item>
      	</SalesOrder>
            </glob:SalesOrderBundleMaintainRequest_sync>
         </soap:Body>
      </soap:Envelope>
      Author's profile photo Henning Ohlmeyer
      Henning Ohlmeyer

      Hi Knut,

      we are using B2B Integration and trying to use BuyerID on Item level. We can find it in the WSDL but couldn'f find the corresponding field in ByD.

       

      Regards

      Henning Ohlmeyer

      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Hi Henning,

      B2B services follow a role-concept. Which means master data references like products and parties can be identified by standard IDs (e.g. DUNS,  GLN), seller IDs (party/product ID on seller side) and buyer IDs (party/product ID on seller side).

      If you create a sales order via B2B interface, then the buyer is the customer account. Hence the buyer ID of the product (Item/Product/BuyerID) is the Customer Part Number in your product master data. The B2B inbound processing uses the product buyer ID to identify the product if no standard ID has been provided.

      Does that answer your question?

      Best regards,
      Knut

       

      Author's profile photo Henning Ohlmeyer
      Henning Ohlmeyer

      Hi Knut,

      yes it does. If I like to add more Information from customer (for example textfield provided via EDI). Is it possible to extend the standard service Sales Order Inbound (SAP ESD) form scenario Sales Order Integration  with extension fields. I have found different informations about that.

      Regards

      Henning Ohlmeyer

      Author's profile photo Manuel Peschke
      Manuel Peschke

      Hi Knut Heusermann,

      Great summary of the availble webservices for sales order creation!

      I also have the requirement to enhance the B2B (PurchaseOrderRequest) webservice with extension fields.  Unfortunately it seems only be possible to pass extension fields to the e-comm. (ManageSalesOrderIn) webservice.

      Is there any way to get extension fields passed to the B2B (PurchaseOrderRequest) webservice?

       

      Thanks,

      Manuel

      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Hi Manuel,

      yes, you are right. As of today sales order extension fields are supported by web service ManageSalesOrderIn and by custom OData services on the sales order object.

      However, I'm aware of the need to support extension fields in the B2B service as well and we plan to enable that in future as well.

      Best regards,
      Knut

      Author's profile photo Manuel Peschke
      Manuel Peschke

      Thanks Knut, for the quick response!

      I just posted a "Influence Request", in order to keep track of this requirement (didn't find an existing one):

      https://influence.sap.com/sap/ino/#/idea/214868/?section=sectionDetails

      Please vote 🙂

       

      Best Regards,

      Manuel

      Author's profile photo Georg Kordel
      Georg Kordel

      Hello Knut,

      is it also possible to use GLN in SalesOrderBundleMaintainConfirmation_sync?

      In the Tag <PartyID> the following attributes don't show any impact:

      schemeID="9"
      schemeAgencyID="9"
      schemeAgencySchemeID="9"
      schemeAgencySchemeAgencyID="9"

       

      Kind regards

      Georg

      Author's profile photo Dezhi Liu
      Dezhi Liu

      Hi Knut,

      as of 1808, we have the ability to add Payment Brand for External Payments:

       

      I know the Payment Brand is only for reporting purposes, but still, it is a very useful field.

      Can we set this field in the web service call? Within the element "PaymentControl", I cannot identify any field that is related.

      Thanks,

      Dezhi

      Author's profile photo Utpal Maity
      Utpal Maity

      Hi,

      Thanks for the great blog. i can update price successfuly.What to do if I want to update tax for the products in the sales order.

      Author's profile photo Utpal Maity
      Utpal Maity

      Hi,

      My request is like this

       

      <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">

      <soap:Body>

      <glob:SalesOrderBundleMaintainRequest_sync>

      <SalesOrder actionCode="02">

      <ID>2998</ID>

      <PriceAndTaxCalculation productTaxDetailsListCompleteTransmissionIndicator="true">

      <MainDiscount actionCode="04">

      <TypeCode>007</TypeCode>

      <Rate>

      <DecimalValue>0</DecimalValue>

      </Rate>

      </MainDiscount>

      <PriceComponent actionCode="01">

      <TypeCode>7PR8</TypeCode>

      <Rate>

      <DecimalValue>10</DecimalValue>

      </Rate>

      </PriceComponent>

      <ProductTaxDetails actionCode="04">

      <TaxationCharacteristicsCode listID="US">507</TaxationCharacteristicsCode>

      <TransactionCurrencyProductTax>

      <CountryCode>US</CountryCode>

      <RegionCode listID="US">OH</RegionCode>

      <JurisdictionCode listID="US">OH</JurisdictionCode>

      </TransactionCurrencyProductTax>

      </ProductTaxDetails>

      </PriceAndTaxCalculation>

      <Item actionCode="02">

      <ID>10</ID>

      <PriceAndTaxCalculationItem>

      <ItemMainDiscount>

      <TypeCode>7PR6</TypeCode>

      <Rate>

      <DecimalValue>0</DecimalValue>

      </Rate>

      </ItemMainDiscount>

      <ItemMainPrice>

      <Rate>

      <DecimalValue>3999</DecimalValue>

      </Rate>

      </ItemMainPrice>

      </PriceAndTaxCalculationItem>

      </Item>

      </SalesOrder>

      </glob:SalesOrderBundleMaintainRequest_sync>

      </soap:Body>

      </soap:Envelope>

      Author's profile photo Pascal Markwalder
      Pascal Markwalder

      Are there any tipps out there, how to test the outgoing webservices like Sales Order Confirmation , Advanced Shipping Information and Customer Invoice? I tried a view webased bins for REST testing, but came not to a solution so far.

      Author's profile photo Quyen Nguyen
      Quyen Nguyen

      Knut Heusermann , I am try to create SO with Tax code in item, but It does not work.

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:y42="http://0050053356-one-off.sap.com/Y42K2VEHY_" xmlns:a2r="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5" xmlns:glob1="http://sap.com/xi/AP/Globalization">
         <soapenv:Body>
            <glob:SalesOrderBundleMaintainRequest_sync>
               <SalesOrder>
                  <BuyerID>RS681923</BuyerID>
                  <DataOriginTypeCode>2</DataOriginTypeCode>
                  <BillToParty>
                     <PartyID>1000070</PartyID>
                     <Address>
                        <DisplayName>
                           <FormattedName>Chewy Inc.</FormattedName>
                        </DisplayName>
                        <PostalAddress>
                           <CountryCode>US</CountryCode>
                           <RegionCode>FL</RegionCode>
                           <CityName>Dania Beach</CityName>
                           <StreetPostalCode>33004</StreetPostalCode>
                           <AdditionalStreetPrefixName>Suite B-428</AdditionalStreetPrefixName>
                           <StreetName>1855 Griffin Road</StreetName>
                        </PostalAddress>
                     </Address>
                  </BillToParty>
                  <AccountParty>
                     <PartyID>1000070</PartyID>
                  </AccountParty>
                  <ProductRecipientParty>
                     <PartyID>1000070</PartyID>
                     <Address>
                        <DisplayName>
                           <FormattedName>Chewy, Inc. (IN - Clayton)</FormattedName>
                        </DisplayName>
                        <PostalAddress>
                           <CountryCode>US</CountryCode>
                           <RegionCode>IN</RegionCode>
                           <CityName>Clayton</CityName>
                           <StreetPostalCode>46118</StreetPostalCode>
                           <StreetName>1974 Innovation Blvd</StreetName>
                        </PostalAddress>
                     </Address>
                  </ProductRecipientParty>
                  <SalesUnitParty>
                     <PartyID>3100</PartyID>
                  </SalesUnitParty>
                  <TextCollection>
                     <Text>
                        <TypeCode>10024</TypeCode>
                        <ContentText>Unless agreed upon separately in writing, Chewy reserves the right to cancel any PO, in whole or in part, via line item or otherwise, or reduce quantities. Such cancelations or modifications may be made by Chewy at any time prior to shipment.</ContentText>
                     </Text>
                  </TextCollection>
                  <y42:EDI_SOURCE>1</y42:EDI_SOURCE>
                  <a2r:EDI_BILLTOCODE>DCOTAAP</a2r:EDI_BILLTOCODE>
                  <a2r:EDI_BILLTONAME>Chewy Inc.</a2r:EDI_BILLTONAME>
                  <y42:EDIReferenceKey>1087576_201902</y42:EDIReferenceKey>
                  <a2r:EDI_TRANSACTIONCONTROLNO>1172</a2r:EDI_TRANSACTIONCONTROLNO>
                  <a2r:EDI_850_TRANSTYPE>00</a2r:EDI_850_TRANSTYPE>
                  <a2r:EDI_TRANSACTIONPURPOSECODE>SA</a2r:EDI_TRANSACTIONPURPOSECODE>
                  <a2r:EDI_PONO>RS681923</a2r:EDI_PONO>
                  <a2r:EDI_PODATE>2019-05-30</a2r:EDI_PODATE>
                  <a2r:EDI_INTERNALVENDORNUMBER>8180</a2r:EDI_INTERNALVENDORNUMBER>
                  <a2r:EDI_GUESTNAME>Chewy Receiving Dept IN</a2r:EDI_GUESTNAME>
                  <a2r:EDI_GUESTCONTACTINFO>(317)-539-8531</a2r:EDI_GUESTCONTACTINFO>
                  <a2r:EDI_FREIGHTMETHODPAYMENT>PP</a2r:EDI_FREIGHTMETHODPAYMENT>
                  <a2r:EDI_FREIGHTTERMSCODE>DE</a2r:EDI_FREIGHTTERMSCODE>
                  <a2r:EDI_FREIGHTDESCRIPTION>Chewy, Inc. (IN - Clayton)</a2r:EDI_FREIGHTDESCRIPTION>
                  <a2r:EDI_MESSAGE>Unless agreed upon separately in writing, Chewy reserves the right to cancel any PO, in whole or in part, via line item or otherwise, or reduce quantities. Such cancelations or modifications may be made by Chewy at any time prior to shipment.</a2r:EDI_MESSAGE>
                  <a2r:EDI_TERMSDESCRIPTION>Net 60</a2r:EDI_TERMSDESCRIPTION>
                  <a2r:EDI_DELIVERYDATE>2019-06-15</a2r:EDI_DELIVERYDATE>
                  <a2r:EDI_INSTRUCTION>.</a2r:EDI_INSTRUCTION>
                  <a2r:EDI_NUMBEROFLINEITEMS>1</a2r:EDI_NUMBEROFLINEITEMS>
                  <a2r:EDI_SHIPTOCODE>CFC1</a2r:EDI_SHIPTOCODE>
                  <Item>
                     <ID>10000</ID>
                     <ItemProduct>
                        <ProductInternalID>100-30502-01</ProductInternalID>
                        <UnitOfMeasure>EA</UnitOfMeasure>
                     </ItemProduct>
                     <ItemScheduleLine>
                        <Quantity>12.00</Quantity>
                     </ItemScheduleLine>
                   <PriceAndTaxCalculationItem>
                      <CountryCode>US</CountryCode>
                      <TaxationCharacteristicsCode listID="US">509</TaxationCharacteristicsCode>
                      <TaxJurisdictionCode listID="US">CA</TaxJurisdictionCode>
                  </PriceAndTaxCalculationItem>
                     <p4:EDI_850DTL_UNITPRICE xmlns:p4="http://0050053356-one-off.sap.com/Y42K2VEHY_">74.9700</p4:EDI_850DTL_UNITPRICE>
                     <p5:ChewyItemNo xmlns:p5="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5">850522005430</p5:ChewyItemNo>
                     <pB:EDI_PRODUCTCODE1 xmlns:pB="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5">100-30502-01</pB:EDI_PRODUCTCODE1>
                     <pC:EDI_PRODUCTCODE2 xmlns:pC="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5">111012</pC:EDI_PRODUCTCODE2>
                     <pD:EDI_PRODUCTCODE3 xmlns:pD="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5">850522005430</pD:EDI_PRODUCTCODE3>
                     <pF:EDI_PRODUCTCODEQUALIFIER1 xmlns:pF="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5">VN</pF:EDI_PRODUCTCODEQUALIFIER1>
                     <p10:EDI_PRODUCTCODEQUALIFIER2 xmlns:p10="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5">SK</p10:EDI_PRODUCTCODEQUALIFIER2>
                     <p11:EDI_PRODUCTCODEQUALIFIER3 xmlns:p11="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5">UK</p11:EDI_PRODUCTCODEQUALIFIER3>
                     <p13:EDI_PRODUCTDESCRIPTION xmlns:p13="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5">WHISTLE 3 DOG/CAT GPS LOC ACTVTY TRCKR</p13:EDI_PRODUCTDESCRIPTION>
                     <p14:EDI_Quantity xmlns:p14="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5">12.00</p14:EDI_Quantity>
                     <p15:EDI_UNITPRICE xmlns:p15="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5">74.9700</p15:EDI_UNITPRICE>
                     <p16:EDI_UOM xmlns:p16="http://sap.com/xi/AP/CustomerExtension/BYD/A2RN5">EA</p16:EDI_UOM>
                  </Item>
               </SalesOrder>
            </glob:SalesOrderBundleMaintainRequest_sync>
         </soapenv:Body>
      </soapenv:Envelope>

      How can I create Tax code 509 in line item ?

       

      Regards

      Quyen

       

      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Hi Quyen,

      your xml looks good. What error message do you get?

      Regards,
      Knut

      Author's profile photo Quyen Nguyen
      Quyen Nguyen

      Hi Knut Heusermann,

      <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
         <soap-env:Header/>
         <soap-env:Body>
            <n0:SalesOrderBundleMaintainConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:LBK:/1SAI/TAE88DF3AA925C3E49C60CC:804">
               <SalesOrder>
                  <ChangeStateID>20190617030113.4121060</ChangeStateID>
                  <UUID>00163e8c-bb8a-1ee9-a495-84d8c9596567</UUID>
                  <ID>23901</ID>
               </SalesOrder>
               <Log>
                  <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
                  <Item>
                     <TypeID>017(/CL_CDA_ORGPT/)</TypeID>
                     <CategoryCode>INC.BOI</CategoryCode>
                     <SeverityCode>2</SeverityCode>
                     <Note>1 additional sales areas exist for organizational unit 3100 (Sales)</Note>
                  </Item>
                  <Item>
                     <TypeID>153(/CL_CDA_DOCIT/)</TypeID>
                     <CategoryCode>ENV.CBM</CategoryCode>
                     <SeverityCode>2</SeverityCode>
                     <Note>Gross weight for product missing</Note>
                  </Item>
                  <Item>
                     <TypeID>152(/CL_CDA_DOCIT/)</TypeID>
                     <CategoryCode>ENV.CBM</CategoryCode>
                     <SeverityCode>2</SeverityCode>
                     <Note>Net weight for product missing</Note>
                  </Item>
                  <Item>
                     <TypeID>151(/CL_CDA_DOCIT/)</TypeID>
                     <CategoryCode>ENV.CBM</CategoryCode>
                     <SeverityCode>2</SeverityCode>
                     <Note>Net volume for product missing</Note>
                  </Item>
                  <Item>
                     <TypeID>094(/AP_ESI_COMMON/)</TypeID>
                     <CategoryCode>SEI.FSI</CategoryCode>
                     <SeverityCode>1</SeverityCode>
                     <Note>Action Release not possible; action is disabled</Note>
                  </Item>
                  <Item>
                     <TypeID>001(/Y42K2VEHY_6148F69504/)</TypeID>
                     <CategoryCode>INC.BOI</CategoryCode>
                     <SeverityCode>3</SeverityCode>
                     <Note>Material 100-30502-01 :The Price List was overridden by EDI UnitPrice 74.9700</Note>
                  </Item>
               </Log>
            </n0:SalesOrderBundleMaintainConfirmation_sync>
         </soap-env:Body>
      </soap-env:Envelope>

      This is my response.

      Can you help me check what happened ?

      my343515.sapbydesign.com : test site

      Regards,

      Quyen

       

       

      Author's profile photo Kathrin Dietrich
      Kathrin Dietrich

      Hello Quyen,

      the first 5 messages are warning/info messages. Only the last message is an error message that prevents the update being successful. This error is not triggered from the Standard but is raised from the Add-On Y42K2VEHY_.

      with kind regards,

      Kathrin

      Author's profile photo François-Xavier LEPOUTRE
      François-Xavier LEPOUTRE

      Hi Knut Heusermann ,

      Very useful blog post to understand the differences between the webservices, thanks.

      Using the webservices API to create eCommerce orders, we are missing two important things:

      1. Duplicate check (to make sure that we don't input same order twice).
      2. Messages visibility in "Business Communication Monitoring".

      Is this normal ? Any hint on how to achieve the same?

      Thanks,

      FX

      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Hi François-Xavier,

      Duplicate check:

      Web service APIs support idem potency to avoid creating duplicates by accident. If the Web service consumer fills the UUID element of the BasicMessageHeader message element, the server returns the cached response if the same UUID is received within a short time period. This allows the consumer to perform multiple retries in case the original response did not reach the consumer in time. Responses for requests with a filled UUID are cached for 2-4 hours.

      Example message header:

      <BasicMessageHeader>
        <UUID>f81d4fae-7dec-1d0-a765-00a0c91e6bf6</UUID>
      </BasicMessageHeader>

      Beyond idem potency you can avoid creating duplicates by providing the corresponding key elements and using action code "01 - create". Using action code 01 the system returns an error message if a business object with the same key already exists.

      Monitoring:

      In general synchronous Web Service APIs may result in the following states:

      1. ByD rejects the web service request (e.g. the user is unauthorised or the xml is not formatted according the web service definition). You find detailed error messages about rejected web service calls in work center view "Business Communication Monitor" by choosing "Rejected Web Service Calls" or via API ReadBusinessDocumentMonitoringInformationIn.
      2. ByD accepts the web service request and sends a response (the system technically processes the web service request successfully). The response may have 3 different max. severity codes:
        • 1 - Information => The business object has been saved accoding the request.
        • 2 - Warnings => The business object has been saved, but the result may deviate from the service request (e.g. the customer invoice request has been created but could not be released).
        • 3 - Error => Application error - nothing has been saved.

      You can monitor synchronous Web Service APIs on 3 ways:

      1. Work center view "Business Communication Monitor" - Rejected web services.
      2. Retrieve rejected web service messages via APIs ReadBusinessDocumentMonitoringInformationIn and QueryBusinessDocumentMessageIn.
      3. Work center view and report "Communication Usage".

      Best regards,
      Knut

      Author's profile photo François-Xavier LEPOUTRE
      François-Xavier LEPOUTRE

      Hi Knut Heusermann,

      About the duplicate check, indeed, the UUID works well, thanks a lot for the tip.

      By the way, I just ran on an unanswered question here that asks the same question and why it won't work with the message ID (while the documentation says it should) ?

      About the monitoring:

      - “Business Communication Monitor” – "Rejected web services." shows only the rejected webservices calls, and not the valid ones.

      - APIs ReadBusinessDocumentMonitoringInformationIn and QueryBusinessDocumentMessageIn seem to behave the same as above, even if I can see a few more messages (but still not successful Sales Orders webservice calls).

      - Work center view and report “Communication Usage” show only statistical elements, and unfortunately counters remain at 0, there is no data, would that be a bug ?

      Isn't there any way to list all messages, not only the valid ones ?

      Thanks a lot,

      Author's profile photo Ronel Munoz
      Ronel Munoz

      HI Knut Heusermann I would like to know something more about sales order. I was assigned to a task that will response all the “Extended View” thing in Document Flow, but unfortunately I don’t really know what kind of API that I will use and i still don’t know how to perfectly use them. I hope you can help me with this issue. Thanks

       

      Best Regards,

      Ronel

      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Hi Ronel,

      using APIs you cannot access the UI document flow directly, but most transcational business objects have node refering to business transaction documents. These node reflect the relation between documents and can be used to get the information that you see in the UI as document flow.

      Best regards,
      Knut

      Author's profile photo Ronel Munoz
      Ronel Munoz

      Hi Knut Heusermann

       

      Is there a list of nodes or cheat codes for those nodes that I can use/check that might help me to come up with a better solution in showing "Extended View" in Byd. Thank you!

       

      Best Regards,

      Ronel

      Author's profile photo SAMUELE BARZAGHI
      SAMUELE BARZAGHI

      Hi,

      Is possible to create a sales order item with reference to a contract via SOAP or oData?

      Thank you

      Best Regards,

      Sam

       

      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Hi Samuele,

      I did not test this myself so far, but using OData you could try the action “AddReferenceWithDataProvision” (you find a similar example in my Postman collection "Reference Scenario/Field Service and Repair") and using SOAP the nodes “BusinessTransactionDocumentReference” and “ItemBusinessTransactionDocumentReference” would be the elements to look for.

      Best regards, Knut

      Author's profile photo May Thitsa Oo
      May Thitsa Oo

      Hello Knut,

      For the Internet Order (OriginTypeCode = 4), if I answer the scoping question

      “Would you like your employees to control the release of sales orders that originate from an E-Shop  in order to initiate order processing?” with

      Yes (in scope), I get result sales order is "In Preparation" and need manual release via ByD UI .

      No, I get result sales order is "Open".

      Which seems opposite as your blog content.

      Below is my current setting which get "Open" sales order.

      Scope
      Please correct me if I am wrong.

      Scope

      Thanks and Regards,

      May

      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Hi May,

      yes you are right - I corrected my blog post. Thanks for the hint.

      Knut

      Author's profile photo Eric Fernando Vergara Damacen
      Eric Fernando Vergara Damacen

      Hello Knut.

      Just a doubt about the number of line items SKU can be handled for Sales Orders.
      Can you give me a perspective from your experience? Considering daily, weekly, and monthly numbers. Take an example considering to handle big amounts line items (like 8 million per month) what is the best way to load.

      Thanks in advance for your answer.

      Eric Vergara

      Author's profile photo Mas Muhammad
      Mas Muhammad

      if we can create or update customerinvoice from odata it would be great. because some limit creating from service. we can not custom document reference.

      Author's profile photo Knut Heusermann
      Knut Heusermann
      Blog Post Author

      Hi Mas,

      please submit an incident to request the OData write-enablement to the elements of customer invoice requests and customer invoices that you need?
      You find more details in blog post https://blogs.sap.com/2017/10/02/sap-bydesign-public-solution-model/.

      Thanks and best regards,
      Knut

      Author's profile photo Mas Muhammad
      Mas Muhammad

      Thanks for replayed. but SAP Team said "Since the btd reference is used to build up the doc flow in the system, we don't allow it to be added externally. This is so that we can ensure the integrity of the doc flow and the communication between the documents. If we allow references to be added externally, we could not ensure that the correct information is passed to the FIN area, for example, and this could cause significant issues.".

      So, Since Customer Invoice can not custom document reference from Odata or Webservice. They suggest us to create customer invoice manually from ByD.

      Author's profile photo Nathalie LAMPERIN
      Nathalie LAMPERIN

      Hello,

      is it possible to populate the information regarding invoice schedule, item per item, based on Invoicing time frame or project milestone ? We did not find the right nodes to mention these information.

      If it is not possible with the available web service, what can we do ?

      Please find below our request

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
      <soapenv:Header/>
      <soapenv:Body>
      <glob:SalesOrderBundleMaintainRequest_sync>
      <BasicMessageHeader>
      </BasicMessageHeader>
      <SalesOrder actionCode="01">
      <!--<ID>238</ID>-->
      <BuyerID>TEST WS1</BuyerID>
      <Name languageCode="FR">TEST WS1</Name>
      <ReleaseAllItemsToExecution>false</ReleaseAllItemsToExecution>
      <EmployeeResponsibleParty>
      <PartyID>8000000000</PartyID>
      </EmployeeResponsibleParty>
      <SalesUnitParty actionCode="04">
      <PartyID>E01006</PartyID>
      </SalesUnitParty>
      <AccountParty actionCode="04">
      <PartyID>1000031</PartyID>
      </AccountParty>
      <PricingTerms actionCode="04">
      <CurrencyCode>EUR</CurrencyCode>
      <PriceDateTime timeZoneCode="CET">2021-10-28T07:52:43Z</PriceDateTime>
      <GrossAmountIndicator>false</GrossAmountIndicator>
      </PricingTerms>
      <Item actionCode="04">
      <ID>101</ID>
      <ProcessingTypeCode>TPFP</ProcessingTypeCode>
      <ReleaseToExecute>false</ReleaseToExecute>
      <ItemProduct>
      <ProductID>200012</ProductID>
      </ItemProduct>
      <ItemServiceTerms>
      <ProjectTaskID>FR-UBI13-01</ProjectTaskID>
      </ItemServiceTerms>
      <ItemScheduleLine actionCode="04">
      <ID>1</ID>
      <TypeCode>1</TypeCode>
      <Quantity unitCode="EA">1.0</Quantity>
      </ItemScheduleLine>
      <PriceAndTaxCalculationItem itemPriceComponentListCompleteTransmissionIndicator="true" itemProductTaxDetailsListCompleteTransmissionIndicator="true">
      <CountryCode>FR</CountryCode>
      <TaxationCharacteristicsCode listID="FR">510</TaxationCharacteristicsCode>
      <TaxJurisdictionCode></TaxJurisdictionCode>
      <ItemMainPrice >
      <Description languageCode="EN">List Price</Description>
      <Rate>
      <DecimalValue>5290.0</DecimalValue>
      <CurrencyCode>EUR</CurrencyCode>
      <BaseDecimalValue>1.0</BaseDecimalValue>
      <BaseMeasureUnitCode>EA</BaseMeasureUnitCode>
      </Rate>
      <RateBaseQuantityTypeCode>EA</RateBaseQuantityTypeCode>
      </ItemMainPrice>
      </PriceAndTaxCalculationItem>
      </Item>
      </SalesOrder>
      </glob:SalesOrderBundleMaintainRequest_sync>
      </soapenv:Body>
      </soapenv:Envelope>

      Thanks

      Nathalie

       

      Author's profile photo Simon Oehlenschlaeger
      Simon Oehlenschlaeger

      Hi Knut Heusermann

      Thanks for your great blog! I have successfully created a sales order via web service.
      I am wondering if it is possible to create multiple Schedule Lines with this request (ID 1 and ID 2)?
      In my example, only the first Schedule Line is created.

      BR
      Simon

      Author's profile photo Benjamin Cadoche
      Benjamin Cadoche

      Hi Knut Heusermann ,

      I looked everywhere but couldn't find how to use the Product Standard ID in the B2B Communication Sales order creation.

      Is there a way to pass the Product EAN in the sales order as the main identifier ?