Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

answer to the locked thread: use maximum aggregate function

Former Member
0 Likes
649

the locked thread below is actually as different as any other unlocked thread


UP TO 1 ROWS
where
doc_number = wa_pdate_temp-salesdoc and
s_ord_item = wa_pdate_temp-salesitem and
sched_line = wa_pdate_temp-sline
order by /bic/zpviewdt descending .

The order by and up to n rows can be very expensive, better use the max(bic/zpviewdt),

for details read documentation.

3 REPLIES 3
Read only

Former Member
0 Likes
614

What thread is that Siegfried?

Rob

Read only

0 Likes
614

I guess this is the one

Read only

0 Likes
614

Well, that one was locked because it didn't look as if the OP had done any work to see if there was in fact a problem or done a run time analysis.

Rob