‎2010 Nov 24 6:52 AM
I have prepared a report regarding the TDS details . I have used the tables BSIS and BSAS.
But when I am executing the report I am facing runtime error (TIMEOUT ERROR) .
can any body suggest me what I have to do for its batter performance????
Moderator Message: Vague title. Wrong Forum. No specific question. No effort from OP => Thread Locked. Read/search through some of the threads in the Performance Tuning forum.
Edited by: kishan P on Nov 24, 2010 2:09 PM
‎2010 Nov 24 7:12 AM
Hi,
Please do give a meaningful title.
Check for the two tables in ur program, does secondary index available for tat where clause in select given in the program.
Or you can show the code .
Regards,
Madhukar Shetty
‎2010 Nov 24 7:19 AM
sir
i have checked , there is no secondary index present in both the tables.
I am facing lots of problem in this report. what do you suggest on this.
‎2010 Nov 24 7:24 AM
‎2010 Nov 24 7:43 AM
REPORT ZEXPENSEDETAIL_N.
tables : bsis,bsas,bkpf,lfa1.
type-pools : slis.
selection-screen begin of block b1 with frame title text-001.
select-options : "s_lifnr for lfa1-lifnr , "with_item-wt_acco,
s_bukrs for bsis-bukrs,
s_budat for bsis-budat,
s_year for bsis-gjahr,
s_docno for bsis-belnr,
s_hkont for bsis-hkont,
s_kostl for bsis-kostl.
selection-screen end of block b1.
types : begin of itab,
budat type bsis-budat,
belnr type bsis-belnr,
wrbtr type bsis-wrbtr,
sgtxt type bsis-sgtxt,
kostl type bsis-kostl,
hkont type bsis-hkont,
xref3 type bsis-xref3,
gjahr type bsis-gjahr,
shkzg type bsis-shkzg,
zuonr type bsis-zuonr,
lifnr type lfa1-lifnr,
name1 type lfa1-name1,
end of itab.
types : begin of itab1,
budat type bsas-budat,
belnr type bsas-belnr,
wrbtr type bsas-wrbtr,
sgtxt type bsas-sgtxt,
kostl type bsas-kostl,
hkont type bsas-hkont,
xref3 type bsas-xref3,
gjahr type bsas-gjahr,
shkzg type bsas-shkzg,
zuonr type bsas-zuonr,
lifnr type lfa1-lifnr,
name1 type lfa1-name1,
end of itab1.
types : begin of itab3,
belnr like bkpf-belnr,
gjahr like bkpf-gjahr,
xreversal like bkpf-xreversal,
end of itab3.
types : begin of itab4,
belnr type bsas-belnr,
zuonr type bsas-zuonr,
hkont type bsas-hkont,
end of itab4.
types : begin of itab5,
lifnr type lfa1-lifnr,
name1 type lfa1-name1,
end of itab5.
data : itab_data type standard table of itab with header line.
data : itab_data1 type standard table of itab1 with header line.
data : itab_data2 type standard table of itab with header line.
data : itab_data3 type standard table of itab3 with header line.
data : itab_data4 type standard table of itab4 with header line.
data : itab_data5 type standard table of itab5 with header line.
initialization.
s_bukrs-low = '7000'.
append s_bukrs.
start-of-selection.
select budat belnr wrbtr sgtxt kostl hkont xref3 gjahr from bsis into table itab_data where
budat in s_budat and gjahr in s_year and belnr in s_docno and hkont in s_hkont
and kostl in s_kostl .
select budat belnr wrbtr sgtxt kostl hkont xref3 gjahr from bsas into table itab_data1 for all entries in
itab_data where belnr = itab_data-belnr and gjahr = itab_data-gjahr.
select belnr zuonr hkont from bsas into table itab_data4 for all entries in itab_data1
where belnr = itab_data1-belnr and hkont = itab_data1-hkont.
loop at itab_data1.
read table itab_data4 with key belnr = itab_data1-belnr hkont = itab_data1-hkont.
if sy-subrc = 0.
itab_data1-zuonr = itab_data4-zuonr.
modify itab_data1.
endif.
endloop.
loop at itab_data.
append itab_data to itab_data2.
endloop.
loop at itab_data1.
append itab_data1 to itab_data2.
endloop.
select belnr gjahr xreversal from bkpf into table itab_data3 for all entries in itab_data2
where belnr = itab_data2-belnr and budat = itab_data2-budat
and ( xreversal eq '1' or xreversal eq '2' ).
loop at itab_data2.
read table itab_data3 with key belnr = itab_data2-belnr.
if sy-subrc = 0.
delete itab_data2.
endif.
endloop.
after this i have defined alv grid to show display the data ................
resma