<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: problem in using 'STOP' statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514127#M236826</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example in the OO context, EXIT will exit a method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

*---------------------------------------------------------------------*
*       CLASS lcl_main DEFINITION
*---------------------------------------------------------------------*
class lcl_main definition.
  public section.
    class-methods: test.

endclass.



call method lcl_main=&amp;gt;test.



*---------------------------------------------------------------------*
*       CLASS lcl_main  IMPLEMEMENTATI
*---------------------------------------------------------------------*
class lcl_main implementation.
  method test.

    write:/ 'Before'.
    exit.
    write:/ 'After'.
  endmethod.

endclass.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Aug 2006 19:45:50 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-08-14T19:45:50Z</dc:date>
    <item>
      <title>problem in using 'STOP' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514121#M236820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am working on a BADI. On some condition im displaying message using 'POPUP_TO_CONFIRM' fm. If i click no, my control should be on same page, ie., the whole code after that should not execute.(Order should not be saved). But i am unable to use 'STOP' in OO context. Is there any alternative for this. I need to keep the control on the same page. Kindy help me soon..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 19:31:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514121#M236820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T19:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using 'STOP' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514122#M236821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try EXIT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 19:37:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514122#M236821</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T19:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using 'STOP' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514123#M236822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EXIT doesnt work. It is for coming out of loops.&lt;/P&gt;&lt;P&gt;Can I create my own exception? If yes how can i?&lt;/P&gt;&lt;P&gt;Is there any alternative for STOP in OO context. Kindly reply me its urgent.. plz..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 19:39:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514123#M236822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T19:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using 'STOP' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514124#M236823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simplest code I can think of is &lt;/P&gt;&lt;P&gt;Execute your code only if POP_UP_TO_CONFIRM has answer = Yes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 19:43:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514124#M236823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T19:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using 'STOP' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514125#M236824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EXIT will also come out of other things besides loops, like PERFORM calls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

perform test.

*---------------------------------------------------------------------*
*       FORM test                                                     *
*---------------------------------------------------------------------*
form test.

  write:/ 'Before'.

  exit.

  write:/ 'After'.


endform.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may also work in a method, but I'm concerned that you are already past the "Point of no return".  Simply exiting the method of the BADI, will not stop the transaction from processing the rest of the way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 19:43:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514125#M236824</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-14T19:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using 'STOP' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514126#M236825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EXIT will also terminate processing blocks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 19:44:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514126#M236825</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T19:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using 'STOP' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514127#M236826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example in the OO context, EXIT will exit a method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

*---------------------------------------------------------------------*
*       CLASS lcl_main DEFINITION
*---------------------------------------------------------------------*
class lcl_main definition.
  public section.
    class-methods: test.

endclass.



call method lcl_main=&amp;gt;test.



*---------------------------------------------------------------------*
*       CLASS lcl_main  IMPLEMEMENTATI
*---------------------------------------------------------------------*
class lcl_main implementation.
  method test.

    write:/ 'Before'.
    exit.
    write:/ 'After'.
  endmethod.

endclass.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 19:45:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514127#M236826</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-08-14T19:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using 'STOP' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514128#M236827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Absolutely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nice example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 19:49:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514128#M236827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T19:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using 'STOP' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514129#M236828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See my flow is like this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before an order is saved many BADI'S will be executed. In my first BADI im using the 'POPUP_TO_CONFIRM' FM. If i click no, the rest of all BADI'S should not be executed. That is i just need to display a message and that's it. Nothing else.&lt;/P&gt;&lt;P&gt;Here 'STOP' i cannot execute. &lt;/P&gt;&lt;P&gt;One more option what m thinking is, by creating our own exceptions, and if clicked no we can raise that exception. Is that possible. How to achieve that..?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 19:51:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514129#M236828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T19:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: problem in using 'STOP' statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514130#M236829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would create a global variable like CONTINUE_PROCESSING in the class object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the popup is set to appear and the user presses NO, then set to the global var to "not continue" (in the first BADI)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then check this global variable in all subsequent BADIs,  if var is set to no continue, then EXIT the current block of code (current BADI).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2006 19:55:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-stop-statement/m-p/1514130#M236829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-14T19:55:30Z</dc:date>
    </item>
  </channel>
</rss>

