I ran into the following error when attempting to solve ITAB Aggregation exercise. It works on ABAP AS, but not on exercism.

I was using LOOP .. GROUP BY .. REFERENCE INTO DATA(key) and then had a nested FOR expression with FOR .. IN GROUP key
It did work after changing the group_result to simply use INTO DATA(key) instead of the data reference.
Here is a link to my published solutions on Exercism: https://exercism.org/tracks/abap/exercises/itab-aggregation/solutions/brehberg