<?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: Difference in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720329#M895587</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jiccs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macros can only be used in the program the are defined in and only after the definition.&lt;/P&gt;&lt;P&gt;Macros can take max 9 parameters.&lt;/P&gt;&lt;P&gt;Macros are expanded at compilation / generation.&lt;/P&gt;&lt;P&gt;A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). &lt;/P&gt;&lt;P&gt;Macros Cannot be Debugged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subroutines (FORM) can be called from both the program the are defined in and other programs ('perform&lt;/P&gt;&lt;P&gt;' of 'perform in program ').&lt;/P&gt;&lt;P&gt;Subroutines can take any amount of parameters.&lt;/P&gt;&lt;P&gt;Subroutines are 'expanded' at runtime.&lt;/P&gt;&lt;P&gt;A FUNCTION is (more or less) a subroutine that is called external.&lt;/P&gt;&lt;P&gt;Subroutines Can be Debugged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Apr 2008 12:19:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-28T12:19:32Z</dc:date>
    <item>
      <title>Difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720328#M895586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Explain difference between macro and subroutine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 12:17:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720328#M895586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-28T12:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720329#M895587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jiccs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macros can only be used in the program the are defined in and only after the definition.&lt;/P&gt;&lt;P&gt;Macros can take max 9 parameters.&lt;/P&gt;&lt;P&gt;Macros are expanded at compilation / generation.&lt;/P&gt;&lt;P&gt;A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. A FORM is a local subroutine (which can be called external). &lt;/P&gt;&lt;P&gt;Macros Cannot be Debugged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subroutines (FORM) can be called from both the program the are defined in and other programs ('perform&lt;/P&gt;&lt;P&gt;' of 'perform in program ').&lt;/P&gt;&lt;P&gt;Subroutines can take any amount of parameters.&lt;/P&gt;&lt;P&gt;Subroutines are 'expanded' at runtime.&lt;/P&gt;&lt;P&gt;A FUNCTION is (more or less) a subroutine that is called external.&lt;/P&gt;&lt;P&gt;Subroutines Can be Debugged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 12:19:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720329#M895587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-28T12:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720330#M895588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HII&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subroutines (FORM) can be called from both the program the are defined in and other programs .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; A MACRO is more or less an abbreviation for some lines of code that are used more than once or twice. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since debugging a MACRO is not really possible, prevent the use of them . If the subroutine is used only local (called internal) use a FORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 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;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 28, 2008 4:51 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 12:20:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720330#M895588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-28T12:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720331#M895589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Subroutine is a block of code you would execute with a PERFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Macro is a section of code that is normally redundent and you can save your self some work by using it to implement the code with different parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macro Example&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*_________________________________________________ Macros
DEFINE filefrom.
* &amp;amp;1 file   field name
* &amp;amp;2 screen field name
* &amp;amp;3 radio group name
* &amp;amp;4 modif id name
* text-305 = From
* text-306 = File
* text-307 = Screen
  selection-screen begin of line.
  selection-screen comment 1(10)  text-305 modif id &amp;amp;4.
  selection-screen comment 14(05) text-306 modif id &amp;amp;4.
  selection-screen position 20.
  parameters: &amp;amp;1 radiobutton group &amp;amp;3 default 'X' modif id &amp;amp;4.
  selection-screen comment 24(06)  text-307 modif id &amp;amp;4.
  selection-screen position 31.
  parameters: &amp;amp;2 radiobutton group &amp;amp;3 modif id &amp;amp;4.
  selection-screen end   of line.
END-OF-DEFINITION.
*
*
*
*
*  And the use of it.
*
*
SELECTION-SCREEN: BEGIN OF BLOCK blk3 WITH FRAME TITLE text-003.

filefrom p_cmtf p_cmts grp3 new.           " &amp;lt;== Macro being used will generate the above code using the 4 parameter passed

SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10)  text-361 MODIF ID new.
SELECTION-SCREEN POSITION 12.
PARAMETERS: p_comm(132)      TYPE c LOWER CASE MODIF ID new.
SELECTION-SCREEN END   OF LINE.

SELECTION-SCREEN: END OF BLOCK blk3.
*
*
*
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 12:22:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720331#M895589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-28T12:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720332#M895590</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;Macros can only be used in the program the are defined in and only after the definition are expanded at compilation / generation. A macro is more or less an abbreviation for some lines of code that are used more than once or twice. Since debugging a MACRO is not really possible, prevent the use of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subroutines  can be called from both the program the are defined in and other programs . A FORM is a local subroutine (which can be called external). A FUNCTION is (more or less) a subroutine that is called external.  If the subroutine is used only local (called internal) use a FORM to call it.  If the subroutine is called externally use a Function to call it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 12:22:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720332#M895590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-28T12:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Difference</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720333#M895591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Macros do NOT evaluate the values passed during run-time. This creates the effect of abbreviating code. It is as if the compiler writes the code over and over again. This is the reason why you cant debug macros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subroutines evaluate their values during run-time. Memory is alloted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2008 12:25:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference/m-p/3720333#M895591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-28T12:25:04Z</dc:date>
    </item>
  </channel>
</rss>

