03-18-2008 5:23 AM
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?.
Thanks.
Joseph.
Edited by: Jose Larrarte on Mar 18, 2008 12:26 AM
03-18-2008 5:28 AM
hi Jose,
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
http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm
Regards,
Santosh
03-18-2008 5:33 AM
Because what parameters u are passing in where condition none of them is not a primary key field...can u just brief me about ur requirement....or what otherother tables u r using in ur program...
03-18-2008 5:41 AM
The problem is to select Sales Document by date, I don't use the full table key because I only have the date. I am thinking to create an index.
Thanks.
Joseph
03-18-2008 5:37 AM
Hi ,
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.
Kind Regards,
Ravi Sankar.Z