<?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 - timeout error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-timeout-error/m-p/6468247#M1416806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written a pgm where i need to select records from BSAD table. This table has about 10 key fields. But according to my requirement, i can pass only 2 key fields to the table and have to fetch records from this table.  But it goes to dump (timout error) in BSAD select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So  i have used PACKAGE SIZE 20 and tried to fetch only 20 records at a time from the table. But still, it takes lot of time in fetching records from BSAD table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls tell me what is the solution to avoid timeout error and how to fetch the records quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shanthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jan 2010 12:25:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-20T12:25:35Z</dc:date>
    <item>
      <title>select query - timeout error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-timeout-error/m-p/6468247#M1416806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written a pgm where i need to select records from BSAD table. This table has about 10 key fields. But according to my requirement, i can pass only 2 key fields to the table and have to fetch records from this table.  But it goes to dump (timout error) in BSAD select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So  i have used PACKAGE SIZE 20 and tried to fetch only 20 records at a time from the table. But still, it takes lot of time in fetching records from BSAD table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls tell me what is the solution to avoid timeout error and how to fetch the records quickly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shanthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2010 12:25:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-timeout-error/m-p/6468247#M1416806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-20T12:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: select query - timeout error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-timeout-error/m-p/6468248#M1416807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope that your " two fields"  are BUKRS and KUNNR.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider this:  If I can't supply a value for the first field (after mandt), then the second, etc., the select is going to run FOREVER.  I think that, if you used ST05 and explained the BSAD open, you would see the problem. I'm guessing that you're not supplying a value for BUKRS, etc., and thereby causing a full table scan.   Or you may have supplied NOT operators in the where clause or included an order by statement.  Current ABAP CHECK tools (like SLIN or SCID) should point out problems in the where statement also...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May I suggest utilizing SE11 and looking at BS* tables to see if there is an alternative data source where you can supply an EQ value for the first few fields (at least) of the index?  Or, post psuedocode so that the forum users can help you out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2010 13:00:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-query-timeout-error/m-p/6468248#M1416807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-20T13:00:07Z</dc:date>
    </item>
  </channel>
</rss>

