<?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: Inserting data from internal table back to system in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980893#M401197</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This did the trick, thanks!  And especially for the quick response!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Feb 2007 17:34:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-28T17:34:53Z</dc:date>
    <item>
      <title>Inserting data from internal table back to system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980890#M401194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This could be a relatively simple question/answer, but I've spent a rediculously long time trying to figure it out...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a program that is reading a tab delimited file into an internal table.  I can see that the internal table is being populated correctly.  How do I get the data from the internal table inserted into a database table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The database table is YMMOM and has five fields: mandt (clnt 3), matnr (char 18), ylegacy (char 4), ycount (char 4), and zbismt (char 30).  The internal table is set up as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: begin of in_tab occurs 0,
        matnr   like ymmom-matnr,
        ylegacy like ymmom-ylegacy,
        ycount  like ymmom-ycount,
        zbismt  like ymmom-zbismt,
      end of in_tab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MOVE-CORRESPONDING in_tab TO ymmom.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; and I can see in the debugger that the structure is being populated, but when I go back and try to look at the contents of ymmom, the data hasn't been actually uploaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help you can provide.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 17:04:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980890#M401194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T17:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from internal table back to system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980891#M401195</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;You have to user INSERT statement to insert records to the database table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of in_tab occurs 0,&lt;/P&gt;&lt;P&gt;        matnr   like ymmom-matnr,&lt;/P&gt;&lt;P&gt;        ylegacy like ymmom-ylegacy,&lt;/P&gt;&lt;P&gt;        ycount  like ymmom-ycount,&lt;/P&gt;&lt;P&gt;        zbismt  like ymmom-zbismt,&lt;/P&gt;&lt;P&gt;      end of in_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MOVE-CORRESPONDING in_tab TO ymmom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ymmom-mandt = sy-mandt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Insert the records to the databse table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT ymmom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  COMMIT WORK.&lt;/P&gt;&lt;P&gt;ENDIF.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 17:18:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980891#M401195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T17:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from internal table back to system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980892#M401196</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;Perhpas you're transfering records with the same key or that records are in the table YMMOM or you didn't do the insert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code seems to be ok, only the insert is missing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING in_tab TO ymmom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;INSERT YMMOM.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 17:23:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980892#M401196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T17:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from internal table back to system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980893#M401197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This did the trick, thanks!  And especially for the quick response!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2007 17:34:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980893#M401197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-28T17:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from internal table back to system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980894#M401198</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;&lt;/P&gt;&lt;P&gt;Nice query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kishore.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2007 03:42:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980894#M401198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-01T03:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from internal table back to system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980895#M401199</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;Use UPDATE statement to update Database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Mar 2007 07:20:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980895#M401199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-04T07:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from internal table back to system</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980896#M401200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bryan,&lt;/P&gt;&lt;P&gt;               &amp;lt;b&amp;gt;One important point is .....................  &amp;lt;/b&amp;gt; You can use either OPEN sql&lt;/P&gt;&lt;P&gt;commands or NATIVE sql commands. But, if you insert records into the table &lt;/P&gt;&lt;P&gt;through program either using OPEN sql commands or NATIVE sql commands, &lt;/P&gt;&lt;P&gt;be aware that you are inserting records WITHOUT any checks like Check table validation,Fixed values, and some  others validations which are required for the field. Always, insert records into database through screen for consistency &lt;/P&gt;&lt;P&gt;of the data. In very extreme cases we insert records through program.&lt;/P&gt;&lt;P&gt;              &lt;/P&gt;&lt;P&gt;                  If you want to insert bulk amount of records.You can acheive this &lt;/P&gt;&lt;P&gt;using  BDC technique&amp;lt;b&amp;gt;( WITH consistency )&amp;lt;/b&amp;gt; that is either using CALL TRANSACTION method or   SESSION method, instead of using either OPEN sql commands or NATIVE sql commands&amp;lt;b&amp;gt;(WITHOUT consistency)&amp;lt;/b&amp;gt; in program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have queries regarding this, you are welcome. &lt;/P&gt;&lt;P&gt;If you already know this ignore this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that, the above desc. is helpful for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Regards,&lt;/P&gt;&lt;P&gt;V.Raghavender.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2007 09:54:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-data-from-internal-table-back-to-system/m-p/1980896#M401200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-05T09:54:55Z</dc:date>
    </item>
  </channel>
</rss>

