2008 May 16 6:31 AM
HI ,
i am using one internal table as below .
loop at i_main.
i_temp-field0 = i_main-field0.
loop at i_main into wa_main where some conditions.
i_temp-field1 = wa_main-field1 * wa_field-field2.
endloop.
append i_temp.
endloop.
so here in that calculations becoz of more records in i_main i am getting time_out error .
so how we can avoid this can any one pls help me .
THX
2008 May 16 6:48 AM
Hi,
Why r u using the outside loop.
your are not using the below value anywhere
i_temp-field0
i assume there must be many records
loop is runnnig (lineitem) * 2 times
so remove the outside loop and bring the append statement within the second loop
try it out
tc
saji
2008 May 16 6:53 AM
hey i_temp is an internal table ,
later on i have to use that .
THX
2008 May 16 6:52 AM
hi chaaya,
use this code.
sort i_main by field0.
loop at i_main.
at new field0.
if not i_temp is initial.
append i_temp.
endif.
i_temp-field0 = i_main-field0.
endat.
i_temp-field1 = wa_main-field1 * wa_field-field2.
endloop.
regards,
Peter
2008 May 16 6:56 AM
Hi,
try this,
loop at i_main into wa_main where conditions..
wa_temp-field0 = wa_main-field0.
wa_temp-field1 = wa_main-field1 * wa_main-field2
append wa_temp to i_temp.
endloop.
Regards,
kk.