2006 Nov 06 10:35 AM
2006 Nov 06 10:40 AM
<b>Cancel</b> is not an exit command.
Leaving Event Blocks Using STOP
If you use the STOP statement within an event block, the system stops processing the block
immediately. The ABAP runtime environment triggers the next event
Leaving Event Blocks Using EXIT
If you use the STOP statement within an event block but not in a loop, the system stops
processing the block immediately. The ABAP runtime environment triggers the next event. Before and during selection screen processing, the next event in the prescribed sequence is always called. From the START-OF-SELECTION event onwards, the system starts the list processor directly when the EXIT statement occurs, and displays the list.
If the EXIT statement occurs in a loop using DO, WHILE, or LOOP, it is the loop that terminates, not the processing block.
Leaving Event Blocks Using CHECK
If you use the CHECK <expr> statement within an event block but not within a loop, and the
condition <expr> is not fulfilled, the system exits the processing block immediately.
<expr> can be any logical expression or the name of a selection table. If you specify a selection
table and the contents of the corresponding table work are do not fulfill the condition in the
selection table, it is the same as a false logical expression.
<b>You can exit out of an event at any time using the following statements:</b>
exit
check
stop
In all events
check immediately leaves the current event and processing continues with the next event (or action, such as displaying the selection screen or output list).
stop immediately leaves the current event and goes directly to the end-of-selection event. Executing stop within end-of-selection leaves the event. It doesn't cause an infinite loop.
In events that occur before start-of-selection
exit and check have the same behavior. They both leave the event immediately and processing continues with the next event (or action, such as display of the selection screen).
In start-of-selection and events that occur after it
exit terminates the report and shows the output list. A single exception exists; within top-of-page, exit behaves like check.
check leaves the event and processing continues with the next event (or action, such as display of the output list).
check, exit, and stop do not set the value of sy-subrc. If you want to set it, you can assign a numeric value to it before leaving.
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers
exit,stop,cancel and back
2006 Nov 06 10:37 AM
2006 Nov 06 10:38 AM
Hello,
BACK and STOP are not exit command.
CANCLE is not command.
Regards,
Naimesh
2006 Nov 06 10:39 AM
2006 Nov 06 10:40 AM
i think exit is the exir command as name suggest
The behaviour of exit is diff in diff situations
if you use it in coditional loops like do..enddo, while..endwhile and loop and loop ....it will comeout of the conditional loop.
and it behaves diff in events...
if you use exit in your prog it won't leave the prog but it depends where you used exit.
for example if you use exit after start-of-selection then program goes to the list(report output) without processing further.
if you use in initialization then it will directly to the selection screen without processing further.
2006 Nov 06 10:41 AM
Hi,
you can define exit-commands with function type 'E' (for module exit AT EXIT-COMMAND)
in menu painter
A.
2006 Nov 06 10:41 AM
if u are talking abt module pool progamming
back, exit and cancel are exit commands.
if its report programming
back and cancel are not commands
2006 Nov 06 10:56 AM
To terminate an entire loop immediately and unconditionally, use the EXIT statement in the statement block of the loop.
EXIT.
After this statement, the loop is terminated, and processing resumes after the closing statement of the loop structure (ENDDO, ENDWHILE, ENDLOOP, ENDSELECT). In nested loops, only the current loop is terminated.
DO 4 TIMES.
IF sy-index = 3.
EXIT.
ENDIF.
WRITE sy-index.
ENDDO.
The list output is:
1 2
In the third loop pass, the loop is terminated before the WRITE statement is processed.
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 Nov 06 10:40 AM
hi,
<b>check</b> immediately leaves the current event and processing continues with the next event (or action, such as displaying the selection screen or output list).
<b>stop</b> immediately leaves the current event and goes directly to the end-of-selection event. Executing stop within end-of-selection leaves the event. It doesn't cause an infinite loop.
In events that occur before start-of-selection
<b>exit and check</b> have the same behavior. They both leave the event immediately and processing continues with the next event .
In start-of-selection and events that occur after it
<b>exit</b> terminates the report and shows the output list. A single exception exists; within top-of-page, exit behaves like check.
<b>check</b> leaves the event and processing continues with the next event .
regards
Anver
<b><i>please mark points to all helpful answers</i></b>
2006 Nov 06 10:40 AM
<b>Cancel</b> is not an exit command.
Leaving Event Blocks Using STOP
If you use the STOP statement within an event block, the system stops processing the block
immediately. The ABAP runtime environment triggers the next event
Leaving Event Blocks Using EXIT
If you use the STOP statement within an event block but not in a loop, the system stops
processing the block immediately. The ABAP runtime environment triggers the next event. Before and during selection screen processing, the next event in the prescribed sequence is always called. From the START-OF-SELECTION event onwards, the system starts the list processor directly when the EXIT statement occurs, and displays the list.
If the EXIT statement occurs in a loop using DO, WHILE, or LOOP, it is the loop that terminates, not the processing block.
Leaving Event Blocks Using CHECK
If you use the CHECK <expr> statement within an event block but not within a loop, and the
condition <expr> is not fulfilled, the system exits the processing block immediately.
<expr> can be any logical expression or the name of a selection table. If you specify a selection
table and the contents of the corresponding table work are do not fulfill the condition in the
selection table, it is the same as a false logical expression.
<b>You can exit out of an event at any time using the following statements:</b>
exit
check
stop
In all events
check immediately leaves the current event and processing continues with the next event (or action, such as displaying the selection screen or output list).
stop immediately leaves the current event and goes directly to the end-of-selection event. Executing stop within end-of-selection leaves the event. It doesn't cause an infinite loop.
In events that occur before start-of-selection
exit and check have the same behavior. They both leave the event immediately and processing continues with the next event (or action, such as display of the selection screen).
In start-of-selection and events that occur after it
exit terminates the report and shows the output list. A single exception exists; within top-of-page, exit behaves like check.
check leaves the event and processing continues with the next event (or action, such as display of the output list).
check, exit, and stop do not set the value of sy-subrc. If you want to set it, you can assign a numeric value to it before leaving.
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers
2006 Nov 06 11:00 AM
Hi,
exit-> terminates current loop pass and control
stop -> terminates current program
cancel->
back -> used in interactive report
stop cancel back are not exit command
Regards
amole
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |