<?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: Stop a function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571205#M257828</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;   Use can use a RETURN statement once you check for the error and found any error in the routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Uma.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Oct 2006 07:54:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-12T07:54:58Z</dc:date>
    <item>
      <title>Stop a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571199#M257822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a fuction module and I will export errors. When I export an error, the function module must stop. How can I stop the function module after the error message? Can I use exit?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 06:45:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571199#M257822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-12T06:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Stop a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571200#M257823</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;i think exit will work fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards, &lt;/P&gt;&lt;P&gt;Sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 06:47:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571200#M257823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-12T06:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Stop a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571201#M257824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put an export value check after execution of function module.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 06:52:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571201#M257824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-12T06:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Stop a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571202#M257825</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;1. If y r handling the exceptions, u can stop the FM using 'RAISE exception1' statement. This will return the sy-subrc with the value u assigned to 'exception1'. By checking the sy-subrc u can display the erroe message.&lt;/P&gt;&lt;P&gt;2. If y r not handling the exceptions:&lt;/P&gt;&lt;P&gt;if &amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;    message i002(sy) with 'ERROR'.&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;Regards,&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 06:59:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571202#M257825</guid>
      <dc:creator>rajeshkumar_kaveti</dc:creator>
      <dc:date>2006-10-12T06:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: Stop a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571203#M257826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't use exceptions. In my function module I have some subroutines. In this subroutines are the error messages. When I use exit it don't stop? What can I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM XY CHANGING MSGERROR TYPE BAPIRETURN.
...

IF NOT XX &amp;lt;&amp;gt; ''.

   error-type = 'W'.
   error-message = 'Error'(001).
   exit.

  ENDIF.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 07:44:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571203#M257826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-12T07:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Stop a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571204#M257827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess it is coming out of subroutine. If this is true again use exit by checking a condition in FM as the subsequent statement to subroutine call.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 07:51:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571204#M257827</guid>
      <dc:creator>rajeshkumar_kaveti</dc:creator>
      <dc:date>2006-10-12T07:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Stop a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571205#M257828</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;   Use can use a RETURN statement once you check for the error and found any error in the routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Uma.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 07:54:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571205#M257828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-12T07:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Stop a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571206#M257829</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;May be you are in LOOP...ENDLOOP statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Yes, Just put a flag in the error scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And after loop...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF V_FLAG = 'X'.&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;Thanks,&lt;/P&gt;&lt;P&gt;Ramakrishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 08:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571206#M257829</guid>
      <dc:creator>venkata_ramisetti</dc:creator>
      <dc:date>2006-10-12T08:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Stop a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571207#M257830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Rajesh kumar kaveti: That was it, thank you! Now I want to click Solved Problem (10), so that you get 10 Points, but there is an error: Rewarding the message failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, so I don't rate you...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 08:02:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571207#M257830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-12T08:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Stop a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571208#M257831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     There so noway in ABAP where you can exit the program. If you use EXIT or RETURN this will only stop the current processing block. So if you say EXIT from a subroutine it only exits the subroutine not the Function Module. You can use LEAVE PROGRAM if you really want to comeout of the program. If you just want to come out of the FM its better use set some flag in the subroutine before exit and use that flat in FM to call EXIT again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 08:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/stop-a-function-module/m-p/1571208#M257831</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2006-10-12T08:15:36Z</dc:date>
    </item>
  </channel>
</rss>

