Skip to Content
Author's profile photo Anand Deth G

Create Third-Party and Standard Inbound Delivery Notification via Webservice

Update : In our 1808 release we have provided ManageStandardInboundDeliveryNotificationIn and ManageThirdPartyOrderDeliveryNotificationIn webservices as standard via which you will be able to create  Inbound Delivery Notifications against standard purchase orders or third-party order processing purchase orders. For versions below 1808 you can use the below given setup to continue created delivery notifications.

 

Many of our customers have been reaching out to us requesting for an option to create and release Third-Party(TPOP) Inbound delivery notification via web-service. This blog will explain how you will be able to create a TPOP or a standard IDN through web-service.

Pre-Requisite:

You should create a communication arrangement with the communication scenario “Input of Advanced Shipping Notification”. Make sure that the “Application Protocol” field has the value Web Service and not SAP NetWeaver XI 3.0. The value in this field would be SAP NetWeaver by default. You will have to change the value to Web-service by entering the value 5 in the Application Protocol field.

Once you hit enter the value will be update to Web Service as shown in the screen shot below.

Once the communication arrangement is created and is active, navigate to the  Edit Advanced Settings screen of the same communication arrangement to access the Service URL and the WSDL via which we will execute the scenario.

Third Party Inbound Delivery Notification:

Use the below XML format to create Inbound Delivery notification for your Third-Party Purchase order. Additional fields/tags can be added from the WSDL file that you have downloaded from the newly created communication arrangement

I have provided the above XML is text format so that it is possible to copy the payload from here.

<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:DeliveryDespatchAdviceNotification>
<MessageHeader>
<CreationDateTime>2017-03-23T02:03:00.0000000Z</CreationDateTime>
<SenderParty>
<InternalID schemeID=”CommunicationPartyID” schemeAgencyID=”_LOCAL_SYSTEM_ALIAS_SAP_INTERNAL_CONSTANT_VALUE_”>Partner_ID</InternalID>
<!–Communication Partner Id(available from Communication Arrangement) :–>
</SenderParty>
<RecipientParty>
<InternalID schemeID=”CommunicationPartyID” schemeAgencyID=”_LOCAL_SYSTEM_ALIAS_SAP_INTERNAL_CONSTANT_VALUE_”>Company_ID</InternalID>
<!–Company ID :–>
</RecipientParty>
</MessageHeader>
<DeliveryDespatchAdvice reconciliationPeriodCounterValue=”1″ actionCode=”01″>
<ID>IDN_ID</ID> <!– Delivery Notification Id :–>
<TypeCode>TPDI</TypeCode> <!– Code Indicated the IDN should be created for Third Party Purchase Order :–>
<CancellationDocumentIndicator>false</CancellationDocumentIndicator>
<VendorParty>
<InternalID>Supplier_ID</InternalID>
<!–Supplier Id :–>
</VendorParty>
<ProductRecipientParty>
<InternalID>Ship_to_party_ID</InternalID>
<!–Ship-To Party :–>
</ProductRecipientParty>
<Item>
<CancellationDocumentIndicator>false</CancellationDocumentIndicator>
<ID>10</ID> <!– Line Item Id for IDN :–>
<TypeCode>14</TypeCode> <!– Do not Change :–>
<DeliveryQuantity unitCode=”EA”>10</DeliveryQuantity> <!– Quantity:–>
<DeliveryQuantityTypeCode>EA</DeliveryQuantityTypeCode> <!– UoM Code :–>
<Product>
<BuyerID>Product_ID</BuyerID> <!– Product Id :–>
<TypeCode>1</TypeCode>
</Product>
<OriginPurchaseOrderReference>
<ID>PO_ID</ID> <!– Purchase Order Id :–>
<TypeCode>001</TypeCode> <!– Do not Change :–>
<ItemID>1</ItemID> <!– corresponding line item id in purchase order :–>
</OriginPurchaseOrderReference>
</Item>
</DeliveryDespatchAdvice>
</glob:DeliveryDespatchAdviceNotification>
</soap:Body>
</soap:Envelope>

Once the above XML is executed you can see that the system would have created and released a TPOP Inbound delivery notification.

Standard Inbound Delivery Notification:

You can use the below XML code to create an inbound delivery notification for a standard Purchase Order.  The only difference you will find is for the value inside the tag <TypeCode>SD</TypeCode> . The rest of the values are identical to the above provided XML.

You can add the tags as per your requirement to the above XML. If there are any more queries on the same please do reach out to me in the comments section.

Assigned tags

      41 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Kopal Upadhyay
      Kopal Upadhyay

      Nice Blog Anand..Very Informative..:)

       

      Author's profile photo pole star
      pole star

      Great Blog .

      I think Input of Advanced Shipping Notification is a B2B service.

      A2X services are Synchronous services, in that the response is send back in the same call. Whereas B2B services are Asynchronous services, no response is send back in the same call, but response can only be viewed via business communication monitor.

      So, how can I know this process is successful or fail if the third party user don't access to view business communication monitor.

      Best Regards,

      Pole

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Pole,

      You are right about the behavior of synchronous and asynchronous messages. Other than checking in the Business Communication Monitoring, the end user will not be able to identify the success of the message sent. We are currently working with one of our customers for exactly the same issue where they have used custom web-service exactly due to the above mentioned reason. We are currently in touch with the technical team to try and identify if any refinement can be done from our side to make sure the custom web-service from the customer end get the relevant response required. However, if you are using the above standard web-services you will not be getting a response once you trigger the web-service.

      I  hope this helps.

      Regards,

      Anand

      Author's profile photo pole star
      pole star

      Dear Anand ,

       

      I got it .

      Thanks your information.

       

      Best Regards,

      Pole

       

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Pole,

      You are welcome.  Please feel free to discuss your issues in the ByD system in the community space and we will try and help you from our end.

      Regards,

      Anand

      Author's profile photo Olli Paavola
      Olli Paavola

      Very good post!

       

      Regarding passing logistics measurements with this webservice. It seems that you can pass with payload Gross kgs and Gross volume and the same in nets, but there are no fields visible in UI for net-measurements in delivery notifications. Do you happen to have an idea how these could be achieved without interfering with SDK?

      These are the payload tags:

      <GrossVolumeMeasure unitCode="MTQ">2</GrossVolumeMeasure>
      <!--Optional:-->
      <NetVolumeMeasure unitCode="MTQ">1</NetVolumeMeasure>
      <!--Optional:-->
      <NetWeightMeasure unitCode="KGM">10</NetWeightMeasure>
      <!--Optional:-->
      <GrossWeightMeasure unitCode="KGM">15</GrossWeightMeasure>

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Hi Olli,

      I will have a look into the same and get back to you. Apologies for the delay.

      Regards,

      Anand

      Author's profile photo Jimmy Belmans
      Jimmy Belmans

      HI

      Do you have any suggestion on how to use the web service for creating an excel template which will be used for uploading IDN?

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Jimmy,

      I am not an expert in excel templates, however you can have an excel template created mapping the fields of the XML payload and invoke the above web-service. This can be done, but how this can be done needs to be further discussed with members who have had exposure in mapping the XML file to excel.

      Regards,

      Anand

      Author's profile photo Victor Trejo
      Victor Trejo

      Hi experts,

      I am trying to do the implementation but I cant find  the scenario “Input of Advanced Shipping Notification”, I dont know if I need to activate something in scope.

      Regards!

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Victor,

      Have you checked the scenario under the Communication Arrangements view available in Application and User Management work center? If it is not available you will have to create a New one from the available New button. I hope this helps.

      Regards,

      Anand

      Author's profile photo Victor Trejo
      Victor Trejo

      Hi Anand,

      Thank you for the answer, Yes I have checked under  Communication Arrangements view and I didnt find the scenario, when I try to create it manually I cant find the service in service explorer view, and directly in SAP Cloud Applications Studio the communication scenario dont show me this service, the service that I am looking for is : inbounddeliveryprocessingdeliv
      Dou you have any suggest?

      Thanks and Regards.

      Victor Hugo

      Author's profile photo Quyen Nguyen
      Quyen Nguyen

      Dear Anand,

      Can you help me check my request ?

      I try to create Delivery , but it is not successful.

       

       

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
      	<soapenv:Header/>
      	<soapenv:Body>
      		<glob:DeliveryDespatchAdviceNotification>
      			<MessageHeader>
      				<CreationDateTime>2018-05-10T02:03:00.0000000Z</CreationDateTime>
      				<SenderParty>
      					<InternalID schemeID="CommunicationPartyID" schemeAgencyID="_LOCAL_SYSTEM_ALIAS_SAP_INTERNAL_CONSTANT_VALUE_">CP100140</InternalID>
      				</SenderParty>
      				<RecipientParty>
      					<InternalID schemeID="CommunicationPartyID" schemeAgencyID="_LOCAL_SYSTEM_ALIAS_SAP_INTERNAL_CONSTANT_VALUE_">1000000</InternalID>
      				</RecipientParty>
      			</MessageHeader>
      			<DeliveryDespatchAdvice actionCode="01" reconciliationPeriodCounterValue="1">
      				<ID>ALK-C1</ID>
      				<TypeCode>TPDI</TypeCode>
      				<CancellationDocumentIndicator>false</CancellationDocumentIndicator>
      				<VendorParty>
      					<InternalID>1000</InternalID>
      				</VendorParty>
      				<ProductRecipientParty>
      					<InternalID>CP100140</InternalID>
      				</ProductRecipientParty>
      				<Item>
      					<CancellationDocumentIndicator>false</CancellationDocumentIndicator>
      					<ID>10</ID>
      					<TypeCode>14</TypeCode>
      					<DeliveryQuantity unitCode="EA">10</DeliveryQuantity>
      
      					<DeliveryQuantityTypeCode>EA</DeliveryQuantityTypeCode>
      					<Product>
      						<BuyerID>P100101</BuyerID>
      						<TypeCode>1</TypeCode>
      					</Product>
      				</Item>
      			</DeliveryDespatchAdvice>
      		</glob:DeliveryDespatchAdviceNotification>
      	</soapenv:Body>
      </soapenv:Envelope>

      Thank and Regards

      Q.Cuong

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Q. Cuong,

      Do you get any error message ? what is the response that you get while consuming the above XML.

      Regards,

      Anand

      Author's profile photo Quyen Nguyen
      Quyen Nguyen

      Dear Anand,

      Nothing response, I also checked on communication monitor.

      I try to create Delivery without create PO. Is it possible ?

       

      Regards,

      Q.Cuong

       

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Quyen,

      You will not be able to create a stand alone inbound delivery document without a purchase order. Please try if against a purchase order you are able to successfully create the delivery notifications.

      Regards,
      Anand

      Author's profile photo Quyen Nguyen
      Quyen Nguyen

      I am successful create the delivery

      Thank You  Anand.

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Welcome Quyen !!! Glad to have helped you out.

      Author's profile photo Pablo Menth
      Pablo Menth

      Thank you Anand for sharing this valuable information!

      It helped me a lot to set up a third-party integration scenarion.

       

      Here are two additional pieces of information for readers:

      • In the message header, you can use the schemeAgencyID="310", that means it refers to an SAP scheme (_LOCAL_SYSTEM_ALIAS_SAP_INTERNAL_CONSTANT_VALUE_ didn't work for me)
      • To check the result of your test messages (requests), see the following logs (ascending with your message quality)
        • Application and User Management > Business Communication Monitoring > Rejected Web Service calls
        • Application and User Management > Business Communication Monitoring > Business Messages with Errors
        • Application and User Management > Process Communication Errors > Open Errors with Tasks

      Best Regards
      Pablo

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Pablo,

      Thank you for pointing out the above.

      Cheers !!!

      Regards,

      Anand

      Author's profile photo Manuel Peschke
      Manuel Peschke

      Hi Anand Deth. G ,

       

      Thanks for this blog post. It helped a lot to get the webservice working!

       

      However, we have the requirement to add an extension field on line item level to the DeliveryDespatchAdviceNotification webservice.

      The extension field has been originally created in Sales Orders lines item and been extended to the Outbound Delivery line items.

      When I go into adaption mode in the Outbound Delivery and go into "Further Usage" for this extension field, I can't see the option to extend it to he DeliveryDespatchAdviceNotification webservice:

       

      I also tried to extend it to the Advanced Shipping Notification form, however, the field won't show up in the MainSchema.xsd and I also can't add it via Easy Form Editor. The "Add" button is greyed out:

       

      It seems I can only add extension fields on header level to the ASN, but not on item level.

      Is there a restriction?

       

      I have also opened ticket # 3500432227 for this issue.

       

      Thanks,

      Manuel

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

       

      Hi Manuel,

      Ideally this should be possible and we would not have a mandated restriction here. I will check if we can make some changes to get this fixed or not. I will request my colleague to update you via the above mentioned incident with the details.

      Regards,

      Anand

      Author's profile photo Manuel Peschke
      Manuel Peschke

      Thanks Anand, I'll stay tuned!

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Manuel,

      I have update the new standard webservices we have introduced in 1808 release. If your test system has been upgraded to 1808 would you test and check if your issue is not occurring in the new web-services provided ?

      Regards,
      Anand

      Author's profile photo Manuel Peschke
      Manuel Peschke

      Dear Anand,

      Great, thanks for the quick turnaround! Yes, my test system has been upgraded to 1808 already.

      However, I'm still unable to see the extension field on line item level on the webservice WSDL nor on the form main scheme.

      Do I need to create a new extension field, extended to the OD after you applied the fix?

      Can you confirm that once the extension field has been added to the ASN form it will also be available in the ASN webservice?

      I'm also happy to discuss this directly with you over phone or email as this might get too specific for this forum 🙂

       

      Thanks,

      Manuel

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Manuel,

      I will check the status on the extension field fix and reach out to you. I will reach out to you once I get an update on the extension filed.

      Regards,

      Anand

       

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Manuel,

      The form template part of the issue will be fixed via a software correction as I can see from the incident. The details of when the deployment is updated in the incident. I will check back and update you on the "not being able to extend the extension field to the DDAN web-service. Have you tried to extend the field to standard web-services that has been provided ? If not would you try it ?

      Regards,

      Anand

      Author's profile photo Manuel Peschke
      Manuel Peschke

      Hi Anand,

      Unfortunately the ASN webservice is not available in the services tab of the "Further Usage/Extensibility" screen.

      However, I remember that Saira Nadaf told me once that if you extend the field to the ASN form, it will also be available in the ASN webservice. But maybe my memory is wrong... would be great if you could clarify that.

      Thanks for your help!

      Regards,

      Manuel

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Hi Manuel,

      I will check and get back.

      Regards,

      Anand

      Author's profile photo Vinit Kumar
      Vinit Kumar

      Hi Manuel,
      On adding extension field to the ASN form only the ASN form message schema is extended, not the ASN web-service.
      Unfortunately ASN web-service is not extensible.

      Best Regards,
      Vinit

      Author's profile photo Manuel Peschke
      Manuel Peschke

      Hi Vinit,

      Good to hear from you!

      Thanks for the clarification, we might process the "form XML" then for EDI as workaround.

      However, I've created an idea in the influence forum, to enable the ASN web service for extensibility: https://influence.sap.com/sap/ino/#/idea/216532

      Best regards,

      Manuel

      Author's profile photo Zsolt Peto
      Zsolt Peto

      Hi Anand,

       

      Great stuff!

      Do you know if the latest release changed anything on this area as we are creating the IDN successfully which we used to release also with a web service message but now it is not working even if we have warnings or none.

      Kind Regards,

      Zsolt

      Author's profile photo Tomomichi Kawashima
      Tomomichi Kawashima

      Hi Anand,

      This post helps me lot. Thank you.

       

      Do you have any API that allows me to update/change existing third-party delivery notification?

      We are using add-on API which generate third-party delivery notification with none released status.

      And sometimes we need to update/change item level information.

       

      Best Regards,

      Tomo

       

      Author's profile photo Quyen Nguyen
      Quyen Nguyen

      Hi Anand Deth. G,

      Do Sap have any services to update inbound delivery ?

      Best Regards,

      Quyen

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Quyen,

      No, there is no service that directly updates the Inbound delivery.

      Regards,

      Anand

      Author's profile photo Quyen Nguyen
      Quyen Nguyen

      Can I use SDK to update Inbound Delivery ?

      Thanks,

      Quyen

      Author's profile photo Usama Ilyas
      Usama Ilyas

      HI Dear Anand,

      Do Sap have any services to update the partially confirm the Inbound Delivery.

      My requirement is my customer wants to confirm Inbound Delivery in two Pass.

       

      Best Regards

      Usama Ilyas

      Author's profile photo Anand Deth. G
      Anand Deth. G
      Blog Post Author

      Dear Usama,

      Have you tried partial confirmation via the the standard available web-service. Did you get any errors while trying the same?

      Regards,

      Anand

      Author's profile photo Usama Ilyas
      Usama Ilyas

      Hi Anand,

      Yes, It is working and updating the partial confirmation but in our case now we have to confirm the remaining the quantity, but the standard Web Service is not confirming and not creating the Inbound Document.

      When we execute the confirmation with the remaining Quantity, we are getting an Error

      The inbound delivery already exists; update is not permitted.

      We are using this WebService "inbounddeliveryexecutionin" do we need to use some other Web Service ?

      Here is the XML request with remaining quantity.

      <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:InboundDeliveryExecutionConfirmation>
               <MessageHeader>
                  <CreationDateTime>2019-03-13T21:12:20.2946763Z</CreationDateTime>
                  <SenderParty>
                     <InternalID schemeID="CommunicationPartyID" schemeAgencyID="_LOCAL_SYSTEM_ALIAS_SAP_INTERNAL_CONSTANT_VALUE_">1009626</InternalID>
                     <StandardID schemeAgencyID="9">12345678910</StandardID>
                  </SenderParty>
                  <RecipientParty>
                     <InternalID schemeID="CommunicationPartyID" schemeAgencyID="_LOCAL_SYSTEM_ALIAS_SAP_INTERNAL_CONSTANT_VALUE_">10</InternalID>
                     <StandardID schemeAgencyID="9">963852741</StandardID>
                  </RecipientParty>
               </MessageHeader>
               <InboundDeliveryExecution>
                  <ID>RO-67</ID>
                  <VendorID>210148</VendorID>
                  <TypeCode>1566</TypeCode>
                  <VendorParty>
                     <InternalID>1000011</InternalID>
                  </VendorParty>
                  <ProductRecipientParty>
                     <InternalID>10</InternalID>
                  </ProductRecipientParty>
                  <ShipToLocation>
                     <InternalID>400</InternalID>
                  </ShipToLocation>
                  <ArrivalDateTimePeriod>
                     <StartDateTime timeZoneCode="UTC">2019-03-11T02:00:00Z</StartDateTime>
                     <EndDateTime timeZoneCode="UTC">2019-03-11T02:00:00Z</EndDateTime>
                  </ArrivalDateTimePeriod>
                  <SenderLastChangeDateTime>2019-03-11T02:00:00Z</SenderLastChangeDateTime>
                  <Item>
                     <ID>1</ID>
                     <VendorID>1</VendorID>
                     <PurchaseOrderReference>
                        <ID>67</ID>
                        <TypeCode>001</TypeCode>
                        <ItemID>1</ItemID>
                        <ItemTypeCode>18</ItemTypeCode>
                     </PurchaseOrderReference>
                     <Product>
                        <InternalID>100-30502-01</InternalID>
                        <TypeCode>1</TypeCode>
                     </Product>
                     <DeliveryQuantity unitCode="EA">7</DeliveryQuantity>
                     <DeliveryQuantityTypeCode>EA</DeliveryQuantityTypeCode>
                     <DeliveryNoteQuantity unitCode="EA">7</DeliveryNoteQuantity>
                     <DeliveryNoteQuantityTypeCode>EA</DeliveryNoteQuantityTypeCode>
                  </Item>
                  <Material>
                     <ItemID>1</ItemID>
                     <DeliveryQuantity unitCode="EA">7</DeliveryQuantity>
                     <DeliveryQuantityTypeCode>EA</DeliveryQuantityTypeCode>
                  </Material>
               </InboundDeliveryExecution>
            </glob:InboundDeliveryExecutionConfirmation>
         </soap:Body>
      </soap:Envelope>
      
      
      Author's profile photo Usama Ilyas
      Usama Ilyas

      Hi Anand,

      Can you please help us out on this?

       

      Thanks

       

      Author's profile photo Dileep Vella
      Dileep Vella

      Hi Anand

       

      I am getting below error while trying to trigger TPOT Request

       

      <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
      <env:Header/>
      <env:Body>
      <n0:ThirdPartyOrderDeliveryNotificationMaintainBundleConfirmation_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:LEE:/1SAI/TAEF00495C31A96C173ABFB:804">
      <Log>
      <MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
      <Item>
      <TypeID>002(/A2X_INB_NOTIF/)</TypeID>
      <SeverityCode>3</SeverityCode>
      <Note>Action not supported within IDN 221201</Note>
      </Item>
      </Log>
      </n0:ThirdPartyOrderDeliveryNotificationMaintainBundleConfirmation_sync>
      </env:Body>
      </env:Envelope>

       

      I need to know why I am getting the above error. is this related to any configuration issue?

       

      Thanks,

      Dileep.