Symptom
Get the following error messages when previewing a Custom Analytical Query:
- The database registered an internal error. SQL code 4. The error text is: cannot allocate enough memory: [9] Memory allocation failed;exception
- Allocation failed ; $failure_type$=STATEMENT_MEMORY_LIMIT_FROM_GLOBAL_ CONFIG;
- The result set does not contain any relevant data
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Go to Custom Analytical Queries app
- Open the Query and click on "Preview"
- Add parameters if necessary
- Click on "Go"
Cause
The issue is related to the large amount being retrieved by the Custom Analytical Query. The reason for this exception is that the range of the statement to be passed to the database is too wide.
Resolution
In order to resolve the issue, filters are needed to be used in the Custom Analytical Query.
It might be that the query already has some filters, but please note that it needs to have a filter that reduces the amount of data retrieved. A date/month field is a good idea, for example.
See Also
For more information, please check 3256138 - CX_SADL_DUMP_DATABASE_FAILURE
Keywords
memory allocation, database failure, shortdump, dump, custom analytical query, preview, SQL, code 4, memory allocation failed, query, cannot allocate enough memory, STATEMENT_MEMORY_LIMIT_FROM_GLOBAL_ CONFIG, custom analytical queries , KBA , BC-SRV-APS-EXT-AQD , Fiori based Query Designer , Problem