<?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 Internal table logic required in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336964#M1396946</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;I have two internal tables having with different structures . Finally I need to pass data to final internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In runtime we have data in only one table.  The final internal table should take either internal1, or internal table 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final_data[] = it_first_data[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final_data[] = it_sec_data[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to one generic include , it will understands the IT_final_data internal table only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Oct 2009 17:41:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-23T17:41:14Z</dc:date>
    <item>
      <title>Internal table logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336964#M1396946</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;I have two internal tables having with different structures . Finally I need to pass data to final internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In runtime we have data in only one table.  The final internal table should take either internal1, or internal table 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final_data[] = it_first_data[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final_data[] = it_sec_data[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to one generic include , it will understands the IT_final_data internal table only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 17:41:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336964#M1396946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T17:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336965#M1396947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot do single statement operations if the structures are not the same. Unfortunately you will have to loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 17:51:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336965#M1396947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T17:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336966#M1396948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt; IF it_first_data[] is initial.
  it_final_data[] = it_second_data[].
else.
  it_final_data[] = it_first_data[].
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, in order to move data between table that has different structure you need to loop. Or you can create it_final_data as dynamic table and assign structure at runtime but this method will make it harder to code program because everything that associate with this table need to be dynamic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chaiphon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 18:15:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336966#M1396948</guid>
      <dc:creator>chaiphon</dc:creator>
      <dc:date>2009-10-23T18:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336967#M1396949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Build your final internal table with all the fields from first and second internal table. Use the below logic to move the data to the final internal table depending on the internal table data which you want to display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF not it_first_data[] is initial.&lt;/P&gt;&lt;P&gt;  loop at it_first_data.&lt;/P&gt;&lt;P&gt;    move-corresponding it_frist_data to it_final_data.&lt;/P&gt;&lt;P&gt;    append it_final_data.&lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;   loop at it_second_data.&lt;/P&gt;&lt;P&gt;    move-corresponding it_second_data to it_final_data.&lt;/P&gt;&lt;P&gt;    append it_final_data.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this works for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jayaram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 18:48:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336967#M1396949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T18:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336968#M1396950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jayaram,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Already I did the same. Is there any possibility to avoid the &lt;STRONG&gt;Loop&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to take care about the performance of the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Oct 2009 06:29:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336968#M1396950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-24T06:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336969#M1396951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As already suggested its not possible to avoid the loop if the structures of the internal tables are not same. I dont think you will ever get a solution for this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Oct 2009 06:55:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336969#M1396951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-24T06:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table logic required</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336970#M1396952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use the below logic,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If  it_first_data is initial.&lt;/P&gt;&lt;P&gt;APPEND LINES OF it_sec_data TO it_first_data.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If   it_sec_data  is initial.&lt;/P&gt;&lt;P&gt;APPEND LINES OF  it_first_data TO it_sec_data.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Benu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Oct 2009 07:25:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-logic-required/m-p/6336970#M1396952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-24T07:25:46Z</dc:date>
    </item>
  </channel>
</rss>

