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

Fecthing data from a huge table VBUK

Former Member
0 Likes
873

Hi,

I am fetching data from VBUK table based on LFGSK ne 'C' and KOSTK ne 'C'...both are not the key fields...and this table has some 19 lacs records.

When i am running the code it goes to dump showing TIME_OUT errror....

I am fetchin all the open sales doc number i.e. VBELN fields from VBUK table.

Can anybody suggest how to solve this..

Thanks in Advance,

Mayank Verma

Edited by: Mayank Verma on Feb 25, 2010 8:52 PM

5 REPLIES 5
Read only

Former Member
0 Likes
741

Run it in the background.

Rob

Read only

0 Likes
741

Hi,

Give your selection code SQL details

Rgds

Ravi

Read only

Maciej_DomagaBa
Contributor
0 Likes
741

You can speed up your query by using so called SD index tables instead of just selecting from VBUK.

For example table VEPVG contains sales order numbers for which deliveries should be created. So if you need to select sales orders you might select from VEPVG first and then from VBUK for these documents only (or join VEPVG and VBUK by VBELN).

You can find some other interesting SD index tables in SE11 (search for table names beginning with "V" and description containing word "index") .

regards

Read only

Former Member
0 Likes
741

First of all, don't select using NOT operators, like NE... For those status codes, I'd used 'IN ('A', 'B') instead. Use of proprietary index tables is mentioned...see SAP NOTE 185530 on this subject, alluded to by previous poster. 185530 is a must-read, IMHO, for programmers working with SD.

Read only

0 Likes
741

>

> First of all, don't select using NOT operators, like NE...

This has been disdussed here recently

NE is not always a performance problem.

Rob