Skip to Content
0
Former Member
Nov 13, 2003 at 05:52 PM

Is it safe to have nested loops on the same internal table?

513 Views

Hello experts,

I am wondering that whether the follow code is legal/safe:

CLEAR old_key.

LOOP AT itab INTO itab_wa.

IF itab_wa-key <> old_key.

old_key = itab_wa-key.

LOOP AT itab INTO itab_wa1 WHERE key = old_key.

* do some processing here.

ENDLOOP.

ENDIF.

ENDLOOP.

Thanks and best regards.

zj