<?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 Select query doubt ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-doubt/m-p/1021429#M81280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using the following select statement inside the loop. But I asked to replace the select statement using Read instead of select. How can I write the following query using read ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE CRHD~ARBPL&lt;/P&gt;&lt;P&gt;FROM AFKO&lt;/P&gt;&lt;P&gt;INNER JOIN V_QAPO ON V_QAPO&lt;SUB&gt;AUFPL = AFKO&lt;/SUB&gt;AUFPL&lt;/P&gt;&lt;P&gt;INNER JOIN CRHD ON CRHD&lt;SUB&gt;OBJID = V_QAPO&lt;/SUB&gt;ARBID&lt;/P&gt;&lt;P&gt;INTO XARBPL&lt;/P&gt;&lt;P&gt;WHERE AFKO~AUFNR = CAUFVD_TAB-AUFNR&lt;/P&gt;&lt;P&gt;AND V_QAPO~VORNR = IAFVC-VORNR.&lt;/P&gt;&lt;P&gt;Points will be surely awarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tushar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2005 16:56:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-09-28T16:56:13Z</dc:date>
    <item>
      <title>Select query doubt ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-doubt/m-p/1021429#M81280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using the following select statement inside the loop. But I asked to replace the select statement using Read instead of select. How can I write the following query using read ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE CRHD~ARBPL&lt;/P&gt;&lt;P&gt;FROM AFKO&lt;/P&gt;&lt;P&gt;INNER JOIN V_QAPO ON V_QAPO&lt;SUB&gt;AUFPL = AFKO&lt;/SUB&gt;AUFPL&lt;/P&gt;&lt;P&gt;INNER JOIN CRHD ON CRHD&lt;SUB&gt;OBJID = V_QAPO&lt;/SUB&gt;ARBID&lt;/P&gt;&lt;P&gt;INTO XARBPL&lt;/P&gt;&lt;P&gt;WHERE AFKO~AUFNR = CAUFVD_TAB-AUFNR&lt;/P&gt;&lt;P&gt;AND V_QAPO~VORNR = IAFVC-VORNR.&lt;/P&gt;&lt;P&gt;Points will be surely awarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tushar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2005 16:56:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-doubt/m-p/1021429#M81280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-28T16:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select query doubt ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-doubt/m-p/1021430#M81281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;READ is used for reading lines of an internal table, not a database.  I'm a little confused why you are being told to "read" the database using the "READ" statement.  You are selecting a SINGLE record, there for you will not be filling an internal table when retrieving from the database, therefore there is no need to READ the internal table.  Can you give some more details?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2005 20:08:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-doubt/m-p/1021430#M81281</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-09-28T20:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Select query doubt ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-doubt/m-p/1021431#M81282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tushar - this is why it's a bad idea to post the same question twice. You should close this or the other thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2005 20:16:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-doubt/m-p/1021431#M81282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-28T20:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Select query doubt ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-doubt/m-p/1021432#M81283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from what i understand..&lt;/P&gt;&lt;P&gt;select data into internal tables first.&lt;/P&gt;&lt;P&gt;and inside the loop , instead of hitting database for every loop pass just read the internal table with a key equal to any field of the int. table u r looping at.&lt;/P&gt;&lt;P&gt;this increases performance...&lt;/P&gt;&lt;P&gt;for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of :&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt; select single * from mara into mara where matnr = itab1-matnr.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do:&lt;/P&gt;&lt;P&gt;if not itab1[] is initial.&lt;/P&gt;&lt;P&gt;select * from mara into table itab2&lt;/P&gt;&lt;P&gt; for all entries in itab1&lt;/P&gt;&lt;P&gt; where matnr = itab1-matnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt; read table itab2 with key matnr = itab1-matnr.&lt;/P&gt;&lt;P&gt;**process&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2005 20:22:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-doubt/m-p/1021432#M81283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-28T20:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Select query doubt ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-doubt/m-p/1021433#M81284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tushar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a duplicate posting. Please close one of them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure how big are the tables. I am presuming that if the internal table is too large then the select even with single will be a performance killer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case it is better to take out that select statment inside the loop and keep that out, then read that internal table inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my knowledge, if the internal table is large, a select single is also an expensive statement in side a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2005 20:38:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-doubt/m-p/1021433#M81284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-28T20:38:39Z</dc:date>
    </item>
  </channel>
</rss>

