<?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: Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390847#M814201</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 can create dummy fields in your program.&lt;/P&gt;&lt;P&gt;create local field names.&lt;/P&gt;&lt;P&gt;and then select from your itab into your local table and say move corresponding fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code:&lt;/P&gt;&lt;P&gt;suppose your itab has field1 and field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_field1 type (your itab field1)&lt;/P&gt;&lt;P&gt;        l_field2 type (your itab field2)&lt;/P&gt;&lt;P&gt;        l_table type table of itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from itab where &amp;lt;condition&amp;gt; into corresponding fields of l_table.&lt;/P&gt;&lt;P&gt;&amp;lt;do your logic&amp;gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;chithra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Feb 2008 04:09:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-08T04:09:47Z</dc:date>
    <item>
      <title>Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390845#M814199</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;1.can we change the internal table field names in dynamic .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex : in ITAB i defind filed1,field2,&lt;/P&gt;&lt;P&gt;but in program i have to change the name of these fields .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.HOw to create dummy fields in internal table and how to assign data to it .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THX&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 03:21:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390845#M814199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T03:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390846#M814200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chaaya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure why you need to change the Field name dynamically.&lt;/P&gt;&lt;P&gt;But yes you can achieve alomost near to your requirement by creating Dynamic Internal table as per the input table/structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample code below:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter p_table type tabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols &amp;lt;tab&amp;gt; type table.&lt;/P&gt;&lt;P&gt;field-symbols &amp;lt;tab1&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of itab,&lt;/P&gt;&lt;P&gt;t_name type tabname,&lt;/P&gt;&lt;P&gt;t_ref type ref to data,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data itab1 type table of itab with non-unique key t_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform fetch_data using p_table.&lt;/P&gt;&lt;P&gt;perform print_table using p_table.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form fetch_data&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt;P_P_TABLE text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM fetch_data USING P_TABLE1 type tabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data itab2 type itab.&lt;/P&gt;&lt;P&gt;itab2-t_name = p_table1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create data itab2-t_ref type table of (itab2-t_name) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign itab2-t_ref-&amp;gt;* to &amp;lt;tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itab2 to itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from (p_table1) up to 25 rows into corresponding fields of table &amp;lt;tab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " fetch_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if this helps.&lt;/P&gt;&lt;P&gt;Manish&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 03:41:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390846#M814200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T03:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390847#M814201</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 can create dummy fields in your program.&lt;/P&gt;&lt;P&gt;create local field names.&lt;/P&gt;&lt;P&gt;and then select from your itab into your local table and say move corresponding fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code:&lt;/P&gt;&lt;P&gt;suppose your itab has field1 and field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: l_field1 type (your itab field1)&lt;/P&gt;&lt;P&gt;        l_field2 type (your itab field2)&lt;/P&gt;&lt;P&gt;        l_table type table of itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from itab where &amp;lt;condition&amp;gt; into corresponding fields of l_table.&lt;/P&gt;&lt;P&gt;&amp;lt;do your logic&amp;gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;chithra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2008 04:09:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3390847#M814201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-08T04:09:47Z</dc:date>
    </item>
  </channel>
</rss>

