Application Development 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: 

Select to table VBELN is slow

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

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...

0 Kudos

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

ravisankara_varaprasad
Active Participant
0 Kudos

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