SAPSQL_ILLEGAL_AGGREGATE is an ABAP runtime error which you may come across when using or developing within an SAP system. See below for the standard details explaining what it means and how you can avoid or fix this runtime error.
Short Dump Classification: A - ABAP Programming Error
You can view further information about a runtme error by using transaction code ST22 which will show you this and all runtime erros that have happen in your SAP system.
Also check out the Comments section below to view or add related contributions and example screen shots.
Please see search hints for more details about the possible cause of this runtime error and how it could be avoided.
Please see send to sap for more details about the possible cause of this runtime error and how it could be avoided.
The HAVING condition has an unexpected format.
Please see abap error for more details about the possible cause of this runtime error and how it could be avoided.
The running program attempted to execute an Open SQL statement that
contains a HAVING condition of the form HAVING (itab) or HAVING ... AND
(itab). The part of the HAVING condition that was specified dynamically
contains the unknown aggregate function "<runtime parameter>".
Please see abap error for more details about the possible cause of this runtime error and how it could be avoided.
SAPSQL_ILLEGAL_AGGREGATE - sapsql illegal aggregate SAPSQL_HAVING_SUM_TYPE - sapsql having sum type SAPSQL_HAVING_PARENTHESES - sapsql having parentheses SAPSQL_HAVING_AVG_TYPE - sapsql having avg type SAPSQL_GROUP_BY_LOB - sapsql group by lob SAPSQL_GROUP_BY_ILL_TABLE_TYPE - sapsql group by ill table type