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

Table View Select using Date Range Performance

Former Member
0 Likes
1,129

Hello,

I'm Basis...Know a little ABAP. Our programmer is overloaded from our current 5.0 upgrade. He has a view (VBAP, VBAK, and VBUK). He is selecting several fields from this view and there is one obligatory field ERDAT. When I enter a single date, the report runs in a few seconds. The problem is when I enter a range (even if it is the same date) it uses the <Between> logic and the job runs for several minutes. Is there a way to improve performance selecting from this view using a date range? Why the big difference with the single ERDAT VS. the ERDAT with the range?

Thanks,

Phil Stracener

8 REPLIES 8
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
948

I have seen this behavior a number of times. I big part of it may be the fact that ERDAT is not part of the key and that it is not referenced in any index.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
948

as ERDAT is select option why dont u use IN S_ERDAT instead of <between> logic.

select * from view where erdat in s_erdat.

this may not solve ur prob but small hint

Read only

0 Likes
948

The select-option will still use the BT functionality internally.

Regards,

RIch Heilman

Read only

Former Member
0 Likes
948

ERDAT is part of the index - but for VBAK, not VBAP. Make sure the select is on VBAK-ERDAT. But the BETWEEN may still be slow.

Rob

Read only

Former Member
0 Likes
948

The ST05 Trace shows that it's using the correct custom index that has ERDAT in it. He is using VBAK-ERDAT in the view. I'm puzzled... Is this just working as designed?

Thanks,

Philip Stracener

Read only

0 Likes
948

Does the custom index have VBAK-ERDAT or VBAP-ERDAT?

Which ERDAT is used in the select?

Rob

Read only

0 Likes
948

It's using VBAK-ERDAT.

Thanks,

Phil

Read only

0 Likes
948

Hi Phillip,

We are having the exact same issue of a single date vs. a date range...

Did you resolve it?

Please suggest...

Thanks