<?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: Insert multiple records into tables using native sql in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-multiple-records-into-tables-using-native-sql/m-p/9275501#M1723372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;General way inserting data using Native SQL is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL. &lt;/P&gt;&lt;P&gt;&amp;nbsp; INSERT INTO &amp;lt;TABLENAME&amp;gt; (&amp;lt;FIELD1&amp;gt;, &amp;lt;FIELD2&amp;gt;, &amp;lt;FIELD3&amp;gt;) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES (&amp;lt;VALUE1&amp;gt;,&amp;lt;VALUE3&amp;gt;&amp;lt;VALUE3&amp;gt;) &lt;/P&gt;&lt;P&gt;ENDEXEC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since in your case there is a internal table we require to loop at the table into work area, and the content of the work area is passed to the value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP it_tab1 into wa_itab1.&lt;/P&gt;&lt;P&gt;INSERT INTO &amp;lt;TABLENAME&amp;gt; (&amp;lt;FIELD1&amp;gt;, &amp;lt;FIELD2&amp;gt;,....&amp;lt;FIELDN&amp;gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES (:wa_itab1-field1,:wa_itab1-field2,.....:wa_itab1-fieldN)&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;Also refer to below link &lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/message/14176983#14176983"&gt;http://scn.sap.com/message/14176983#14176983&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jul 2013 08:12:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-07-08T08:12:20Z</dc:date>
    <item>
      <title>Insert multiple records into tables using native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-multiple-records-into-tables-using-native-sql/m-p/9275497#M1723368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help. We are using ORACLE DATABASE as backend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am selecting multiple records from SAP tables and want to insert records using NATIVE SQL, How can I do that any sample code?&lt;/P&gt;&lt;P&gt;2. We have created tables directly in ORACLE therefore using NATIVE SQL. These tables are not part of the SAP instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help with sample code. Any help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 18:08:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-multiple-records-into-tables-using-native-sql/m-p/9275497#M1723368</guid>
      <dc:creator>former_member187732</dc:creator>
      <dc:date>2013-02-25T18:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Insert multiple records into tables using native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-multiple-records-into-tables-using-native-sql/m-p/9275498#M1723369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;First read some documentation like &lt;A href="http://help.sap.com/abapdocu_731/en/abennativesql.htm"&gt;Native SQL&lt;/A&gt; in help.sap.com, also&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="jive-rendered-content"&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;SPAN style="color: #333333; background: none repeat scroll 0% 0% white;"&gt; read&amp;nbsp; the&lt;/SPAN&gt; &lt;A _jive_internal="true" href="https://answers.sap.com/docs/DOC-19331"&gt;&lt;SPAN style="color: #3778c7; background-color: white;"&gt;Rules of Engagement&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 18:18:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-multiple-records-into-tables-using-native-sql/m-p/9275498#M1723369</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2013-02-25T18:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Insert multiple records into tables using native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-multiple-records-into-tables-using-native-sql/m-p/9275499#M1723370</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;Plesae refer to the below link.Hope its helpful for u.&lt;/P&gt;&lt;P&gt;&lt;A href="https://scn.sap.com/thread/1016531" title="https://scn.sap.com/thread/1016531"&gt;https://scn.sap.com/thread/1016531&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santanu Mohapatra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 19:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-multiple-records-into-tables-using-native-sql/m-p/9275499#M1723370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-25T19:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Insert multiple records into tables using native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-multiple-records-into-tables-using-native-sql/m-p/9275500#M1723371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 19:47:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-multiple-records-into-tables-using-native-sql/m-p/9275500#M1723371</guid>
      <dc:creator>former_member187732</dc:creator>
      <dc:date>2013-02-25T19:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Insert multiple records into tables using native sql</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-multiple-records-into-tables-using-native-sql/m-p/9275501#M1723372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;General way inserting data using Native SQL is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL. &lt;/P&gt;&lt;P&gt;&amp;nbsp; INSERT INTO &amp;lt;TABLENAME&amp;gt; (&amp;lt;FIELD1&amp;gt;, &amp;lt;FIELD2&amp;gt;, &amp;lt;FIELD3&amp;gt;) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES (&amp;lt;VALUE1&amp;gt;,&amp;lt;VALUE3&amp;gt;&amp;lt;VALUE3&amp;gt;) &lt;/P&gt;&lt;P&gt;ENDEXEC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since in your case there is a internal table we require to loop at the table into work area, and the content of the work area is passed to the value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP it_tab1 into wa_itab1.&lt;/P&gt;&lt;P&gt;INSERT INTO &amp;lt;TABLENAME&amp;gt; (&amp;lt;FIELD1&amp;gt;, &amp;lt;FIELD2&amp;gt;,....&amp;lt;FIELDN&amp;gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUES (:wa_itab1-field1,:wa_itab1-field2,.....:wa_itab1-fieldN)&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;Also refer to below link &lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/message/14176983#14176983"&gt;http://scn.sap.com/message/14176983#14176983&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 08:12:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-multiple-records-into-tables-using-native-sql/m-p/9275501#M1723372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-07-08T08:12:20Z</dc:date>
    </item>
  </channel>
</rss>

