<?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: What is the difference between subroutine and function module? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-difference-between-subroutine-and-function-module/m-p/2755515#M641165</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;There is a difference between a Subroutine and Function Module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Subroutines have no Exceptions Parameters.&lt;/P&gt;&lt;P&gt;    FM have Exceptions parameters to catch the exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Subroutines can be accessed locally i.e. local Modularization Unit.&lt;/P&gt;&lt;P&gt;    FM have Global Access i.e. they are Global Modularization Unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Subroutines can not be tested independently.&lt;/P&gt;&lt;P&gt;    FM can be tested independently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Subroutines Explicitly wont return any values.&lt;/P&gt;&lt;P&gt;   FM explicitly returns values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Subroutines is not remote Enables.&lt;/P&gt;&lt;P&gt;    FM can be made Remote Enables and can be called from non-SAP systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Optional parameters cannot be in Subroutines.&lt;/P&gt;&lt;P&gt;    FM can be defined with optional Parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samantak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Rewards points for useful answers.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Sep 2007 04:08:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-13T04:08:34Z</dc:date>
    <item>
      <title>What is the difference between subroutine and function module?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-difference-between-subroutine-and-function-module/m-p/2755514#M641164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the difference between subroutine and function module?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2007 20:43:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-difference-between-subroutine-and-function-module/m-p/2755514#M641164</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-12T20:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between subroutine and function module?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-difference-between-subroutine-and-function-module/m-p/2755515#M641165</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;There is a difference between a Subroutine and Function Module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Subroutines have no Exceptions Parameters.&lt;/P&gt;&lt;P&gt;    FM have Exceptions parameters to catch the exceptions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Subroutines can be accessed locally i.e. local Modularization Unit.&lt;/P&gt;&lt;P&gt;    FM have Global Access i.e. they are Global Modularization Unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Subroutines can not be tested independently.&lt;/P&gt;&lt;P&gt;    FM can be tested independently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Subroutines Explicitly wont return any values.&lt;/P&gt;&lt;P&gt;   FM explicitly returns values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Subroutines is not remote Enables.&lt;/P&gt;&lt;P&gt;    FM can be made Remote Enables and can be called from non-SAP systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Optional parameters cannot be in Subroutines.&lt;/P&gt;&lt;P&gt;    FM can be defined with optional Parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samantak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Rewards points for useful answers.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2007 04:08:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-difference-between-subroutine-and-function-module/m-p/2755515#M641165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-13T04:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between subroutine and function module?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-difference-between-subroutine-and-function-module/m-p/2755516#M641166</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;they can both return values. &lt;/P&gt;&lt;P&gt;FMs are mainly used when a routine is to be performed by many programs. &lt;/P&gt;&lt;P&gt;Subroutines (forms) are generally only executed within one program.&lt;/P&gt;&lt;P&gt;You can perform routines from other programs, but it's not often done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;both forms and FMs are reusable modularization units. &lt;/P&gt;&lt;P&gt;To distinguish we generally say that forms are used for internal modularization and &lt;/P&gt;&lt;P&gt;FMs are used for external modularization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To decide on which to implement, consider whether you need the content to be used just for a limited program&lt;/P&gt;&lt;P&gt;or wheteher it can be called from many independent programs. &lt;/P&gt;&lt;P&gt;For the first purpose it is better to implement a form whereas for the second we implement an FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, ABAP does not isolate the usage context. &lt;/P&gt;&lt;P&gt;That is; you can call a form from another program within whose code the form is not actually implemented.&lt;/P&gt;&lt;P&gt;However, this requires attention since the form may utilize global variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same issue holds for FMs.&lt;/P&gt;&lt;P&gt;FMs are encapsulated in function groups and function groups may have global variables that can be globally &lt;/P&gt;&lt;P&gt;used by all FMs inside it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Reward If Helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2007 04:14:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-difference-between-subroutine-and-function-module/m-p/2755516#M641166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-13T04:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between subroutine and function module?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-difference-between-subroutine-and-function-module/m-p/2755517#M641167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check the thread from sdn:&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="61316"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2007 04:17:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-the-difference-between-subroutine-and-function-module/m-p/2755517#M641167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-13T04:17:20Z</dc:date>
    </item>
  </channel>
</rss>

