<?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 Error in native SQL while inserting data into CORP table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-native-sql-while-inserting-data-into-corp-table/m-p/6503833#M1422257</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting an exception while inserting records using native SQL into CORP table.&lt;/P&gt;&lt;P&gt;PFB the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT gi_hrp1001 INTO wa_hrp1001.
  TRY.
        EXEC SQL.
          INSERT INTO misuser.Table_4
          VALUES (wa_hrp1001-otype , wa_hrp1001-objid ).
        ENDEXEC.
      CATCH cx_sy_native_sql_error.
        MESSAGE 'Connect - Error ' TYPE 'E'.
    ENDTRY.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Nitesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Dec 2009 11:36:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-31T11:36:41Z</dc:date>
    <item>
      <title>Error in native SQL while inserting data into CORP table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-native-sql-while-inserting-data-into-corp-table/m-p/6503833#M1422257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting an exception while inserting records using native SQL into CORP table.&lt;/P&gt;&lt;P&gt;PFB the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT gi_hrp1001 INTO wa_hrp1001.
  TRY.
        EXEC SQL.
          INSERT INTO misuser.Table_4
          VALUES (wa_hrp1001-otype , wa_hrp1001-objid ).
        ENDEXEC.
      CATCH cx_sy_native_sql_error.
        MESSAGE 'Connect - Error ' TYPE 'E'.
    ENDTRY.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Nitesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Dec 2009 11:36:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-native-sql-while-inserting-data-into-corp-table/m-p/6503833#M1422257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-31T11:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Error in native SQL while inserting data into CORP table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-native-sql-while-inserting-data-into-corp-table/m-p/6503834#M1422258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see two issue with your Insert. 1) you need to specify the field names in the table, for example otype and objid. 2) You need to indicate in the VALUES that you're using host variables by using the prefix :.&lt;/P&gt;&lt;P&gt;I think the correct syntax is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
        EXEC SQL.
          INSERT INTO misuser.Table_4
         (otype, objid)
          VALUES (:wa_hrp1001-otype, :wa_hrp1001-objid)
        ENDEXEC.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Dec 2009 23:00:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-native-sql-while-inserting-data-into-corp-table/m-p/6503834#M1422258</guid>
      <dc:creator>gabriel_pill-kahan</dc:creator>
      <dc:date>2009-12-31T23:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Error in native SQL while inserting data into CORP table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-native-sql-while-inserting-data-into-corp-table/m-p/6503835#M1422259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 12:48:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-native-sql-while-inserting-data-into-corp-table/m-p/6503835#M1422259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-06T12:48:27Z</dc:date>
    </item>
  </channel>
</rss>

