I cannot for the life of me understand why this doesn't work. lt_output contains correct group by matkl but my sum for netwr isnt working. returns 0's for all rows.
SELECT a~matkl SUM( a~netwr )
INTO CORRESPONDING FIELDS OF TABLE lt_output
FROM ekpo AS a
INNER JOIN ekko AS b ON a~ebeln = b~ebeln
WHERE b~aedat >= ls_select-startdate AND b~aedat <= ls_select-enddate
GROUP BY a~matkl
ORDER BY a~matkl.