‎2006 Oct 27 3:05 PM
Please explain me what this continue statement do here.
IF lt_capreq[] IS INITIAL.
CONTINUE .
ENDIF.
LOOP AT lt_capreq ASSIGNING <lt_capreq> .
CHECK <lt_capreq>-act_status NE 6.
CHECK <lt_capreq>-acttype EQ 'P'.
MOVE <lt_capreq>-orderid TO wa_opr_key-orderid.
MOVE <lt_capreq>-oprcounter TO wa_opr_key-oprcounter.
APPEND wa_opr_key TO lt_opr_key_tab. "Has OrdID
ENDLOOP.
‎2006 Oct 27 3:07 PM
‎2006 Oct 27 3:07 PM
hi John,
CONTINUE terminates the current loop pass, returns the processing to the beginning of the loop and starts the next loop pass, if there is one.
Regards,
Santosh
‎2006 Oct 27 3:07 PM
Hi,
If you use CONITINUE in the LOOP...ENDLOOP, it will skip the following code that exists till ENDLOOP. and control goes again to the starting of LOOP to process the subsequent record.
IF just want comeout from LOOP..ENDLOOP use EXIT
Thanks
Ramakrishna
‎2006 Oct 27 3:09 PM
Hi Johnn,
If lt_capreq[] IS INITIAL.
CONTINUE . This will come out of this current loop processing and go to next loop process.
ENDIF.
Reward points if this helps.
Manish
‎2006 Oct 27 3:10 PM
Normally we dont use continue statment whithout a loop.
like
DO 100 TIMES.
IF SY-INDEX >= 10 AND SY-INDEX <= 20.
CONTINUE.
ENDIF.
write:/ SY-INDEX.
ENDDO.
here write statement is not executed for SY-INDEX >= 10 AND SY-INDEX <= 20
for all other values it is executed.
continue statement without loop dont make any sense.
‎2006 Oct 27 3:10 PM
lets the internal table lt_caprep is initial with no contents ,
it doesn't process the below code in the loop and goes for the next iteration .
this will make u clear.
ex..
data : a type i value 2,
b type i value 3,
c type i value 4,
d type i .
do 2 times.
d = d + 1.
continue.
d = d + 3.
enddo.
regards,
Vijay
‎2006 Oct 27 3:32 PM
Are you using LDB in the below ABAP ?
If not the below statement does not have any impact.
‎2006 Oct 27 3:38 PM
Johnn,
you are using the continue in if statement?
continue can use in loop statement only.
in loop it skips the lines after continue statement and go to next record of loop.
-Anu