<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros/m-p/3759137#M904406</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 are like #include in c programs.&lt;/P&gt;&lt;P&gt;Macros can only be used in the program the are defined in and only after the &lt;/P&gt;&lt;P&gt;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;&lt;/P&gt;&lt;P&gt;In general: &lt;/P&gt;&lt;P&gt;A MACRO is more or less an abbreviation for some lines of code that are used &lt;/P&gt;&lt;P&gt;more than once or twice. &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;Since debugging a MACRO is not really possible, prevent the use of them &lt;/P&gt;&lt;P&gt;(I've never used them, but seen them in action). &lt;/P&gt;&lt;P&gt;If the subroutine is used only local (called internal) use a FORM. &lt;/P&gt;&lt;P&gt;If the subroutine is called external (used by more than one program) use a &lt;/P&gt;&lt;P&gt;FUNCTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Success and keep in mind that the screw up from a macro can cause a lot of &lt;/P&gt;&lt;P&gt;work (more than the creation of a form), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/9f/db972835c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/9f/db972835c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;see this link .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will useful for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZMACRO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: RESULT TYPE I,&lt;/P&gt;&lt;P&gt;      N1     TYPE I VALUE 5,&lt;/P&gt;&lt;P&gt;      N2     TYPE I VALUE 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE OPERATION.&lt;/P&gt;&lt;P&gt;   RESULT = &amp;amp;1 &amp;amp;2 &amp;amp;3.&lt;/P&gt;&lt;P&gt;   OUTPUT   &amp;amp;1 &amp;amp;2 &amp;amp;3 RESULT.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE OUTPUT.&lt;/P&gt;&lt;P&gt;   WRITE: / 'The result of &amp;amp;1 &amp;amp;2 &amp;amp;3 is', &amp;amp;4.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPERATION 4 + 3.&lt;/P&gt;&lt;P&gt;OPERATION 2 ** 7.&lt;/P&gt;&lt;P&gt;OPERATION N2 - N1.&lt;/P&gt;&lt;P&gt;*reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: jeevitha on May 8, 2008 10:29 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 May 2008 04:56:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-08T04:56:33Z</dc:date>
    <item>
      <title>Macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros/m-p/3759135#M904404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are the precautions to be taken while writing a new macro in TRMAC table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please mention a scenario where the usage of macro is apt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prosenjit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 04:36:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macros/m-p/3759135#M904404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T04:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros/m-p/3759136#M904405</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 are like #include in c programs.&lt;/P&gt;&lt;P&gt;These are local to program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/9f/db972835c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/9f/db972835c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;see this link .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will useful for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZMACRO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: RESULT TYPE I,&lt;/P&gt;&lt;P&gt;      N1     TYPE I VALUE 5,&lt;/P&gt;&lt;P&gt;      N2     TYPE I VALUE 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE OPERATION.&lt;/P&gt;&lt;P&gt;   RESULT = &amp;amp;1 &amp;amp;2 &amp;amp;3.&lt;/P&gt;&lt;P&gt;   OUTPUT   &amp;amp;1 &amp;amp;2 &amp;amp;3 RESULT.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE OUTPUT.&lt;/P&gt;&lt;P&gt;   WRITE: / 'The result of &amp;amp;1 &amp;amp;2 &amp;amp;3 is', &amp;amp;4.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPERATION 4 + 3.&lt;/P&gt;&lt;P&gt;OPERATION 2 ** 7.&lt;/P&gt;&lt;P&gt;OPERATION N2 - N1.&lt;/P&gt;&lt;P&gt;*reward points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 04:55:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macros/m-p/3759136#M904405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T04:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros/m-p/3759137#M904406</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 are like #include in c programs.&lt;/P&gt;&lt;P&gt;Macros can only be used in the program the are defined in and only after the &lt;/P&gt;&lt;P&gt;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;&lt;/P&gt;&lt;P&gt;In general: &lt;/P&gt;&lt;P&gt;A MACRO is more or less an abbreviation for some lines of code that are used &lt;/P&gt;&lt;P&gt;more than once or twice. &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;Since debugging a MACRO is not really possible, prevent the use of them &lt;/P&gt;&lt;P&gt;(I've never used them, but seen them in action). &lt;/P&gt;&lt;P&gt;If the subroutine is used only local (called internal) use a FORM. &lt;/P&gt;&lt;P&gt;If the subroutine is called external (used by more than one program) use a &lt;/P&gt;&lt;P&gt;FUNCTION. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Success and keep in mind that the screw up from a macro can cause a lot of &lt;/P&gt;&lt;P&gt;work (more than the creation of a form), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/9f/db972835c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/9f/db972835c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;see this link .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will useful for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZMACRO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: RESULT TYPE I,&lt;/P&gt;&lt;P&gt;      N1     TYPE I VALUE 5,&lt;/P&gt;&lt;P&gt;      N2     TYPE I VALUE 6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE OPERATION.&lt;/P&gt;&lt;P&gt;   RESULT = &amp;amp;1 &amp;amp;2 &amp;amp;3.&lt;/P&gt;&lt;P&gt;   OUTPUT   &amp;amp;1 &amp;amp;2 &amp;amp;3 RESULT.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE OUTPUT.&lt;/P&gt;&lt;P&gt;   WRITE: / 'The result of &amp;amp;1 &amp;amp;2 &amp;amp;3 is', &amp;amp;4.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPERATION 4 + 3.&lt;/P&gt;&lt;P&gt;OPERATION 2 ** 7.&lt;/P&gt;&lt;P&gt;OPERATION N2 - N1.&lt;/P&gt;&lt;P&gt;*reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: jeevitha on May 8, 2008 10:29 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 04:56:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macros/m-p/3759137#M904406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T04:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macros/m-p/3759138#M904407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Check the theard&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=11558868&amp;amp;messageID=4767053" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=11558868&amp;amp;messageID=4767053&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kiran Sure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2008 04:59:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macros/m-p/3759138#M904407</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-08T04:59:05Z</dc:date>
    </item>
  </channel>
</rss>

