<?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: regarding function module. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module/m-p/2681637#M619880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i understood your question correct.. you are talking about the PATTERN button in the abap editor..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are trying to add the code for calling your function module using the pattern button and it is not giving the statements for sy-subrc check while adding the code to your program.. am i right???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i am correct.. The only possibility for this is... that your funtion module has no Exception..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When a function module has no exception defined, then  it never changes the value of sy-subrc and thus the sy-subrc check after call to such a function module is not necessary..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to this.. while using patter you do not get the sy-subrc check lines..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Vikas Bittera..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;Award points for suitable answers&lt;/STRONG&gt;**&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Aug 2007 00:36:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-27T00:36:04Z</dc:date>
    <item>
      <title>regarding function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module/m-p/2681635#M619878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is very very imp. plz help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i  created a new function module. so that when i called that function module in some program its not displaying the " IF SY-SUBRC NE 0"  at the end of the funtion module. how can i do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Aug 2007 09:40:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module/m-p/2681635#M619878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-26T09:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: regarding function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module/m-p/2681636#M619879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you clarify the question please - are you saying you are calling the function module from a program, and then testing sy-subrc after the call?  If so, then your function module needs to have a list of exceptions defined and then you use "raising &amp;lt;i&amp;gt;my_exception_name&amp;lt;/i&amp;gt;." within the FM code and test this in your calling program e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = l_dyname
          dynumb               = l_dynumb
        TABLES
          dynpfields           = lt_dynpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          others               = 10.
 
  case sy-subrc.
    when 0.
      write: / 'all is good'.
    when 1.
     write: / 'invalid_abapworkarea found'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Aug 2007 11:56:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module/m-p/2681636#M619879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-26T11:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: regarding function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module/m-p/2681637#M619880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i understood your question correct.. you are talking about the PATTERN button in the abap editor..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are trying to add the code for calling your function module using the pattern button and it is not giving the statements for sy-subrc check while adding the code to your program.. am i right???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i am correct.. The only possibility for this is... that your funtion module has no Exception..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When a function module has no exception defined, then  it never changes the value of sy-subrc and thus the sy-subrc check after call to such a function module is not necessary..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to this.. while using patter you do not get the sy-subrc check lines..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Vikas Bittera..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;Award points for suitable answers&lt;/STRONG&gt;**&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2007 00:36:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module/m-p/2681637#M619880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-27T00:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: regarding function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module/m-p/2681638#M619881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you have created the function module, then im sure that you haven't defined any exceptions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit your function in SE37 and click on the exceptions tab&lt;/P&gt;&lt;P&gt;here you can define exceptions. after doing this, saving and activating it, try calling it again with the Pattern button&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2007 03:19:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module/m-p/2681638#M619881</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2007-08-27T03:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: regarding function module.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module/m-p/2681639#M619882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii. Venkat..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only when you add Exceptions while Creating FM , The system will add this condion (IF SY-SUBRC &amp;lt;&amp;gt; 0) while calling the FM using Pattern.&lt;/P&gt;&lt;P&gt;So Create the Exceptions if necessary if ur FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise it is not mandatory to check the Sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward if Helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2007 03:38:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-function-module/m-p/2681639#M619882</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-08-27T03:38:07Z</dc:date>
    </item>
  </channel>
</rss>

