SAP Knowledge Base Article - Public

3682861 - Error "Instance with handle &1 of entity ITEM_TEXT (or HEAD_TEXT) was not created" when creating sales order via API

Symptom

When trying to create Sales Documents using an API, the following errors are thrown:

  • Instance with handle &1 of entity ITEM_TEXT was not created. (GOAL/032)
    or
  • Instance with handle &1 of entity HEAD_TEXT was not created. (GOAL/032).

The issue arises when using the APIs: API_SALES_ORDER_SRV or SalesOrderBulkRequest_In.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Use a Sales API, e.g. SalesOrderBulkRequest_In to create a sales order.
  2. Include a payload where the LongText field is null or missing.
  3. Attempt to process the payload.

Example of Text entity on the payload:

<Text actionCode="04">
    <LongTextID>TX11</LongTextID>
    <Language>EN</Language>
</Text>

Cause

This error message is raised correctly due to the correction of a known software issue. 

Previously, the request with "" or null value for the 'LongText' field was accepted when creating a sales order with the text entity. At that time, the response code is 201 CREATED although the text entity was not actually created, which is unreasonable.

To enhance data integrity and quality, in CE2508.3, data validation is tightened and the error message is introduced so that the end user can be informed properly when the value of the 'LongText' field is "" or null.

Resolution

Ensure that the values are correctly passed in the payload of the API, by adopting one of the following approaches for the 'LongText' field:

  • Remove the text entity from the request payload body that raises this issue.
    or
  • Add a non-initial value to the 'LongText' field which is not Null, "" , " " etc..

Keywords

api_sales_order_srv, SalesOrderBulkRequest_In, sales order creation, longtext null, GOAL/032, entity item_text not created, api integration, sales order line items, null value error, sales order A2A, sales order A2X , KBA , SD-SLS-API-2CL , API (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions