Skip to Content

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.

To report this post you need to login first.

34 Comments

You must be Logged on to comment or reply to a post.

  1. 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

    (1) 
    1. Anand Deth. G
      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

      (1) 
    1. Anand Deth. G
      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

      (1) 
  2. 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>

    (0) 
    1. Anand Deth. G
      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

      (0) 
  3. 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!

    (1) 
    1. Anand Deth. G
      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

      (1) 
      1. 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

        (0) 
  4. 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

    (0) 
    1. Anand Deth. G
      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

      (1) 
      1. 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

         

        (0) 
        1. Anand Deth. G
          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

          (0) 
  5. 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

    (1) 
  6. 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

    (0) 
    1. Anand Deth. G
      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

      (0) 
        1. Anand Deth. G
          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

          (1) 
          1. 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

            (0) 
            1. Anand Deth. G
              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

               

              (0) 
            2. Anand Deth. G
              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

              (0) 
              1. 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

                (0) 
                1. 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

                  (0) 
  7. 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

    (0) 
  8. 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

     

    (0) 

Leave a Reply