<?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: Reusing a MACRO definition in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reusing-a-macro-definition/m-p/8141599#M1620365</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.Volker.I am looking at a way to define a macro where we can define the range as one of the parameter.Will tyr your option and update.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 Sep 2011 07:17:42 GMT</pubDate>
    <dc:creator>kiran_k8</dc:creator>
    <dc:date>2011-09-17T07:17:42Z</dc:date>
    <item>
      <title>Reusing a MACRO definition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reusing-a-macro-definition/m-p/8141597#M1620363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have defined a macro to build up a RANGE as below.I need 4 to 5 ranges which are similar to this.Can anyone here please let me know how we can define one macro which can be reused to build up RANGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*For ex this is a macro m_r_mand for building up a range r_mand_fields.
define m_r_mand.
  r_mand_fields-sign   = &amp;amp;1.
  r_mand_fields-option = &amp;amp;2.
  r_mand_fields-low     = &amp;amp;3.
  append *r_mand_fields.* 
 clear  r_mand_fields.
end-of-definition.


m_r_mand 'I' 'EQ'  'BOART_AG'.
m_r_mand 'I' 'EQ'  'VKORG'.
m_r_mand 'I' 'EQ'  'VTWEG'.

*This is another macro m_r_sdh which builds up a range r_sdh.
define m_r_sdh.
r_sdh-sign   = &amp;amp;1.
r_sdh-option = &amp;amp;2.
r_sdh-low    = &amp;amp;3.
append *r_sdh.*
clear  r_sdh.
end-of-definition.

m_r_sdh 'I' 'EQ' 'VTWEG'    .
m_r_sdh 'I' 'EQ' 'SPART'    .
m_r_sdh 'I' 'EQ' 'BOTEXT'   .

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only difference is the RANGE.In one macro I am building up a range &lt;STRONG&gt;r_mand_fields&lt;/STRONG&gt; and in another &lt;STRONG&gt;r_sdh&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Instead of defining two Macros is it possible to define one Macro which can be reused for a situation like the above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kiran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 13:05:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reusing-a-macro-definition/m-p/8141597#M1620363</guid>
      <dc:creator>kiran_k8</dc:creator>
      <dc:date>2011-09-16T13:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Reusing a MACRO definition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reusing-a-macro-definition/m-p/8141598#M1620364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you mean something like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
define fill_range.
 &amp;amp;1-singn = &amp;amp;2.
 &amp;amp;1-option = &amp;amp;3.

  append &amp;amp;1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 13:51:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reusing-a-macro-definition/m-p/8141598#M1620364</guid>
      <dc:creator>former_member226519</dc:creator>
      <dc:date>2011-09-16T13:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Reusing a MACRO definition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reusing-a-macro-definition/m-p/8141599#M1620365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.Volker.I am looking at a way to define a macro where we can define the range as one of the parameter.Will tyr your option and update.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Sep 2011 07:17:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reusing-a-macro-definition/m-p/8141599#M1620365</guid>
      <dc:creator>kiran_k8</dc:creator>
      <dc:date>2011-09-17T07:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Reusing a MACRO definition</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reusing-a-macro-definition/m-p/8141600#M1620366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You could even add a second level macro to make things more "dynamic", as shown below.&lt;/P&gt;&lt;P&gt;In the code below, I didn't use header lines (they are obsolete), and I added the HIGH component, so that to make the macro fully reusable.&lt;/P&gt;&lt;P&gt;PS: I didn't test the code below, but I already did this kind of thing.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
define m_r_any.
  clear  &amp;amp;1.
  &amp;amp;1-sign   = &amp;amp;3.
  &amp;amp;1-option = &amp;amp;4.
  &amp;amp;1-low     = &amp;amp;5.
  &amp;amp;1-high     = &amp;amp;6.
  append &amp;amp;1 to &amp;amp;2.
end-of-definition.

DATA ls_mand_fields LIKE LINE OF r_mand_fields.
define m_r_mand.
  m_r_any ls_mand_fields r_mand_fields &amp;amp;1 &amp;amp;2 &amp;amp;3 &amp;amp;4.
end-of-definition.
m_r_mand 'I' 'EQ'  'BOART_AG' ''.
m_r_mand 'I' 'EQ'  'VKORG' ''.
m_r_mand 'I' 'EQ'  'VTWEG' ''.

DATA ls_sdh LIKE LINE OF r_sdh.
define m_r_sdh.
  m_r_any ls_sdh r_sdh &amp;amp;1 &amp;amp;2 &amp;amp;3 &amp;amp;4.
end-of-definition.
m_r_sdh 'I' 'EQ' 'VTWEG' ''.
m_r_sdh 'I' 'EQ' 'SPART' ''.
m_r_sdh 'I' 'EQ' 'BOTEXT' ''.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Sandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Sep 2011 08:50:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reusing-a-macro-definition/m-p/8141600#M1620366</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2011-09-17T08:50:00Z</dc:date>
    </item>
  </channel>
</rss>

