<?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: Macro Definition Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/macro-definition-problem/m-p/3060170#M724865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Parameters can be accessed with &amp;amp;. You don't need to use the single quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DEFINE SUBT.

select * from setnode 
where setclass = '0101'
and subclass = 'AAAA'.
and SETNAME = &amp;amp;1.   " &amp;lt;&amp;lt; &amp;amp;1 without quotes

SUBTOTAL setnode-subsetname &amp;amp;1.

endselect.

END-OF-DEFINITION&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use of macro:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SUBT 'TEST40'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Nov 2007 19:02:29 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2007-11-20T19:02:29Z</dc:date>
    <item>
      <title>Macro Definition Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macro-definition-problem/m-p/3060169#M724864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I pass the &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;contents&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; of a field to a macro rather than the field name itself?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example in the SUBT macro below, I want to pass the VALUE of setnode-subsetname to the SUBTOTAL macro, not the field name itself&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE SUBT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from setnode &lt;/P&gt;&lt;P&gt;  where setclass = '0101'&lt;/P&gt;&lt;P&gt;    and subclass = 'AAAA'.&lt;/P&gt;&lt;P&gt;    and SETNAME = '&amp;amp;1'.&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;    SUBTOTAL &amp;lt;b&amp;gt;setnode-subsetname&amp;lt;/b&amp;gt; &amp;amp;1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 18:53:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macro-definition-problem/m-p/3060169#M724864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-20T18:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Definition Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/macro-definition-problem/m-p/3060170#M724865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Parameters can be accessed with &amp;amp;. You don't need to use the single quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DEFINE SUBT.

select * from setnode 
where setclass = '0101'
and subclass = 'AAAA'.
and SETNAME = &amp;amp;1.   " &amp;lt;&amp;lt; &amp;amp;1 without quotes

SUBTOTAL setnode-subsetname &amp;amp;1.

endselect.

END-OF-DEFINITION&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use of macro:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SUBT 'TEST40'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2007 19:02:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/macro-definition-problem/m-p/3060170#M724865</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-20T19:02:29Z</dc:date>
    </item>
  </channel>
</rss>

