<?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: Alternative for EXEC command(Native SQL) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-for-exec-command-native-sql/m-p/2770495#M645531</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geetha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ABAP Objects a clean-up of the ABAP language has been carried out. As part of this language clean-up, stricter syntax checks are performed for constructs that were previously allowed, or obsolete statements are no longer allowed at all. The stricter syntax checks usually result in a syntax which should also be used outside of ABAP Objects but where the old versions cannot be forbidden for compatibility reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more Scenario where there is a chance of getting an error is during :- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the PERFORMING addition in the EXEC SQL statement to use a subroutine to process data line by line that you have read using Native SQL is not allowed in ABAP Objects. The EXIT FROM SQL statement, previously used within such subroutines, is also forbidden.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Sep 2007 05:19:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-18T05:19:20Z</dc:date>
    <item>
      <title>Alternative for EXEC command(Native SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-for-exec-command-native-sql/m-p/2770494#M645530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;         While Using the EXEC command in native sql it is showing the obselete Error  , Can  any one help  with giving the alternative for the commands for native SQl.&lt;/P&gt;&lt;P&gt;       Immediate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2007 05:13:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-for-exec-command-native-sql/m-p/2770494#M645530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-18T05:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative for EXEC command(Native SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-for-exec-command-native-sql/m-p/2770495#M645531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geetha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ABAP Objects a clean-up of the ABAP language has been carried out. As part of this language clean-up, stricter syntax checks are performed for constructs that were previously allowed, or obsolete statements are no longer allowed at all. The stricter syntax checks usually result in a syntax which should also be used outside of ABAP Objects but where the old versions cannot be forbidden for compatibility reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more Scenario where there is a chance of getting an error is during :- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the PERFORMING addition in the EXEC SQL statement to use a subroutine to process data line by line that you have read using Native SQL is not allowed in ABAP Objects. The EXIT FROM SQL statement, previously used within such subroutines, is also forbidden.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2007 05:19:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-for-exec-command-native-sql/m-p/2770495#M645531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-18T05:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative for EXEC command(Native SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-for-exec-command-native-sql/m-p/2770496#M645532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In ABAP Objects, an error message occurs on: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL PERFORMING form. &lt;/P&gt;&lt;P&gt;  select ... into :wa from dbtab where ... &lt;/P&gt;&lt;P&gt;ENDEXEC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM form. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;  EXIT FROM SQL. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDFORM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct syntax: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL. &lt;/P&gt;&lt;P&gt;  open c1 for &lt;/P&gt;&lt;P&gt;  select ... from dbtab where ... &lt;/P&gt;&lt;P&gt;ENDEXEC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO. &lt;/P&gt;&lt;P&gt;  EXEC SQL. &lt;/P&gt;&lt;P&gt;    fetch next c1 into :wa &lt;/P&gt;&lt;P&gt;  ENDEXEC. &lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;    EXIT. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDDO. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL. &lt;/P&gt;&lt;P&gt;  close c1 &lt;/P&gt;&lt;P&gt;ENDEXEC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reason: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should not call subroutines from local classes, and cannot call them from global classes. The called subroutine has no interface, working instead with the global data of the main program. The EXIT FROM SQL statement ends the SQL processing without reference to the actual SQL statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2007 05:21:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-for-exec-command-native-sql/m-p/2770496#M645532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-18T05:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative for EXEC command(Native SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-for-exec-command-native-sql/m-p/2770497#M645533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i dont think there is any alternative to the EXEC statement in Native SQL.&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;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2007 05:31:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-for-exec-command-native-sql/m-p/2770497#M645533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-18T05:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative for EXEC command(Native SQL)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-for-exec-command-native-sql/m-p/2770498#M645534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a Native SQL statement, data is passed between the ABAP program and the database using host variables. A host variable is an ABAP variable that is identified as such in the Native SQL statement by a preceding colon (:). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Displaying an extract from the table AVERI_CLNT: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: F1(3), F2(3), F3(3). &lt;/P&gt;&lt;P&gt;F3 = ' 1 '. &lt;/P&gt;&lt;P&gt;EXEC SQL. &lt;/P&gt;&lt;P&gt;  SELECT CLIENT, ARG1 INTO :F1, :F2 FROM AVERI_CLNT &lt;/P&gt;&lt;P&gt;         WHERE ARG2 = :F3 &lt;/P&gt;&lt;P&gt;ENDEXEC. &lt;/P&gt;&lt;P&gt;WRITE: / F1, F2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To simplify the form of the INTO lists in the SELECT statement, you can, as in Open SQL, specify a single structure as the target area. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Displaying an Extract from the Table AVERI_CLNT: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF WA, &lt;/P&gt;&lt;P&gt;        CLIENT(3), ARG1(3), ARG2(3), &lt;/P&gt;&lt;P&gt;      END OF WA. &lt;/P&gt;&lt;P&gt;DATA  F3(3). &lt;/P&gt;&lt;P&gt;F3 = ' 1 '. &lt;/P&gt;&lt;P&gt;EXEC SQL. &lt;/P&gt;&lt;P&gt;  SELECT CLIENT, ARG1 INTO :WA FROM AVERI_CLNT &lt;/P&gt;&lt;P&gt;         WHERE ARG2 = :F3 &lt;/P&gt;&lt;P&gt;ENDEXEC. &lt;/P&gt;&lt;P&gt;WRITE: / WA-CLIENT, WA-ARG1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Native SQL supports the directly-executable commands of your underlying database system. There are other special commands that you can use after the EXEC SQL statement for cursor handling, stored procedures (procedures stored in the database), and connections to other databases. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cursor Processing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2007 05:47:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alternative-for-exec-command-native-sql/m-p/2770498#M645534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-18T05:47:00Z</dc:date>
    </item>
  </channel>
</rss>

