<<The index for the table is enough for the sql.>>
I assume u have created the secondary index in LTAP table for this SQL. But still taking much time.
Sounds like u want to get the non blocked storage bin for the latest transfer order.
Hmm.. I think the culprit is because of the ORDER BY tanum DESCENDING statement.
Try to replace with MAX GROUP BY but I have the feeling u wont get the correct result since u INNER JOIN with other table.
Actually SELECT UP TO 1 ROWS ENDSELECT statement is slower than SELECT statement only, but its ok since u select the table using non-key fields.
Is the whole statement inside a LOOP? This not going to solve ur problem but if u just want to exit out from a subroutine its better to use RETURN.
I was thinking maybe u can turn on the buffer, but system will bypass the ORDER BY statement.
Yep, u can create a view. Try to find any function modules to get the LTAP records.
Maybe u can archive unused/old records in LTAP table also.
Oh yea! Im junior too!
This post has been edited by izdyharz: Jul 3 2009, 10:52 AM