‎2006 Oct 27 2:24 PM
Friendz,
could u plz explain me the exact diffrence between
<b>EXIT , CHECK , CONTINUE </b> statements in reports and where exactly we need to use these.
regards,
siri.
‎2006 Oct 27 2:28 PM
Exit will leave a loop, form.
Check is used to check a field for a value
CHECK SY-SUBRC EQ 0.
....
....
....
If the value of SUBRC eq 4 then the code is not executed.
Continue is used within a loop.
Loop at .... into .....
if not field is initial.
continue. "This will then make the
"program goto the next
"occurance in the internal table
endif.
endloop.
SAP help is also a good trick.
‎2006 Oct 27 2:28 PM
Exit will leave a loop, form.
Check is used to check a field for a value
CHECK SY-SUBRC EQ 0.
....
....
....
If the value of SUBRC eq 4 then the code is not executed.
Continue is used within a loop.
Loop at .... into .....
if not field is initial.
continue. "This will then make the
"program goto the next
"occurance in the internal table
endif.
endloop.
SAP help is also a good trick.
‎2006 Oct 27 2:31 PM
<b>EXIT</b> will take you out of the loops performs etc
<b>continue</b> takes you to the begening of the loops and check for the next loop value
<b>Check</b> works as a if statement where acording to the condition next statement is executed or skiped.
‎2006 Oct 27 2:31 PM
EXIT is used to come out of the current loop processing in DO,WHILE,LOOP & SELECT Blocks..
A WHILE.logexp block repeats the processing enclosed between the WHILE and ENDWHILE statements as long as the logical expression logexp is true.
CONTINUE terminates the current loop pass (suhc as DO,WHILE,LOOP & SELECT Blocks.. ), returns the processing to the beginning of the loop and starts the next loop pass, if there is one.
~Suresh
‎2006 Oct 27 2:31 PM
Hi,
with in a loop
continue - go to the next without processing the current record.
exit - comes out of the loop.
check - works same as continue
with in a perform
exit - comes out of the form
check - comes out of the form
Madhavi
‎2006 Oct 27 2:31 PM
HI Sireesha,
· - This is used when you want to continue the loop process on certain condition without coming out of the loop. (may be Do endo or loop endloop)
Reward points if this helps.
Manish
Message was edited by: Manish Kumar
‎2006 Oct 27 2:33 PM
Hi ,
just understand this program .
data : a type i value 2,
b type i value 3,
c type i value 4,
d type i .
check a < b.
write:/ a.
if a > b.
write:/ a.
exit.
else .
write:/ b.
endif.
do 2 times.
d = d + 1.
continue.
d = d + 3.
enddo.
write:/ d.
regards,
VIjay
‎2006 Oct 27 2:45 PM
Hi Sireesha,
all these statement works depends on the place you are using.
Exit: when ever you want to come out of the loop or perform of report you use this statement in that loop or perform or report(start-of-selection or end-of-selection).
Check: if you don't want to proceed further if and only if some condition satisfies, then you use this statement.
Continue: this statement you use in loop. control will go to the next loop from the point where you write this statement.
-Anu.
‎2006 Oct 28 8:53 AM
Exit : transfers the control out of the loop.
Continue : skip the current loop pass and transfers the control to the loop for the next loop pass.
Check : if the condition is satisfied then it executes the next statement otherwise it behaves just like continue statement (ie, skip the current loop pass and transfers the control to the loop for the next loop pass.)