10-19-2007 6:37 AM
hi experts,
<b>SELECT mblnr mjahr
zeile
bwart
kdauf
kdpos
werks
erfmg
xauto
FROM mseg
INTO TABLE gt_mseg
FOR ALL ENTRIES IN gt_vbap
WHERE bwart IN (641, 101, 102)
AND kdauf = gt_vbap-vbeln
AND kdpos = gt_vbap-posnr
AND werks = gt_vbap-werks.</b>
Here in in my case mseg has 7 lakh records and vbap has 5000 record..
report is taking hell of a time to give an output..
is there any way to fine tune it
pls help me on this.
i want only erfmg field from mseg so is there any other table from where i can get the same..
points will be rewarded
Thnx,
Rajan Mehta
10-19-2007 6:40 AM
10-19-2007 6:43 AM
Hi Rajan
Check the table MSEG already has any secondary indices(Index). If yes try to change the select so that the correct index is chosen. Otherwise if your team is ok with a new index in production make a new index.
Also check the possibility of using the fields MJAHR and ZEILE in your select if you know the document year.
Regards,
Arun
10-19-2007 11:10 AM
Hi
Create a index on mseg using all the fields that u r passing from VBAP.
that must reduce the search time.
Another option is to create view on MSEG anf VBAP.
alternatively u can also write select query using join on mseg and vbap.
tc
saji