<?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: Back to selection screen after error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312236#M1224745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I know that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you anyway.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2009 18:41:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-13T18:41:24Z</dc:date>
    <item>
      <title>Back to selection screen after error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312227#M1224736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ABAPers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a executable program (REPORT) to do some processing (e.g. read a standard table with the parameters and select-options and save the data in a Z table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When occurs an error (e.g. when sy-subrc &amp;lt;&amp;gt; 0 after select) and a message of type E is showed, the program show the message in a "clean" screen with title SAP. Then, after ENTER or ESC, it leaves to initial screen of SAP (SAP Easy Access).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The message of type E is triggered from a routine (FORM) called from START-OF-SELECTION event. And the program don´t write nothing in list (only return a status message if everithing is ok).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I force the program to back to selection screen after some error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Charles Oliveira&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 14:41:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312227#M1224736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T14:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Back to selection screen after error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312228#M1224737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do the following for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the message give the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;start-of-selection.

Perform &amp;lt;routine&amp;gt;.
.
.
.
.
.
.
Form &amp;lt;routine&amp;gt;.
if &amp;lt;condition&amp;gt;.
  message 'xxxx' type 'S' display like 'E'.
  exit.
endif.
endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way the control returns to selection screen even after the message is triggered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sharath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 14:46:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312228#M1224737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T14:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Back to selection screen after error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312229#M1224738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try &lt;/P&gt;&lt;P&gt;Message SXXX display like 'E'.&lt;/P&gt;&lt;P&gt;Exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mathews&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 14:46:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312229#M1224738</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T14:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Back to selection screen after error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312230#M1224739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of 'exit' use 'stop'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;  message 'xxxx' type 'S' display like 'E'.&lt;/P&gt;&lt;P&gt;  STOP.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 14:55:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312230#M1224739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T14:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Back to selection screen after error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312231#M1224740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;START-OF-SELECTION.

IF &amp;lt;LOGICAL EXP&amp;gt;.
Message 'XXX' TYPE 'S' Display Like 'E'.

Leave LIST-PROCESSING .
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;START-OF-SELECTION.

IF &amp;lt;LOGICAL EXP&amp;gt;.
Message 'XXX' TYPE 'S' Display Like 'E'.

EXIT.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 15:01:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312231#M1224740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T15:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Back to selection screen after error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312232#M1224741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MESSAGE I208(00) WITH 'NO DATA FOUND'.
LEAVE LIST-PROCESSING.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 15:09:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312232#M1224741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T15:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Back to selection screen after error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312233#M1224742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;iz it supposed to be error message?  if it can be informative when sometHing failed and go back to selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;message i&amp;lt;id&amp;gt; with 'NO DATA FOUND'.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: BrightSide on Mar 13, 2009 3:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 15:17:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312233#M1224742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T15:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Back to selection screen after error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312234#M1224743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sharath,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution worked. But I used STOP in the place of EXIT, because there´s other form being called after the first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 16:56:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312234#M1224743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T16:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Back to selection screen after error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312235#M1224744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  The stop will work as long as you don't have END-OF-SELECTION...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  If you have END-OF-SELECTION event...then the stop will go to that event...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 17:26:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312235#M1224744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T17:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Back to selection screen after error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312236#M1224745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I know that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you anyway.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 18:41:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312236#M1224745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T18:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Back to selection screen after error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312237#M1224746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks @&lt;SPAN class="j-status-levels"&gt;&lt;/SPAN&gt;&lt;SPAN class="j-post-author"&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="246408" data-username="sharath.panuganti" href="https://answers.sap.com/people/sharath.panuganti"&gt;Sharath Panuganti&lt;/A&gt;. &lt;/STRONG&gt;That worked!&amp;nbsp; I too think we should use STOP instead of EXIT like others have mentioned.... EXIT should be used for exiting loops only.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 16:14:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-to-selection-screen-after-error/m-p/5312237#M1224746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-29T16:14:59Z</dc:date>
    </item>
  </channel>
</rss>

