<?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: Macros, Function modules and subroutines in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101136#M980716</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry but I do not agree with macros being obsolete. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They can be very usefull even in OO abap when you have to repeat the same code several times and sometimes it makes no sense to create a method for it. Calling a method means some overhead while using macros should be really fast.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 May 2010 08:19:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-05-28T08:19:59Z</dc:date>
    <item>
      <title>Macros, Function modules and subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101131#M980711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In performance wise which one is best macro or subroutine or Function module? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 15:39:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101131#M980711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T15:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Macros, Function modules and subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101132#M980712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nandini,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each and every one has its importance in certain situations..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Macros&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you want to reuse the same set of statements more than once in a program, you can include them in a macro. For example, this can be useful for long calculations or complex WRITE statements. You can only use a macro within the program in which it is defined, and it can only be called in lines of the program following its definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Subroutines&lt;/STRONG&gt; can call other subroutines (nested calls) and may also call themselves (recursive calls). Once a subroutine has finished running, the calling program carries on processing after the PERFORM statement. You can use the USING and CHANGING additions to supply values to the parameter interface of the subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Function modules&lt;/STRONG&gt; allow you to encapsulate and reuse global functions in the SAP System. They are managed in a central function library. The SAP System contains several predefined functions modules that can be called from any ABAP program. Function modules also play an important role during updating  and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.&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. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the Function Builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;raam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 15:43:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101132#M980712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T15:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macros, Function modules and subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101133#M980713</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;Each one has certain limitations and also it depends on implementation scenario...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If macro and subroutine is coming together the Subroutines play a good performance role and using subroutines is always advisable..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In current versions MACROS are obselete and about function modules this will also be less used as there are equivalent classes similar to that of Function modules if you check in SE24..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So usage of subroutines never ends and they will be very very much useful in daily programming life...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this would make you clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Narin Nandivada&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 15:47:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101133#M980713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T15:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Macros, Function modules and subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101134#M980714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All three are having good performance in abap.as well as drawback too.Macro is good but you can not debug it.&lt;/P&gt;&lt;P&gt;we can debug subroutine &amp;amp; FM..Subroutine is used when we want to call some code frequently &amp;amp; it will improve readability of program too.FM is having all these facility..We can write complex code in it too.&amp;amp; it can be used by any other program too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 15:53:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101134#M980714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T15:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Macros, Function modules and subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101135#M980715</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;this is not a question of performance but of style. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All these statements are obsolete since ABAP Objects raised  - METHODs (static or of instances) should be used instead. However for smaller developments and special purposes the old constructs are usefull or even required (Function Exists - usage of macros in HR, ...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;HP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 15:54:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101135#M980715</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T15:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Macros, Function modules and subroutines</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101136#M980716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry but I do not agree with macros being obsolete. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They can be very usefull even in OO abap when you have to repeat the same code several times and sometimes it makes no sense to create a method for it. Calling a method means some overhead while using macros should be really fast.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 08:19:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macros-function-modules-and-subroutines/m-p/4101136#M980716</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-28T08:19:59Z</dc:date>
    </item>
  </channel>
</rss>

