title: GROUP by aggregation does not calculate SUM
body: <p>I have to aggregate in my query SUM of <code>AMUNT</code> field according to <code>WERKS</code>, <code>DATUM</code> and <code>UZEIT</code>
  I try to make a group by without any success
  I have an error like that:<a href="https://i.stack.imgur.com/DE5FK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DE5FK.png" alt="enter image description here"></a></p>
  
  <p>What is the problem in my code?</p>
  
  <p>That is my ABAP code:</p>
  
  <pre><code> DATA: gt_compr TYPE TABLE OF yrt_h_sales
   SELECT    werks, extnb, datum, uzeit, sumvt, deprt, dpext, SUM( amunt ) AS amunt
    INTO      CORRESPONDING FIELDS OF TABLE @gt_compr
    FROM      yrt_h_sales 
    WHERE     werks IN @so_werks
    AND       datum IN @so_datum
    GROUP BY  werks, datum, uzeit.
  </code></pre>
  
  <p>After I corrected it and I did this, the code looks as follows:</p>
  
  <pre><code> SELECT    werks,  datum, uzeit, extnb, deprt, dpext, SUM( amunt ) AS amunt
    INTO      CORRESPONDING FIELDS OF TABLE @gt_compr
    FROM      yrt_h_sales
    WHERE     werks IN @so_werks
    AND       datum IN @so_datum
    GROUP BY  werks, datum, uzeit,  extnb, deprt, dpext.
  </code></pre>
  
  <p>So I don't have the compilation error anymore but the aggregation is still not working! I have a 43 line result without sum on the <code>AMUNT</code> column</p>
  
  <p>P.S. this is the structure of my table:
  <a href="https://i.stack.imgur.com/GkRAg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GkRAg.png" alt="enter image description here"></a></p>