<?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: Return codes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413187#M819749</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at this thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="410140"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might be useful for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Feb 2008 10:39:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-08T10:39:00Z</dc:date>
    <item>
      <title>Return codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413185#M819747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i am creating a FM&lt;/P&gt;&lt;P&gt;i wanna know how is return codes used in FM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any example?&lt;/P&gt;&lt;P&gt;Whats there use even if i m running my FM in background&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnkx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 10:36:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413185#M819747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T10:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Return codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413186#M819748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bhanu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Return codes are the SY-SUBRC values set by a funtion module when you raise an exception. Say you have created 5 exceptions for a function module, then the first function module if raised using RAISE &amp;lt;exception&amp;gt; command would set SY-SUBRC as 1 in the calling program ... and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is mainly used for exception/error handling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. You have a function module with exceptions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTION1&lt;/P&gt;&lt;P&gt;EXCEPTION2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you call the function module in calling program using Pattern, it would create the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;     EXCEPTIONS1 = 1&lt;/P&gt;&lt;P&gt;     EXCEPTIONS2 = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Aditya Laud on Feb 8, 2008 5:38 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 10:38:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413186#M819748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T10:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Return codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413187#M819749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at this thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="410140"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Might be useful for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 10:39:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413187#M819749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T10:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Return codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413188#M819750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The exporting section of the interface is used to communicate the results of the ABAP handler processing. The return code RFCRC parameter is a single field used to determine the code a connector returns. The possible values are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RC = 0 (success, VALCHANGE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RC = 1 (failure, FAIL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The RETURN_TEXT parameter is a 120-character free text field that is written to by the connector or logged as an error message in the return status descriptor. If the ABAP handler does not provide a value for this parameter, then Y_XR_RFC_DO_VERB_NEXTGEN supplies default text depending on the return code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;The exceptions section of the interface defines two exceptions. It is recommended that you use the exporting parameters instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;REWARD POINTS IF USEFUL&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 10:41:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413188#M819750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T10:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Return codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413189#M819751</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;Inorder to get return codes u have to maintain exceptions in the function module and u have to raise that exception in the function module then only when u call the FM in ur program the sy-subrc value is returned other wise it will always return as ZERO..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the way u have to do..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;source code in FM..&lt;/P&gt;&lt;P&gt;import&lt;/P&gt;&lt;P&gt;MATNR TYPE MATNR&lt;/P&gt;&lt;P&gt;export&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;tables&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;NO_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select matnr from mara where matnr = matnr.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;RAISE NO_DATA.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;ENDFUCNTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now when u call this FM in ur program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION &amp;lt;FMNAME&amp;gt;&lt;/P&gt;&lt;P&gt;EXPORT&lt;/P&gt;&lt;P&gt;MATNR = MATNR&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;NO_DATA = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;throw error message.&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;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 10:43:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413189#M819751</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2008-02-08T10:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Return codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413190#M819752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at [Calling Function Modules|http://help.sap.com/saphelp_47x200/helpdata/en/9f/db98ef35c111d1829f0000e829fbfe/frameset.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 11:03:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-codes/m-p/3413190#M819752</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-02-08T11:03:35Z</dc:date>
    </item>
  </channel>
</rss>

