2008 Oct 14 2:04 AM
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.
2008 Oct 14 3:23 AM
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...
2008 Oct 14 3:55 AM
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
2008 Oct 14 5:24 AM
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
2008 Oct 14 6:32 AM
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...