<?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: Copying a COMPLETE database table into another in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411292#M819273</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;To copy the contents of the database table to copied, you have to write a se 38 program.  First fetch all the data into an internal table. The internal table is declared like database table. Then modify your copied database table from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kamala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Feb 2008 14:15:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-15T14:15:49Z</dc:date>
    <item>
      <title>Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411289#M819270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;QUESTION&lt;/STRONG&gt; : How can I copy a existing table (including some records) into another table . The copy function on Application tool bar of ABAP dictionary copies the table structure into a new table having a user given name OK .No problems till here. Now how can i copy the contents of 1st table to 2nd table  ?????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 14:08:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411289#M819270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T14:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411290#M819271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Created a small program for that. Read the data from 1st table into a internal table and then update the second database table my the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Second option is Download the first Internal table and then through the program upload the downloaded data into another table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To download a database table contents as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Reach to the table contents acreen in se11.&lt;/P&gt;&lt;P&gt;2. Menu bar -&amp;gt; system -&amp;gt; list -&amp;gt; save -&amp;gt; Local file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 14:13:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411290#M819271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T14:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411291#M819272</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;download the Entire Contents to some EXCEL Sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create the program where u copy that contents to some internal table and insert that data into ur database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;STRONG&gt;If useful Reward with Points&lt;/STRONG&gt;*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 14:15:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411291#M819272</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T14:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411292#M819273</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;To copy the contents of the database table to copied, you have to write a se 38 program.  First fetch all the data into an internal table. The internal table is declared like database table. Then modify your copied database table from internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kamala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 14:15:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411292#M819273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T14:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411293#M819274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im asking that I have got the data from database table into internal table. NOW how can i move data from my internal table to the database table. Say itab is the int table and dtab is the data base table. Plz write the exact syntax.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 15:06:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411293#M819274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T15:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411294#M819275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you want to pass the data from internal table to Database table..use INSERT statement&lt;/P&gt;&lt;P&gt;First Declare the internal table structure as Database Table.&lt;/P&gt;&lt;P&gt;and fill the internal table with data.&lt;/P&gt;&lt;P&gt;and use INSERT statement.&lt;/P&gt;&lt;P&gt;Check this program...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES:MARA.
 
DATA:ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.
 
START-OF-SELECTION.
 
ITAB-MATNR = '123ABCDA'. .
ITAB-MBRSH = 'C'.
ITAB-MTART = 'FERT' .
ITAB-MEINS = 'KG' .
APPEND ITAB.
 
ITAB-MATNR = '123ABCDB'. .
ITAB-MBRSH = 'C'.
ITAB-MTART = 'FERT' .
ITAB-MEINS = 'KG' .
APPEND ITAB.
 
LOOP AT ITAB.
INSERT MARA FROM ITAB.
MODIFY MARA .
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 15:09:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411294#M819275</guid>
      <dc:creator>former_member188829</dc:creator>
      <dc:date>2008-02-15T15:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411295#M819276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wouldn't bother. Your DBAs can do this much more quickly using their database utilities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 15:11:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411295#M819276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T15:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411296#M819277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK problem solved but the portion &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;INSERT MARA FROM ITAB.&lt;/P&gt;&lt;P&gt;MODIFY MARA .&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;should be as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;INSERT MARA FROM ITAB.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;secondly plz tell me the other way i.e uploading / downloading..&lt;/P&gt;&lt;P&gt;ive downloaded my table records in .txt / .xls format... NOW Where should i click 2 upload it ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 15:39:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411296#M819277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T15:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411297#M819278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WAS a ANSWER WHICH FULFIL THE REQUIREMENT BUT IS NOT THE CORRECT WAY.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Feb 2008 05:17:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411297#M819278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-16T05:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411298#M819279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;kk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 May 2009 20:39:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411298#M819279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-24T20:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411299#M819280</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;It looks a weird way to pull data to somewhere (to the application server or client-side file) and then push it back to the database instead of just simply copying data at the database level:&lt;/P&gt;&lt;P&gt;data(l_conn) = cl_sql_connection&lt;SPAN class="L0S70"&gt;=&amp;gt;get_connection&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt; cl_demo_output&lt;SPAN class="L0S70"&gt;=&amp;gt;display&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l_conn&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;create_statement&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;-&amp;gt;execute_update&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'insert into your_dest_tabname select * from your_src_tabname' &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&amp;amp;&amp;amp; &lt;SPAN class="L0S33"&gt;' rows processed.'&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;l_conn-&amp;gt;commit( ).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;l_conn-&amp;gt;close( ).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;It should work for most of databases and platform-dependency should not be an issue (moreover, it's a single task).&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;Using of internal table is very interesting in case of millions of records and lots of GB table size. Use import/export database utilities instead or insert ... select inside the database.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;Regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;&lt;SPAN class="L0S70"&gt;&lt;SPAN class="L0S55"&gt;Andrew.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 10:06:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411299#M819280</guid>
      <dc:creator>former_member216578</dc:creator>
      <dc:date>2014-11-19T10:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Copying a COMPLETE database table into another</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411300#M819281</link>
      <description>&lt;P&gt;In a 7.50 Release you can write following if the tables are identical:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;INSERT znewtab FROM ( SELECT * FROM zoldtab ).&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jul 2022 08:34:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-a-complete-database-table-into-another/m-p/3411300#M819281</guid>
      <dc:creator>JPT</dc:creator>
      <dc:date>2022-07-13T08:34:47Z</dc:date>
    </item>
  </channel>
</rss>

