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: 

Creating an index for VBAP (ERDAT)

luis_rod
Participant
0 Kudos

Hi all,

For an in-house (“Z”) program, we need to access the VBAP table by the column ERDAT (Record creation date) (using a range, in fact). The point is that, of course, there is no index with that column, so the response times are, to put it mildly, not the best…

So, I have two questions, if I may:

  • 1)How convenient is to create our own DB index for this (huge!) table?
  • 2)I have thought of creating an extension index. Is this option the most adequate?

Thanks in advance,

Luis

1 ACCEPTED SOLUTION

Jelena
Active Contributor

EDIT: According to SAP Help, extension index is the way to go.

We did create a secondary index for VBAP-ERDAT with no issues. But the items mentioned by Michelle should be considered, of course. This was a non-HANA system on Oracle DB, if it matters.

As a side note, if it's a huge table you might want to consider archiving as well.

8 REPLIES 8

mmcisme1
Active Contributor

Can you select the data from VBAK? There is an index for the order date. If so, join VBAK and VBAP. That should improve your run time.

0 Kudos

Michelle,

Thanks for your post.

That was, in fact, my first option. It just happens, though, that the ERDAT values are not neccesarily the same between the two tables, and our "superuser" (who is really knowledgeable about the company's data) told me that we needed to access the VBAP value.

Regards,

Luis

mmcisme1
Active Contributor
0 Kudos

Well then... I have indexed the VBAP table by date. But I had to get approval from our system's people. Then I had to verify that I did cause any other Z type reports to slow down - sometimes they pick the wrong index. It wasn't easy. But it was something that we did.

0 Kudos

Thanks.

Did you create your index as a Secondary Index or as an Extension Index? Also, Did you experience any significant slow down when the index was being created? Any disruption in user's apps or something like that?

Thanks again,

Luis

Jelena
Active Contributor

EDIT: According to SAP Help, extension index is the way to go.

We did create a secondary index for VBAP-ERDAT with no issues. But the items mentioned by Michelle should be considered, of course. This was a non-HANA system on Oracle DB, if it matters.

As a side note, if it's a huge table you might want to consider archiving as well.

0 Kudos

Jelena,

Thanks for your post.

Our DBA told us that an extension index would be a better option when updating to a new SAP version. I'll show him your post, as any archiving decision is up to him...

Thanks again,

Luis

Jelena
Active Contributor
0 Kudos

OK, I guess I had an incorrect definition of "extension index" when I wrote this. Apparently now it's the thing and SAP is saying to create only extension indexes. Go figure...

0 Kudos

Thanks for the confirm...

Regards,

Luis