<?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: passing variable to macros in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variable-to-macros/m-p/1349484#M175469</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer the following link to solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;a href="http://www.sapsuperusers.com/forums/showthread.php?t=4863"&amp;gt;http://www.sapsuperusers.com/forums/showthread.php?t=4863&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if it helps.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit Mishra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 May 2006 08:06:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-29T08:06:51Z</dc:date>
    <item>
      <title>passing variable to macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variable-to-macros/m-p/1349481#M175466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;i have a problem for passing the variable to macros&lt;/P&gt;&lt;P&gt;in the following code i have to pass the variable sy-index to the variable p_old&amp;amp;1,p_new&amp;amp;1 so that they become p_old1,p_old2,p_old3----p_old14 as the loop progresses. but it is throwing syntax error saying that p_oldsy-index is not defined&lt;/P&gt;&lt;P&gt;please help in this  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE ADD_MAPPING.&lt;/P&gt;&lt;P&gt;TB_VALUE-OLD = P_OLD&amp;amp;1.&lt;/P&gt;&lt;P&gt;TB_VALUE-NEW = P_NEW&amp;amp;1.&lt;/P&gt;&lt;P&gt;APPEND TB_VALUE.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 14 TIMES.&lt;/P&gt;&lt;P&gt;ADD_MAPPING 1." WRONG HERE&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 07:56:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variable-to-macros/m-p/1349481#M175466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T07:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variable-to-macros/m-p/1349482#M175467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For macros you pass values not variable names. The value does not get concatenate and become P_OLD1, the way you are doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have to take care of the sy-index at the place where you are calling the macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 08:00:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variable-to-macros/m-p/1349482#M175467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T08:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variable-to-macros/m-p/1349483#M175468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. it should be like this (partly)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of tb_value occurs 0,&lt;/P&gt;&lt;P&gt;        old(10) type c,&lt;/P&gt;&lt;P&gt;        end of tb_value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFINE ADD_MAPPING.&lt;/P&gt;&lt;P&gt;TB_VALUE-OLD = &amp;amp;1.&lt;/P&gt;&lt;P&gt;*TB_VALUE-NEW = P_NEW&amp;amp;1.&lt;/P&gt;&lt;P&gt;*APPEND TB_VALUE.&lt;/P&gt;&lt;P&gt;END-OF-DEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 14 TIMES.&lt;/P&gt;&lt;P&gt;ADD_MAPPING 1." WRONG HERE&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 08:05:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variable-to-macros/m-p/1349483#M175468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T08:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variable-to-macros/m-p/1349484#M175469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer the following link to solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;a href="http://www.sapsuperusers.com/forums/showthread.php?t=4863"&amp;gt;http://www.sapsuperusers.com/forums/showthread.php?t=4863&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if it helps.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit Mishra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 08:06:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variable-to-macros/m-p/1349484#M175469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T08:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: passing variable to macros</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variable-to-macros/m-p/1349485#M175470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;Try this code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA p_old1 TYPE i VALUE 10.
DATA p_c(10).
FIELD-SYMBOLS: &amp;lt;fs&amp;gt; TYPE ANY.

DEFINE ADD_MAPPING.
p_c = &amp;amp;1.
CONDENSE p_c.
CONCATENATE 'p_old' p_c INTO p_c.
ASSIGN (p_c) TO &amp;lt;fs&amp;gt;.
TB_VALUE-OLD = &amp;lt;fs&amp;gt;.

p_c = &amp;amp;2.
CONDENSE p_c.
CONCATENATE 'p_new' p_c INTO p_c.
ASSIGN (p_c) TO &amp;lt;fs&amp;gt;.
TB_VALUE-NEW = &amp;lt;fs&amp;gt;.

APPEND TB_VALUE.

END-OF-DEFINITION.

DO 14 TIMES.
ADD_MAPPING sy-index.
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 08:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/passing-variable-to-macros/m-p/1349485#M175470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T08:12:10Z</dc:date>
    </item>
  </channel>
</rss>

