SAP Knowledge Base Article - Preview

3722203 - Draft activation fails for LargeBinary in CAP Fiori Elements app with error “$batch failed”

Symptom

When saving a draft document larger than 500 KB in a Fiori Elements application created by CAP CDS, the file is stored in the draft table already, but not copied into the active table during draft activation and the UI remains stuck showing a loading indicator.

In the browser console there is error message:
"Error while saving the document - Error: Error: HTTP request was not processed because $batch failed
Error: Error: HTTP request was not processed because $batch failed"

Note that:
This issue happens with:

  • The usage of library "@sap/cds": "^9.0.0" and "@cap-js/hana"
  • No explicit dependency on hdb or @sap/hana-client in package.json.
  • No custom event handlers are involved and the logs do not show any backend error


Read more...

Environment

  • SAP CAP – Compiler and CDS language
  • Fiori Elements app

Product

SAP S/4HANA all versions

Keywords

draft activation, fiori elements application, large binary files, LargeBinary field, CAP CDS, CAP JavaScript, cds 9, @cap-js/hana, hdb module, @sap/hana-client, known issue with hdb streaming, draft table, active table, loading indicator stuck, $batch failed error, HTTP request was not processed, browser console error, media upload issue, document >500 KB, file size threshold, draft save failure, CAP service, draft-enabled entity, Fiori Elements generator app, upload document, save draft, CDS entity with LargeBinary, no custom handlers, package.json dependencies, npm list hdb, remove hdb, media type fields , KBA , BC-XS-CDX-COR , SAP CAP– Compiler and CDS language , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.