<?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: exiting from a function module. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exiting-from-a-function-module/m-p/5093068#M1182162</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 &lt;STRONG&gt;EXIT&lt;/STRONG&gt; statement to exit out of FM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Jan 2009 07:23:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-21T07:23:42Z</dc:date>
    <item>
      <title>exiting from a function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exiting-from-a-function-module/m-p/5093065#M1182159</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;&lt;/P&gt;&lt;P&gt;I have a function module in which i am extracting output message from NAST based on vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I record is not found, then i am updating return table with error message using 'MESSAGE_TEXT_BUILD'.&lt;/P&gt;&lt;P&gt;Now i have to exit from the function module as my select statement is unsuccessful.&lt;/P&gt;&lt;P&gt;how do you do this?&lt;/P&gt;&lt;P&gt;can i use subroutines in a function module?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 07:11:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exiting-from-a-function-module/m-p/5093065#M1182159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-21T07:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: exiting from a function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exiting-from-a-function-module/m-p/5093066#M1182160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandeep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use &lt;STRONG&gt;EXIT&lt;/STRONG&gt; statement to exit out of the FM.&lt;/P&gt;&lt;P&gt;Yes, you can use sub-routines in Function Module. If you are using EXIT inside a sub-routine, the program control will come out of sub-routine and not the FM&amp;gt; So if it is inside a sub-routine, return sy-subrc value as a parameter of the sub-routine. Outside the sub-routine, check the value and use EXIT statement accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 07:17:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exiting-from-a-function-module/m-p/5093066#M1182160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-21T07:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: exiting from a function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exiting-from-a-function-module/m-p/5093067#M1182161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create an exception for ur FM.and after filling return tab.put RAISE exception.&lt;/P&gt;&lt;P&gt;it ll come out of FM.. with sy-subrc = the value for exception&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 07:21:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exiting-from-a-function-module/m-p/5093067#M1182161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-21T07:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: exiting from a function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exiting-from-a-function-module/m-p/5093068#M1182162</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 &lt;STRONG&gt;EXIT&lt;/STRONG&gt; statement to exit out of FM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 07:23:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exiting-from-a-function-module/m-p/5093068#M1182162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-21T07:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: exiting from a function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exiting-from-a-function-module/m-p/5093069#M1182163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandeep,&lt;/P&gt;&lt;P&gt;You can use EXIT to come out of FM but make sure that you dont write EXIT inside a LOOP..&lt;/P&gt;&lt;P&gt;Better way would be to RAISE an exception... All you have to do is declare an exception in Exceptions tab.. and do a RAISE &amp;lt;exception_name&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may have subroutines in FM.. the form can be declared in the MAIN program or any of the includes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 08:03:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exiting-from-a-function-module/m-p/5093069#M1182163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-21T08:03:15Z</dc:date>
    </item>
  </channel>
</rss>

