06-07-2007 10:11 AM
Hi Gurus/Expert.
my problem is i m gettind data in It_vbrk correctly now from it_vbrk i m going to fetch record from bkpf but its dispalying data very slow .
performance is very poor.
how to increas its performance . ? please help me in this case.
select bukrs belnr gjahr blart budat xblnr awkey into table it_bkpf from bkpf
for all entries in it_vbrk
where awkey = it_vbrk-awkey
and xblnr = it_vbrk-xblnr.
abouve code is taking more time.
06-07-2007 10:53 AM
Use the whole key and only the needed fields
- AWTYP should be used before AWKEY
- use XBLNR or AWKEY, not both (here AWKEY is better)
Try something like
SELECT bukrs belnr gjahr blart budat xblnr awkey
INTO TABLE it_bkpf
FROM bkpf
FOR ALL ENTRIES IN it_vbrk
WHERE awtyp = 'VBRK'
AND awkey = it_vbrk-awkey
Regards
06-07-2007 10:17 AM
Hi,
Try and have as FULL a primary key as possible in your where clause, if your where clause has the primary key fileds it will be fast.
When I mean full (All the fields that comprise the primary key of the table) You should provide as many fields of primary key as possible in the Where clause.
Regards,
Sesh
06-07-2007 10:18 AM
Hi Majid,
Table BKPF has got several secondary indexes already - 7 on our system. The trick is to give the read the correct fields.
select bukrs belnr gjahr blart budat xblnr awkey into table it_bkpf from bkpf
for all entries in it_vbrk
where <i>awtyp = 'VBRK'</i>
and awkey = it_vbrk-awkey.
This allows the select to pick the correct secondary index (number 4).
06-07-2007 10:48 AM
hi
good
use the move corresponding statement in your select statement to increase the performance of the program.
thanks
mrutyun^
06-07-2007 10:53 AM
Use the whole key and only the needed fields
- AWTYP should be used before AWKEY
- use XBLNR or AWKEY, not both (here AWKEY is better)
Try something like
SELECT bukrs belnr gjahr blart budat xblnr awkey
INTO TABLE it_bkpf
FROM bkpf
FOR ALL ENTRIES IN it_vbrk
WHERE awtyp = 'VBRK'
AND awkey = it_vbrk-awkey
Regards
06-07-2007 11:29 AM
Dear All, Raymand, John,
Thanks for your help i have solved my problem,
again Thanks for your valuable code.
Point has given to all
Majed Khan.