on 04-02-2007 3:18 PM
Hi all,
The resulting list is not necessarily sorted even if the FOR ALL ENTRIES itab is sorted. How can make sure the optimizer will process the FOR ALL ENTRIES in the itab's sorted order?
For example, I would like to get the 10 most recently created sales orders:
sort itab by vbeln descending.
select bstnk up to 10 rows
from vbak
into table itab_bstnk
for all entries in itab
where vbeln = itab-vbeln.
Would declaring the itab as a sorted internal table help? Any ideas?
Thanks a lot,
John
By the way, ORDER BY clause cannot be used with FOR ALL ENTRIES that is why I am asking (exception is SELECT *--- FOR ALL ENTRIES --- ORDER BY PRIMARY KEYS).
Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.