SAP Knowledge Base Article - Public

3800619 - Api_purchaseorder_2 returns abap dump (tsv_tnew_page_alloc_failed) when creating po with ~2500 schedule lines; po created but response fails – sap s/4hana cloud public edition

Symptom

  • When creating a purchase order with approximately 2,500 schedule lines via API_PURCHASEORDER_2, the API call terminates with a short dump.
  • The error messages observed include: TSV_TNEW_PAGE_ALLOC_FAILED, TSV_TNEW_OCCURS_NO_ROLL_MEMORY, and “The asynchronous application session was terminated -> short dump”.
  • The API behaves as expected with approximately 250 schedule lines.
  • The purchase order is created successfully in the backend, but the frontend/API response returns an error.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Prepare an API_PURCHASEORDER_2 request payload to create a purchase order that includes approximately 2,500 schedule lines.
  2. Send the request (synchronous or asynchronous) to create the purchase order.
  3. Observe that an ABAP short dump is returned by the API even though the purchase order is created successfully in the backend.
  4. Repeat with approximately 250 schedule lines and observe that no error occurs.

Cause

Memory-related short dump when processing a very large number of schedule lines: the application server faces high load and the global memory threshold is exceeded, leading to TSV_TNEW_PAGE_ALLOC_FAILED or TSV_TNEW_OCCURS_NO_ROLL_MEMORY.

Resolution

  1. Reduce the number of schedule lines per purchase order to avoid excessive memory usage (for optimal performance, avoid large/complex documents with hundreds to thousands of child entities).
  2. Split large requests into multiple smaller purchase orders where feasible.
  3. Consider configuring restrictions to limit the number of lines in a purchase order to prevent oversized documents.

Keywords

api_purchaseorder_2, purchase order, schedule lines, abap dump, tsv_tnew_page_alloc_failed, tsv_tnew_occurs_no_roll_memory, odata v4, asynchronous application session terminated, memory threshold, large payload, performance limitation, short dump, backend created frontend error, po creation failure, high volume po , KBA , MM-PUR-PO-2CL , Purchase Orders (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions