‎2006 Jun 08 3:47 AM
Dear Guys,
In ERP 2005, Stop statement is giving run time dump in programs.
But in 46C its working fine. can we replace EXIT command replacing STOP statement here. Please explain and suggest me.
Thanks.
Ambichan.
‎2006 Jun 08 4:42 AM
Hi ,
<b>1</b>.
<b>EXIT</b> Statement.
=====
<b>Within a loop</b>: The entire loop is terminated, and processing continues with the first statement following the loop.
<b>Outside a loop</b>: Terminates the current processing block.
<b>In a reporting event</b>: Jumps directly to the output list.
<b>2</b>.
<b>STOP</b> Statement.
====
Only occurs in event blocks for reporting events. Leaves the event block and goes to the END-OF-SELECTION block.
Now decide whether we can use STOP statement in LOOP or not.We should not use within loop thats y dump is coming.
I think it gives u clear idea.
<b>Thanks,
Venkat.O</b>
‎2006 Jun 08 3:56 AM
Hi,
it depends on where you put the EXIT.
If you use the STOP statement within an event block, the system stops processing the block immediately.If the EXIT statement occurs in a loop using DO, WHILE, or LOOP, it is the loop that terminates, not the processing block.
You can also try the key word LEAVE.
Regards,
Suresh Datti
‎2006 Jun 08 4:31 AM
‎2006 Jun 08 4:42 AM
Hi ,
<b>1</b>.
<b>EXIT</b> Statement.
=====
<b>Within a loop</b>: The entire loop is terminated, and processing continues with the first statement following the loop.
<b>Outside a loop</b>: Terminates the current processing block.
<b>In a reporting event</b>: Jumps directly to the output list.
<b>2</b>.
<b>STOP</b> Statement.
====
Only occurs in event blocks for reporting events. Leaves the event block and goes to the END-OF-SELECTION block.
Now decide whether we can use STOP statement in LOOP or not.We should not use within loop thats y dump is coming.
I think it gives u clear idea.
<b>Thanks,
Venkat.O</b>
‎2006 Jun 08 4:56 AM
'STOP' The statement is only intended for use in the INITIALIZATION, AT SELECTION-SCREEN, START-OF-SELECTION, and GET events. It terminates the current processing block in an executable program and triggers the END-OF-SELECTION event. In all other processing blocks, or when you do not want to trigger the END-OF-SELECTION event, you must use EXIT.
‎2006 Jun 08 5:14 AM
Hi,
Basic form EXIT.
Effect - Within a loop structure:
Terminates loop processing (DO, WHILE, LOOP, SELECT).
- Within subroutines and other modularization units (but not in a loop structure):
Leaves the subroutine or modularization unit (FORM, MODULE,FUNCTION, TOP-OF-PAGE, END-OF-PAGE).
- Outside loop structures and modularization units (report
processing):
Terminates report processing and triggers list display.
STOP.
This statement is not allowed in an ABAP Objects context.
STOP not allowed.
This statement terminates a processing block in an excutable program.
The statement is only intended for use in the INITIALIZATION,AT SELECTION-SCREEN, START-OF-SELECTION, and GET events.
It terminates the current processing block in an executable program and triggers the END-OF-SELECTION event. In all other processing blocks, or when you do not want to trigger the END-OF-SELECTION event, you must use EXIT.
Reward points if helpful,
Rgds,
Sumana