<?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 difference between sub routine and function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sub-routine-and-function-module/m-p/3721184#M895837</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;asap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 May 2008 10:40:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-07T10:40:00Z</dc:date>
    <item>
      <title>difference between sub routine and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sub-routine-and-function-module/m-p/3721184#M895837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;asap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 10:40:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sub-routine-and-function-module/m-p/3721184#M895837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T10:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: difference between sub routine and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sub-routine-and-function-module/m-p/3721185#M895838</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;Subroutines:&lt;/P&gt;&lt;P&gt;Subroutines are procedures that you can define in any ABAP program and also call from any program. Subroutines are normally called internally, that is, they contain sections of code or algorithms that are used frequently locally. If you want a function to be reusable throughout the system, use a function module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Modules:&lt;/P&gt;&lt;P&gt;Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Function Builder.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 10:43:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sub-routine-and-function-module/m-p/3721185#M895838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T10:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: difference between sub routine and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sub-routine-and-function-module/m-p/3721186#M895839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The name of a FORM must be unique within the program (two programs can have different FORMs with the same name). A FORM is intended to be called internal (from within the program, however by a 'trick' you can call them external).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The name of a FUNCTION has to be unique throughout the system. A FUNCTION is intended to be called external (and is thus shared by 'many' programs).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The latter is more important for programmers and maintenance. Since a FUNCTION is called external, it is important to keep the interface (parameters) the same. The interface of a FORM (which is intended to be called internal) is check when debugging a program (but it is only checked within the program that is debugged). So if the interface of a FORM is changed, but the call to the FORM (perform) is not, the debugger will notice this and issue an error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general: &lt;/P&gt;&lt;P&gt;A FORM is a local subroutine (which can be called external).&lt;/P&gt;&lt;P&gt;A FUNCTION is (more or less) a subroutine that is called external.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the subroutine is used only local (called internal) use a FORM. If the subroutine is called external (used by more than one program) use a FUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Vibha &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 10:46:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sub-routine-and-function-module/m-p/3721186#M895839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T10:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: difference between sub routine and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sub-routine-and-function-module/m-p/3721187#M895840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;subroutines r used only with in the program where we define and write the code. but function modules r created seperately in function builder(se37) and called with a program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subroutine is valid in only in the program where we write. but in the case of function module can be called in any program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 10:49:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sub-routine-and-function-module/m-p/3721187#M895840</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T10:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: difference between sub routine and function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sub-routine-and-function-module/m-p/3721188#M895841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sravanthiaksha krishna  ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These r the differences between sub routine and function module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) We CANNOT handle exceptions in subroutines whereas exceptions can be handled in function-module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Function modules return a value whereas subroutines do not return a value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Function modules can also be called from a remote system whereas subroutines cannot be called from a remote system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Function modules will be stored in function group&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers!&lt;/P&gt;&lt;P&gt;gyanaraj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****Pls reward points if u find this helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 11:01:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-sub-routine-and-function-module/m-p/3721188#M895841</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T11:01:37Z</dc:date>
    </item>
  </channel>
</rss>

