<?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: Native SQL and FOR ALL ENTRIES statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563475#M1564648</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;That mean you have an internal table with data from SAP and you need to load the data from extranal db in according to them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's so I don't believe FOR ALL ENTRIES is supported and I don't know if there's a command like that, I think you have to upload record by record:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT ITAB.
   EXEC SQL.
       SELECT * INTO :WA
            FROM &amp;lt;TABLE&amp;gt;
                  WHERE &amp;lt;FIELD&amp;gt; = :WA-FIELD.
     ENDEXC.
    IF SY-SUBRC = 0.
      APPEND WA TO ITAB2.
    ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mAX&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Jan 2011 11:43:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-01-21T11:43:36Z</dc:date>
    <item>
      <title>Native SQL and FOR ALL ENTRIES statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563470#M1564643</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;I need to retrieve all records from external Oracle database using Native SQL for all records in an internal table in my program.&lt;/P&gt;&lt;P&gt;How can I do that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 10:57:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563470#M1564643</guid>
      <dc:creator>stefan_kolev4</dc:creator>
      <dc:date>2011-01-21T10:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Native SQL and FOR ALL ENTRIES statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563471#M1564644</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;The first problem is to know if both db are linked by a dblink for example, then you can use the oracle native sql in your program see the help for EXEC SQL/ENDEXEC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don't think the option FOR ALL ENTRIES is supported by native sql: here you need to do a symple SELECT and load your internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 11:03:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563471#M1564644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-21T11:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Native SQL and FOR ALL ENTRIES statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563472#M1564645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanls for your fast responce.&lt;/P&gt;&lt;P&gt;Imagine we have an internal table in our program and we want to retrieve all equal records from external db using native sql.&lt;/P&gt;&lt;P&gt;Should I insert all records in an internal table and then use read table statement ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 11:13:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563472#M1564645</guid>
      <dc:creator>stefan_kolev4</dc:creator>
      <dc:date>2011-01-21T11:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Native SQL and FOR ALL ENTRIES statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563473#M1564646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Should I insert all records in an internal table and then use read table statement ?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That depends on how you need to arrange your program, I can't understand what " all equal records" means&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 11:19:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563473#M1564646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-21T11:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Native SQL and FOR ALL ENTRIES statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563474#M1564647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to do the same as SELECT....FOR ALL ENTRIES, but in Native SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 11:34:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563474#M1564647</guid>
      <dc:creator>stefan_kolev4</dc:creator>
      <dc:date>2011-01-21T11:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Native SQL and FOR ALL ENTRIES statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563475#M1564648</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;That mean you have an internal table with data from SAP and you need to load the data from extranal db in according to them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's so I don't believe FOR ALL ENTRIES is supported and I don't know if there's a command like that, I think you have to upload record by record:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT ITAB.
   EXEC SQL.
       SELECT * INTO :WA
            FROM &amp;lt;TABLE&amp;gt;
                  WHERE &amp;lt;FIELD&amp;gt; = :WA-FIELD.
     ENDEXC.
    IF SY-SUBRC = 0.
      APPEND WA TO ITAB2.
    ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mAX&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jan 2011 11:43:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563475#M1564648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-21T11:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Native SQL and FOR ALL ENTRIES statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563476#M1564649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one different requirement like can we load data from external DB based on internal table field condiition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; EXEC SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * INTO :WA&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM &amp;lt;TABLE&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE &amp;lt;FIELD&amp;gt; = :WA-FIELD AND &lt;SPAN style="text-decoration: underline;"&gt;&amp;lt;FIELD1&amp;gt; = ITAB-FIELD1.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDEXC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF SY-SUBRC = 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APPEND WA TO ITAB2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF.&lt;/P&gt;
&lt;P&gt;ENDLOOP.&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the underlined where clause and suggest accordingly.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- MRM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2015 04:14:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-and-for-all-entries-statement/m-p/7563476#M1564649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-23T04:14:41Z</dc:date>
    </item>
  </channel>
</rss>

