title: Get distinct values using FOR - ABAP
body: <p>How can I retrieve the distinct values from an internal table?</p>
  
  <p>I am using the SORT and DELETE ADJACENT DUPLICATES to get what I need, but I would like to improve these kind of selections.</p>
  
  <p>The point is: imagine you have an internal table with two purchase orders information, where each one has two items. How can I get the distinct purchase orders number?</p>
  
  <p>For instance: I've selected the following information from EKPO:</p>
  
  <pre><code>ebeln      | ebelp 
  ---------- | ----- 
  1234567890 | 00010
  1234567890 | 00020
  1234567891 | 00010
  1234567891 | 00020 
  </code></pre>
  
  <p>To get distinct <code>ebeln</code> values:</p>
  
  <pre><code>ebeln     
  ----------
  1234567890
  1234567891
  </code></pre>
  
  <p>For that, I need to sort the table and apply the DELETE ADJACENT DUPLICATES. I would like to know if there is any trick to replace these commands.</p>