09-30-2008 6:01 AM
Hi Gurus,
I am fetching records from BSIS table but it takes so much of time.my code is this.
SELECT bukrs
hkont
augdt
budat
bldat
xblnr
wrbtr
kostl
FROM bsis
INTO TABLE int_accrual
WHERE hkont IN s_hkont
AND budat IN s_pdate
AND XBLNR IN S_XBLNR
AND BLART IN S_BLART
AND kostl IN s_ccntr.
Please give me suggestions for getting data from it within less span of time.
my client do not interested to add another fields in selection screen and also to create INDEX in BSIS table but he want to get data from it within less span of time.
please give me solution what can i do now.
Thanks in advance.
Thanks & Regards,
Radhakrishna.Y
09-30-2008 6:09 AM
hi..
First select all primary key fields whether u use in the program or not. then, use the select stmt as:
select all primary key
+ ur required fields
from bsis
into table itab
where hkont in s_hkont
and budat in s_budat.
delete itab where xblnr not in s_xblnr.
delete itab where blart not in s_blart.
delete itab where kostl not in s_kostl.
this might help u.
check the performance and trace and revert back.
regards,
padma.
09-30-2008 6:11 AM
Hello
Before your select statement try this code:
data: it001 like t001 occurs 0 with header line.
ranges: r_bukrs for t001-bukrs.
select * from t001 into table it001.
loop at it001.
r_bukrs-sign = 'I'.
r_bukrs-option = 'EQ'.
r_bukrs-low = it001-bukrs.
append r_bukrs.
endloop.
And in select statement:
...
INTO TABLE int_accrual
WHERE bukrs in r_bukrs
AND hkont IN s_hkont
AND budat IN s_pdate
AND XBLNR IN S_XBLNR
AND BLART IN S_BLART
AND kostl IN s_ccntr.