I am doing a select sentence to table vbeln, but it take a lot of time, the source code of this select sentence is:
SELECT vbeln INTO TABLE it_docs FROM vbak WHERE kunnr IN p_kunnr AND vdatu IN p_vdatu AND auart IN p_auart.
I am selecting documents number by date, that's the problem. I don't have the table key.
How do I to increment de performance of this sentence?.
Edited by: Jose Larrarte on Mar 18, 2008 12:26 AM
The select statement is taking lots of time because there are no key fields defined in the where condition of your select statement ..... one way to improve the performance is look for the secondary indexes in the table and define the fields( where condition) order according to the order of the index...
Check this out ... this might help you
You need to pass the primary key fields for your selection otherwise you need to create the index with the where clause fields.
and I believe you declared p_kunnr,p_vdatu and p_auart as select-options .
so try with full primary key to avoid the delay / dumps.