‎2010 May 18 2:56 AM
hi friends,
itab = internal table and wa = work area.
Example: loop at itab1 into wa1.
loop at itab2 into wa2 where <f1> = wa1-<f1>.
endloop.
endloop.
is it recommended to use loop inside loop when large amount of records are there in both itabs?
if not recommended then please give mr the solutiuon to do it.
Thanks.
Regards,
Mihir
‎2010 May 18 4:21 AM
Hi,
You may use READ TABLE itab2 inside LOOP itab2 ..ENDLOOP.
Regards,
Darren
‎2010 May 18 7:52 AM
it depends, sometimes its inevitable to avoid loop inside a loop.
In your case if you want to fetch only a unique record from itab1 based on wa1 , then use READ statement else loop is the only option may be loop with WHERE clause.
‎2010 May 18 8:15 AM
FAQ, please search for "loop inside loop" or "nested loops" in these very forums.
Thread locked.
Thomas