cancel
Showing results for 
Search instead for 
Did you mean: 

create and update sales order with API_SALES_ORDER_SRV using $batch with content-id in a changeset

shanmugas
Discoverer
0 Kudos
331

I am trying to update the sales order schedule lines once the sales order is created using API_SALES_ORDER_SRV using $batch. 
i am getting 500 Internal server error. in SAP S4 HANA 2023. any one faced similar issue please help.

how to get the sales order number created in the first post call to do patch in the same changeset using Content-ID?. 

Thanks.

Sandra_Rossi
Active Contributor
0 Kudos

Probably the response body tells you more, you'd better look at it/post it. Check the backend log. Then check the SAP notes (many ones).

3235882 - API_SALES_ORDER_SRV doesn't update Schedule Lines correctly - SAP for Me

3311614 - API_SALES_ORDER_SRV doesn't update Schedule Lines correctly - SAP for Me

etc.

View Entire Topic
gregorw
Active Contributor
0 Kudos

I've tested the S/4HANA Public Cloud API_SALES_ORDER_SRV with https://github.com/gregorwolf/bookshop-demo/blob/main/tests/s4hana/API_SALES_ORDER_SRV.http#L35 and it seems to me that you don't need a Content-ID but can add the to_ScheduleLine just directly below the to_Item.

shanmugas
Discoverer
0 Kudos
Hi @gregorw thanks for your response. In private cloud this is not working, we are not able to have desired Requested delivery date using deep insert. It is taking the header date or current date. I believe we need to update the schedule lines after creating the sales order. As we need to do it in the same API call i believe $batch could be the solution.it will be nice if some one can help here to create and update(schedule line) sales order in same API call.
gregorw
Active Contributor