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: 

Secondary Indexes

Former Member
0 Kudos

I want to extract the data from EKKO and EKPO using join statement. So I wrote the select query. But in where condition I have to use different combinations as in the selection screen user may enter and may not enter few fields. I have the below combinations.

CASE A

matnr

ekgrp

ekorg

knttp

pstyp

loekz

CASE B

ekgrp

ekorg

knttp

pstyp

loekz

CASE C

infnr

matnr

ekgrp

ekorg

knttp

pstyp

loekz

CASE D

infnr

ekgrp

ekorg

knttp

pstyp

loekz

Out of which Case B and D is taking long time to execute, so I want to create secondary index for cases B and D. So can you please suggest me some way to improve the speed the select like how to create the secondary index in this scenario??

Thnks,

Raghu Posani.

4 REPLIES 4

madan_ullasa
Contributor
0 Kudos

hi,

secondary index are created in SE11 and they are used in the where condition in the normal way as you would with anyother field...

regds,

Madan...

former_member598013
Active Contributor
0 Kudos

Hi Raghu,

It depends upon your requirement what all different fields you need to create it as a secondary indexes..

But make sure that the Secondary indexes should be less in your R/3 as it loads to your server.

You can create a Secondary indexes throught SE11 Transaction.

Thanks,

Chidanand

Former Member
0 Kudos

Hi

You can have performance problem, if the fields in the where condition are not in the same sequence as listed in the table.

I would also suggest to use all entries instead of join

Regards

Madhan

Former Member
0 Kudos

hi,

to improve the performance first use for all entries instead of join conditions.

SELECT data from EKKO table on the basis of i/p values then SELECT data from EKPO for all entries which u got from EKKO table......

u can also create secondary indexes for tables in SE11,by clicking on indexes and then create secondary index and specify the fields which u want to specify in ur WHERE clause of SELECT query...