<?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: Changing Field Name Dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925655#M1149196</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm not sure if u can use a variable as fieldname . One thing u can do is to use a switch case with sy-tabix or some count variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Dec 2008 12:09:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-13T12:09:15Z</dc:date>
    <item>
      <title>Changing Field Name Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925654#M1149195</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;I have to change the field name dynamically in the loop. Database Name is PA9002 having fields ZFAMSA1, ZFAMSA2, ZFAMSA3 up to ZFAMSA10. I want to pass the data to these fields in loop and update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is my Code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT GT_PA0021 INTO GS_PA0021&lt;/P&gt;&lt;P&gt;    MOVE GA_PA0021-SUBTY TO P9002-FAMSA1.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In above code I have to change the Field name in each loop pass that P9002-FAMSA1, then in next loop P9002-FAMSA2 then next loop pass P9002-FAMSA3. So please suggest me how to change the field name dynamically in Loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mangesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2008 11:35:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925654#M1149195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-13T11:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Field Name Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925655#M1149196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm not sure if u can use a variable as fieldname . One thing u can do is to use a switch case with sy-tabix or some count variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2008 12:09:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925655#M1149196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-13T12:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Field Name Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925656#M1149197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Kartik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried many option but then decided to Post Message to SDN. Yet my problem is not solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mangesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2008 12:37:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925656#M1149197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-13T12:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Field Name Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925657#M1149198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try field symbols&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2008 12:57:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925657#M1149198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-13T12:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Field Name Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925658#M1149199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this if it works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS:&lt;/P&gt;&lt;P&gt;  &amp;lt;field1&amp;gt; TYPE ANY,&lt;/P&gt;&lt;P&gt;  &amp;lt;field2&amp;gt; TYPE ANY,&lt;/P&gt;&lt;P&gt;  &amp;lt;field3&amp;gt; TYPE ANY,&lt;/P&gt;&lt;P&gt;  &amp;lt;line&amp;gt;  TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assign P9002 to &amp;lt;line&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT GT_PA0021 INTO ASSIGNING GS_PA0021.&lt;/P&gt;&lt;P&gt;If sy-tabix = 1.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 1 OF STRUCTURE &amp;lt;myline&amp;gt; TO &amp;lt;field1&amp;gt;.&lt;/P&gt;&lt;P&gt;Assign GA_PA0021-SUBTY to &amp;lt;field1&amp;gt;.&lt;/P&gt;&lt;P&gt;elseif sy-tabix = 2.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT 2 OF STRUCTURE &amp;lt;myline&amp;gt; TO &amp;lt;field2&amp;gt;.&lt;/P&gt;&lt;P&gt;Assign GA_PA0021-SUBTY to &amp;lt;field2&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endif. &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Neha Shukla on Dec 13, 2008 6:57 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2008 13:26:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925658#M1149199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-13T13:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Field Name Dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925659#M1149200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can try like this&lt;/P&gt;&lt;P&gt;loop at gt_pa2001 into gs_pa2001&lt;/P&gt;&lt;P&gt;case sy-tabix&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;Use ur note for first famsa&lt;/P&gt;&lt;P&gt;similarly when 2 .&lt;/P&gt;&lt;P&gt;Use for second and so on&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Dec 2008 14:30:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-field-name-dynamically/m-p/4925659#M1149200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-13T14:30:24Z</dc:date>
    </item>
  </channel>
</rss>

