Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

reguarding events.

Former Member
0 Kudos

when we specify EXIT keyword in the "start-of-selection" then the control is teminating the program..i mean the rest of the code is not getting executed.

when EXIT statement is declared then the control shud come out off the current loop and execute the next loop .....then i have a problem that when i declare EXIT in start-of-selection then the program is getting terminated from there on......can u plz tell me why is that happening.....i ll give u the program that i have done....

initialization.

write : / "this is inital statement".

start-of-selection.

<b>exit.</b>

write : / " this is start of statement".

end-of-selection.

write : / "end statement"

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

START-OF-SELECTION and END-OF-SELECTION is not a loop. Thats why it is terminating

Thanks & Regards,

Naveen

3 REPLIES 3

Former Member
0 Kudos

hi,

START-OF-SELECTION and END-OF-SELECTION is not a loop. Thats why it is terminating

Thanks & Regards,

Naveen

Former Member
0 Kudos

Hi Sai ,

Please read the help on EXIT , it is clearely given how it will behave in diffrent scenarios.

Regards'

Arun

Former Member
0 Kudos

Hi,

If the <b>EXIT</b> statement is executed outside of a loop, it will immediately terminate the current processing block.

After the processing block has been executed, the runtime environment behaves in such a way that it follows with the exception Reporting Event Blocks START-OF-SELECTION and GET the schema from Leave Processing Blocks.

After the Reporting Processing Blocks START-OF-SELECTION and GET have been exited using EXIT, the runtime environment does not trigger any further reporting events. Instead, it directly calls the list processor for displaying the basic list.

EXIT is recommended only within loops. Instead, use RETURN to leave processing blocks.

The <b>RETURN</b> statement immediately ends the current processing block. It can appear in any area of a processing block and ends this block regardless of which statement block or control structure the statement is in.

After leaving the processing block, the runtime environment, except for the reporting event blockSTART-OF-SELECTION, follows the schema in Leave processing blocks.

After you end the reporting event block START-OF-SELECTIONwith RETURN, the runtime environment does not trigger any further reporting events, rather, it calls the list processor directly to display the basic list.

The <b>CONTINUE</b> statement can only be used in loops. If it is used, the current loop pass is ended immediately and the program flow is continued with the next loop pass.

Hope this helps.

Regards,

Richa