title: Counting itab groups without a loop
body: <p>I recently found out about the <a href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abaploop_at_itab_group_by.htm" rel="nofollow noreferrer" title="groupby">GROUP BY</a> command in loops.</p>
  <p>Now imagine following example:</p>
  <p>I have an itab with a column <code>categories</code>. I want to know how many different categories there are.
  Using the GROUP BY statement linked above I could count the number of times the loop is executed. Is there a simpler way without having to loop?</p>