How can I retrieve the distinct values from an internal table?
I am using the SORT and DELETE ADJACENT DUPLICATES to get what I need, but I would like to improve these kind of selections.
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?
For instance: I've selected the following information from EKPO:
ebeln | ebelp
---------- | -----
1234567890 | 00010
1234567890 | 00020
1234567891 | 00010
1234567891 | 00020
To get distinct ebeln
values:
ebeln
----------
1234567890
1234567891
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.