cancel
Showing results for 
Search instead for 
Did you mean: 

Availability check in sales order simulation

DavidAvila
Explorer
0 Kudos
533

Hi,

We are implementing S/4HANA Cloud public edition and we need to create sales orders with the standard API of the API business hub, currently we can create the sales order and the sales order simulation but we need that the simulation returns to us the disponibility of the material in the response; however, when we put the plant and the storage location in the body the api returns an error (see at the attached image). For now the SD consultant left the availability check at delivery level, but this could represent a problem for the POS system.

We would like to know if it is possible to have an availability check or some stock information at the sales order simulation level and what kind of configuration we need to be aware of (Material master, sales document type, etc...)

Also we were told that this availability check can only be configured for the deliveries or the sales order, is this true? or if it is possible to leave this check in this to instances.

thank you in advance,

Best Regards.

Accepted Solutions (1)

Accepted Solutions (1)

TomWoelfel
Participant
0 Kudos

Hi David, the sales order simulation will provide the results of the ATP check on the order in the schedule line fields associated to the respective line items. Basically all the information that you see in the user interface on the Line item -Schedule Line screen will be returned in the sales order simulation API schedule line. What I have done is to provide a line with a qty request of 10000 units to see what is confirmed at once (on sch line 1) and and future confirmations (based upon inbound supply/allocation) in sch line 2, 3, ....

Good luck, Tom

  "to_ScheduleLine": {
          "results": 
            {
              "ScheduleLine": "stri",
              "RequestedDeliveryDate": "/Date(1492041600000)/",
              "ConfirmedDeliveryDate": "/Date(1492041600000)/",
              "OrderQuantityUnit": "str",
              "OrderQuantitySAPUnit": "str",
              "OrderQuantityISOUnit": "str",
              "ScheduleLineOrderQuantity": "0",
              "ConfdOrderQtyByMatlAvailCheck": "0",
              "OpenConfdDelivQtyInOrdQtyUnit": "0",
              "CorrectedQtyInOrderQtyUnit": "0",
              "to_SalesOrder": "string",
              "to_SalesOrderItem": "string"
nikb-dav
Explorer
0 Kudos

Hi Thomas, sorry I do not get it. having the same issue right now.

this is how my payload looks like and I do not get any response of ATP back. I have checked the ABAP code an there is always "CHECK ATP" flag set to false... I think because my request is false. What am I doing wrong, can you check?. I think there must be something inside "to_ScheduleLine": [] }

{ 
"SalesOrderType": "ZOR",
"SalesOrganization": "1111",
"DistributionChannel": "01",
"OrganizationDivision": "01",
"SoldToParty": "123456",
"TransactionCurrency": "USD",
"ShippingCondition": "",
"PurchaseOrderByCustomer": "",
"to_Credit": {},
"to_Item": [ {
"SalesOrder": "",
"SalesOrderItem": "10",
"Material": "70000123",
"RequestedQuantity": "5",
"RequestedQuantityUnit": "EA",
"Plant": "1110",
"to_PricingElement": [],
"to_ScheduleLine": [] } ],
"to_Partner": [ {
"PartnerFunction": "WE",
"Customer": "123456" },{
"PartnerFunction": "RE",
"Customer": "123456" },{
"PartnerFunction": "AG",
"Customer": "123456" } ],
"to_Pricing": {
"SalesOrder": "" },
"SalesOrder": null}

Answers (2)

Answers (2)

TomWoelfel
Participant
0 Kudos

David, if you create manually and check availability? That will allow you to see if the settings are correct and ATP is getting checked. I am guessing the order type/material/sched line cate combo is not ATP relevant somewhere along the line. Easier to dig through when doing via UI, this API is mimicing those steps you would do manually - so that is best place to start.

nikb-dav
Explorer
0 Kudos

David, how do you actually trigger atp. Do you have got an example of the payload, like I have shared in the comment below the answer of Tom?