<?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 Function Module query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-query/m-p/3394577#M815083</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;In my FM i  am using another FM which updates kna1 and knvp&lt;/P&gt;&lt;P&gt;sometimes it doesnt&lt;/P&gt;&lt;P&gt;then it returns a sy-subrc 3 or 4 &lt;/P&gt;&lt;P&gt;but i am passing that return code in MY FM as shown&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'Y_ALB_PARTNER_KOPIEREN'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_kunnr_src  = p_wa_vbap_kunnr&lt;/P&gt;&lt;P&gt;      i_ktokd      = '0003'&lt;/P&gt;&lt;P&gt;      i_agkunnr    = p_wa_vbap_kkunnr&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      e_kunnr_dest = p_g_kunnr_dest&lt;/P&gt;&lt;P&gt;      e_rc         = .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i need to give the value of e_rc that is of type sy-subrc in my subroutine parmeters also becoz i m taking this value from inside the FM i m using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease let me know&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, 15 Feb 2008 09:05:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-15T09:05:11Z</dc:date>
    <item>
      <title>Function Module query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-query/m-p/3394577#M815083</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;In my FM i  am using another FM which updates kna1 and knvp&lt;/P&gt;&lt;P&gt;sometimes it doesnt&lt;/P&gt;&lt;P&gt;then it returns a sy-subrc 3 or 4 &lt;/P&gt;&lt;P&gt;but i am passing that return code in MY FM as shown&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'Y_ALB_PARTNER_KOPIEREN'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_kunnr_src  = p_wa_vbap_kunnr&lt;/P&gt;&lt;P&gt;      i_ktokd      = '0003'&lt;/P&gt;&lt;P&gt;      i_agkunnr    = p_wa_vbap_kkunnr&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      e_kunnr_dest = p_g_kunnr_dest&lt;/P&gt;&lt;P&gt;      e_rc         = .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i need to give the value of e_rc that is of type sy-subrc in my subroutine parmeters also becoz i m taking this value from inside the FM i m using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease let me know&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, 15 Feb 2008 09:05:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-query/m-p/3394577#M815083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T09:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-query/m-p/3394578#M815084</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;Your question is not clear.You are telling function module then sub-routine. Could you please be some more explanative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Farzan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 08:26:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-query/m-p/3394578#M815084</guid>
      <dc:creator>former_member137336</dc:creator>
      <dc:date>2008-02-22T08:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-query/m-p/3394579#M815085</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 proper procedure is whatever inside your fm you need to raise the exceptions using RAISE &amp;lt;exception name&amp;gt;.&lt;/P&gt;&lt;P&gt;This &amp;lt;exception name&amp;gt; must be declared in exceptions tab of SE37.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us suppose you have declared 3 exceptions READ_ERROR, WRITE_ERROR, UNKNOWN_ERROR and raised them in your fm code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the code that calls this fm will have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call function Z_ABC&lt;/P&gt;&lt;P&gt;Exporting:&lt;/P&gt;&lt;P&gt;  &amp;lt;exp parameters&amp;gt;&lt;/P&gt;&lt;P&gt;Importing:&lt;/P&gt;&lt;P&gt;  &amp;lt;imp parameters&amp;gt;&lt;/P&gt;&lt;P&gt;Exceptions:&lt;/P&gt;&lt;P&gt; Read_error      = 1&lt;/P&gt;&lt;P&gt; write_error      = 2&lt;/P&gt;&lt;P&gt;unknown_error = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you check the sy-subrc here if there is an exception inside the fm, then the value would be either 1, 2 or 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The number assignment will be done automatically in the cronological order in which the exceptions are defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above is the recommended procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps..&lt;/P&gt;&lt;P&gt;Harikrishna.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: harikrishna indugu on Feb 22, 2008 10:26 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 09:25:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-query/m-p/3394579#M815085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T09:25:28Z</dc:date>
    </item>
  </channel>
</rss>

