This knowledge snippet is a continuation of the previous one titled, S4HCKS16 Taking the pain out of integration – by design in SAP S/4HANA Cloud . For it to make any sense, you will likely need to see the previous one first.

We essentially build on the previous episode where we discussed API’s integration and in particular looked at setting up and testing the sales order integration API in SAP S/4HANA Cloud. Up to this point we are able to create sales orders in our S/4HANA Cloud system. We now want to extend this process and leverage the ‘Customer Expected Price’ functionality, for which specific scope items were released in the 1711 version.

The Customer Expected Price, provides the functionality required to verify and make sure that you and your business partners see eye to eye on the price of a product (the price at which he is buying it from you and the price at which you sell it). Picture that you have a catalog and you are selling a product for price 1000. Your business partner sends you a purchase order (that will become a sales order in your system), wherein the price indicated there is 500. What would you do in this case ? Of course you would want to prevent for this sale to be fulfilled ! And that is exactly what the customer expected price does. If the price sent to you by your business partner is different to your selling price, then this order is ‘blocked’ – and thus gives you all the information you need to make a decision on how this process will unfold. Will you reject it? Identify an error in your master data? Let the transaction go through? it is up to you.

If you enjoy this post, please consider subscribing to our youtube channel and follow the hashtag #S4HCKS on twitter.

Code Snippet

The code snippet that I use in the Postman app, with the segment containing the expected price pricing condition, is added below for reference.

{"d":{

              "PurchaseOrderByCustomer": "TESTAPI",
              "SoldToParty": "99990001",
              "SalesOrderType":"OR",
              "OrganizationDivision":"00",
              "SalesOrganization":"1010",
              "DistributionChannel":"10",

              "to_Item": [{
              "Material": "TG11",
              "RequestedQuantity": "1",

                            "to_PricingElement": [{
                            "ConditionType":"PCE1",
                            "ConditionRateValue":"6510.000000000",
                            "ConditionCurrency":"EUR"
                                                 }]

                          }]

 }}