<?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: Runtime error for SELECT statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608779#M1086049</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the order of your fields in the internal table &lt;STRONG&gt;it_vornr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;just show the definition of the it_vornr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Oct 2008 12:02:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-16T12:02:00Z</dc:date>
    <item>
      <title>Runtime error for SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608776#M1086046</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 have written a SELECT statement as follows in my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select budat pernr aufnr vornr from AFRU&lt;/P&gt;&lt;P&gt;into corresponding fields of table it_vornr&lt;/P&gt;&lt;P&gt;for all entries in it_cats_tmp&lt;/P&gt;&lt;P&gt;where budat = it_cats_tmp-workdate&lt;/P&gt;&lt;P&gt;and pernr = it_cats_tmp-pernr&lt;/P&gt;&lt;P&gt;and aufnr = it_cats_tmp-rnplnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table IT-CATS_TMP is having around 3000+ lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When control moves to this statement, the system is throwing Runtime error or its taking around 30 minutes time to execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i query the same table (AFRU) in SE11 for the same set of conditions, the table displays relevent data immediately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What might be the reason for this delay/Runtime Error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shall i need to change the syntax for better performance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your guidelines are highly appreciated......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 11:54:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608776#M1086046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T11:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error for SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608777#M1086047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the Dump says. show the message and error analysis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 11:56:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608777#M1086047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T11:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error for SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608778#M1086048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;  Don't use into corresponding fields .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insted of this define ITAB having only fields ur have written in select statement. and keep sequence in ITAB and SELECT similar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; like as u have now : budat pernr aufnr vornr &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;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 11:58:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608778#M1086048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T11:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error for SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608779#M1086049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the order of your fields in the internal table &lt;STRONG&gt;it_vornr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;just show the definition of the it_vornr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 12:02:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608779#M1086049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T12:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error for SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608780#M1086050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Always avoid using 'into corresponding fields' instead declare a internal table as your requirment including only the field in the table that you want as also said by others:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select budat pernr aufnr vornr from AFRU
into table it_vornr
for all entries in it_cats_tmp
where budat = it_cats_tmp-workdate
and pernr = it_cats_tmp-pernr
and aufnr = it_cats_tmp-rnplnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With luck,&lt;/P&gt;&lt;P&gt;Pritam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 12:06:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608780#M1086050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T12:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error for SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608781#M1086051</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;&lt;STRONG&gt;1. Try to put WHERE conditions for KEY FIELDS.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution: Create a RANGE for the key fields &amp;amp; put that in SELECT Query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gr_rueck TYPE RANGES OF afru-rueck.
SELECT .. WHERE rueck IN gr_rueck.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Avoid using CORRESPONDING FIELDS OF TABLE in SELECT.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution: Change internal table fields ORDER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: 
BEGIN OF TY_VORNR,
  budat TYPE ..
  pernr TYPE ..
  aufnr TYPE ..
  vornr TYPE ..
  ... " Other fields
END OF TY_VORNR.

SELECT .. INTO TABLE IT_VORNR ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 12:06:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608781#M1086051</guid>
      <dc:creator>asik_shameem</dc:creator>
      <dc:date>2008-10-16T12:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error for SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608782#M1086052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not use "INTO CORRESPONDING FIELDS".Instead use the following code ;-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select budat pernr aufnr vornr from AFRU
into table it_vornr
for all entries in it_cats_tmp
where budat = it_cats_tmp-workdate
and pernr = it_cats_tmp-pernr
and aufnr = it_cats_tmp-rnplnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Goodluck,&lt;/P&gt;&lt;P&gt;Bhumika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 12:06:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608782#M1086052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T12:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error for SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608783#M1086053</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>Thu, 16 Oct 2008 14:51:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608783#M1086053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T14:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error for SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608784#M1086054</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;chek ur internal table it_vornr . Should not be empty .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Neetesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 15:28:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-for-select-statement/m-p/4608784#M1086054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T15:28:29Z</dc:date>
    </item>
  </channel>
</rss>

