‎2009 Mar 13 9:55 AM
Hi Experts,
I have one doubt. I m working loop inside rhe loop.
Loop at itab.
loop at jtab.
IF<CONDITION>
i wanna know when IF condition would not be satisify the control should go to outer loop. What statement would be suitable for exit loop which i can write inside the else.
Regards,
Swapnika
STOP : is giving dump error .
Edited by: Swapnika Panse on Mar 13, 2009 10:56 AM
‎2009 Mar 13 9:57 AM
Use the statement EXIT.
CONTINUE is used if you want to continue processing for the next record.
Regards,
George
‎2009 Mar 13 9:59 AM
Hi,
Refer:
loop at itab.
if <condition>.
exit. "<--control moves out of loop (next line to endloop)
continue. "<--control moves to next loop pass
endif.
endloop.
Hope this helps you.
Regards,
Tarun
‎2009 Mar 13 10:01 AM
‎2009 Mar 13 10:06 AM
Hi There,
data: lv_rc type sy-subrc
I will do this if i were you
loop at itab
clear lv_rc.<<<<<<<<<<<<<<<<<
loop at jtab
if lv_rc = 4.
exit.
endif.
if <cond>
......
....
endif
lv_rc = sy-subrc
endloop.
endloop.
regards
Edited by: BrightSide on Mar 13, 2009 10:07 AM
Edited by: BrightSide on Mar 13, 2009 10:20 AM
‎2009 Mar 13 10:06 AM
hi,
Loop at itab.
loop at jtab.
IF<CONDITION>
*EXIT.*
endif.
endloop.
Endloop.
here Exit will go to outer loop.
‎2009 Mar 13 10:11 AM
hi ,
i did Exit. But problem is it again take value from outerloop and should comparision inside the loop if condition. But we r using exit statement it is not going again inside the second loop.
Regards,
‎2009 Mar 13 10:16 AM
HI,
Here use parallel cusror preocess. it will work, just try.
Thanks
Sri
‎2009 Mar 13 10:17 AM
Have u tried mine? that should work
Edited by: BrightSide on Mar 13, 2009 10:18 AM
‎2009 Mar 13 10:24 AM
Hi,
Could you please explain more clearly what you want???
regards,
Neha
‎2009 Mar 13 10:31 AM
Hi friend ,
Use like below.
Data c type i value 0.
Loop at itab.
loop at jtab.
if c ne 1.
IF<CONDITION>
c = 1.
continue.
endif.
endif.
endloop.
c = 0.
Endloop.
Hope it helps.
Thanks..
Edited by: Sap Fan on Mar 13, 2009 11:31 AM
‎2009 Mar 13 10:32 AM
HI ,
Yes it will work, performance point of also very good.
Thanks
Sri