When creating a new item for an existing sales order using POST HTTP method on the A_SalesOrderItem entity of API Sales Order (A2X), the following error messages occur:
- In the context of Data Services an unknown internal server error occurred
- The table does not contain a row with the specified values
- The Data Services Request could not be completed due to a conflict with the current state of the resource
SAP S/4HANA Cloud
Reproducing the Issue
- Send API request to create a new item for an existing sales order with POST HTTP method on the A_SalesOrderItem entity of API Sales Order (A2X).
- The error "In the context of Data Services an unknown internal server error occurred" occurs and the new item is not created.
The deep insert was not used within the payload of this API request. The sales order item entity will not be created without including any rellated entities, for example, item partner, item pricing element and item text.
At least one deep insert request is required within the payload of this API request. If you want to create an item without any additional sub-entities, you can provide an empty association like the one in the following sample code:
"PurchaseOrderByCustomer": "Created via OData",
Sales Order Item, Deep Insert, Entity, Payload, API Request, OData API, API Sales Order (A2X), A_SalesOrderItem , KBA , SD-SLS-API , API , SD-SLS-SO , Sales Orders , Problem