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

Query regarding index creation

Former Member
0 Likes
1,471

Hi experts,

I ran a trace on one of our SAP transactions and found that the performance can be improved by creating an index on VBPA table.

The trace shows as below:

As per this the order of where clause shows as:

  1. MANDT
  2. POSNR
  3. KUNNR
  4. PARVW

But, when I check in VBPA table, the fields are in the order:

  1. MANDT
  2. POSNR
  3. PARVW
  4. KUNNR

Please let me know which order should be followed while creating a secondary index.

Hi experts,

I ran a trace on one of our SAP transactions and found that the performance can be improved by creating an index on VBPA table.

The trace shows as below:

As per this the order of where clause shows as:

  1. MANDT
  2. POSNR
  3. KUNNR
  4. PARVW

But, when I check in VBPA table, the fields are in the order:

  1. MANDT
  2. POSNR
  3. PARVW
  4. KUNNR

Please let me know which order should be followed while creating a secondary index.

9 REPLIES 9
Read only

ThomasZloch
Active Contributor
0 Likes
1,431

Instead of creating an index for VBPA, rather try using tables VAKPA or VRKPA for efficiently finding sales documents for a specific partner.

Thomas

Read only

0 Likes
1,431

Hi Thomas,

Thanks, but, this is for FD32 transaction. And the client does not want to stop using FD32 (they are not ready to execute the report RFDKLI20 in background).

Read only

Read only

0 Likes
1,431

I can see an inactive index on VBPA for IS-Media, the fields are:

MANDT

PARVW

KUNNR

This looks sufficient for your purpose as well, why not take the SAP standard as an example.


Thomas

Read only

0 Likes
1,431

Raymond, the solution of index creation is from the same note.

Read only

0 Likes
1,431

Yes Thomas, I saw that too, but will activating this SAP provided index help in our case?

As per the trace the order of where clause on VBPA shows as:

  1. MANDT
  2. POSNR
  3. KUNNR
  4. PARVW

This is exactly why I am a little concerned, because of the order in which the fields KUNNR and PARVW appear.

Read only

0 Likes
1,431

Why did you discard the option to add payer partner to index table (add entry to TINPA and recreate once index VAKPA with report RVV05IVB) then report will use the VAKPA table.

Regards,

Raymond

Read only

0 Likes
1,431

The order of the fields in the where-clause and in the index does not need to match exactly, what's important is that your index contains the relevant fields for providing a good selectivity when the query hits the database. Since the query has EQ-conditions for PARVW and KUNNR, this will work fine.

Thomas

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,431

First read Note 185530 - Performance: Customer developments in SD for information on sales document indexes to read for better performance.

Regards,

Raymond