Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

time out error in internal table

Former Member
0 Kudos
89

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

4 REPLIES 4

Former Member
0 Kudos
67

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

0 Kudos
67

hey i_temp is an internal table ,

later on i have to use that .

THX

peter_ruiz2
Active Contributor
0 Kudos
67

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

Former Member
0 Kudos
67

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.