<?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: Regarding Insert command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939289#M62821</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of this loop at, if the table mytab and xtab are of the same structrue,&lt;/P&gt;&lt;P&gt;loop at mytab into ltab.&lt;/P&gt;&lt;P&gt;move-corresponding ltab into xtab.&lt;/P&gt;&lt;P&gt;append xtab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Can do as below mytab[] = xtab[].

INSERT  zlottab FROM TABLE xtab&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This two line code is enough if all r of teh same structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;mytab[] = xtab[].
LOOP AT xtab into ytab.
 INSERT INTO zlottab VALUES ytab.
CLEAR ytab.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly reward points and close the thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Aug 2005 04:32:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-08-31T04:32:39Z</dc:date>
    <item>
      <title>Regarding Insert command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939284#M62816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear guys,&lt;/P&gt;&lt;P&gt;I have internaltable with 10 fields with different data types. and i have addontable with 8 fields(with differnt data type)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to insert records from internal table to addontable.which will be the best way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done as below..pls confirm this is best way or not.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Created internal table xtab same as addontable 8 fields.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;loop at mytab into ltab.&lt;/P&gt;&lt;P&gt;move-corresponding ltab into xtab.&lt;/P&gt;&lt;P&gt;append xtab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;now insert internal table valus to addontable.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;loop at xtab into ytab.&lt;/P&gt;&lt;P&gt;insert table zlottab values ytab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;Commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any alternative way or any wrong in my code..&lt;/P&gt;&lt;P&gt;ambichan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 04:17:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939284#M62816</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T04:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939285#M62817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ambi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please close you all old threads and reward points accordingly.&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;....................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Surpreet Singh Bal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 04:20:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939285#M62817</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T04:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939286#M62818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at mytab into ltab.&lt;/P&gt;&lt;P&gt;move-corresponding ltab into xtab.&lt;/P&gt;&lt;P&gt;*check the data are transferring correctly..else move field by field..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append xtab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert table zlottab from table xtab.&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regds&lt;/P&gt;&lt;P&gt;gv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Venkat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 04:21:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939286#M62818</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T04:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939287#M62819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;one thing you can take care while inserting is that whether data already exist and still you want to overwrite it then use update. else insert it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this you can use 'popup_to_confirm' FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 04:27:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939287#M62819</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T04:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939288#M62820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeah, I agree with venkat&lt;/P&gt;&lt;P&gt;'INSERT dbtab FROM TABLE itab'&lt;/P&gt;&lt;P&gt;this is better in performance, as its select statements runned by DB is less than insert every entry one by one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 04:29:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939288#M62820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T04:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939289#M62821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of this loop at, if the table mytab and xtab are of the same structrue,&lt;/P&gt;&lt;P&gt;loop at mytab into ltab.&lt;/P&gt;&lt;P&gt;move-corresponding ltab into xtab.&lt;/P&gt;&lt;P&gt;append xtab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Can do as below mytab[] = xtab[].

INSERT  zlottab FROM TABLE xtab&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This two line code is enough if all r of teh same structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;mytab[] = xtab[].
LOOP AT xtab into ytab.
 INSERT INTO zlottab VALUES ytab.
CLEAR ytab.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly reward points and close the thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 04:32:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939289#M62821</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T04:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939290#M62822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey guys,&lt;/P&gt;&lt;P&gt;why i could not see points ooption button displaying at left side of post?&lt;/P&gt;&lt;P&gt;looks strange..&lt;/P&gt;&lt;P&gt;is something prob with portal?..&lt;/P&gt;&lt;P&gt;ambichan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 04:33:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939290#M62822</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T04:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding Insert command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939291#M62823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes i am also facing same problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 04:35:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-insert-command/m-p/939291#M62823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T04:35:22Z</dc:date>
    </item>
  </channel>
</rss>

