Symptom
You're previewing a Custom Analytical Query or launching a Custom App created through a Custom Analytical Query and while triggering the "Export" you're getting the following errors:
- 500 Internal Server Error
- The memory request for XXX bytes could not be complied with
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Open the Custom Analytical Query report
- Run the report
- Click on "export as..." or in "export" button
- There's a warning saying: 'There are XXXXX data cells. The export might take some time or even fail. Do you want to proceed?'
- Click on Yes
- After a long time, it fails with the errors
Cause
The amount of memory space used at present exceeds the warning level for the session memory quota.
In the process of exporting data to Excel, the correct transfer of the values to Excel is the main priority. However, the export is not intended for a mass data export.
The recommended dataset should not be much larger than about 100,000 cells (10,000 rows x 10 columns) because otherwise, timeouts may occur.
While triggering the "Export" feature, you receive a warning saying that the process might fail...
The export to Excel is very time consuming because every cell in the table must be converted from the internal SAP format to the data formats supported by Excel (ISO date, ISO numbers, and so on). Therefore, in the result, the formatting of the columns and cells in Excel also corresponds to the data types you used, rather than being a purely textual export.
As mentioned above, the runtime of the export depends on the number of cells (it is equal to the number of rows multiplied by the number of columns). However, it also depends on the aggregations that have been set because these require additional calculations.
Resolution
Taking this into consideration, you need to reduce the dataset that you want to export.
In other words, use filters to reduce the number of rows or hide columns that you do not require in the result of the export.
With the 2408 cloud release it's possible to export spreadsheets in background tasks. That means that the user triggers an export and continue working in their application while the export is runing asynchronously in background. Once the export is finished, users will have 72 hours to download the exported file to their local computer. Please note that while this reduces memory allocation and the possibility of timeouts, this does not raise the export capabilites indefinitely. There will always be boundaries, but the expectation is that around 4 million cells lie within these boundaries.
See Also
Keywords
export, memory, Custom Analytical Query, Custom App, 500 Internal Server Error, the memory request for XXX bytes could not be complied with , KBA , BC-SRV-APS-EXT-AQD , Fiori based Query Designer , Problem