<?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: Problem with SELECT statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632953#M282350</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;in where condn it is not a primary key or sec key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so system giving dump&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wat does ur itab1 consists or the table u r fetching contains any common data fld with the second table&lt;/P&gt;&lt;P&gt;so that may give u a soln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also try for gjahr as u alredy have budat&lt;/P&gt;&lt;P&gt;so from this budat take gjahr = budat+4(4)&lt;/P&gt;&lt;P&gt;as gjahr is primary key&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Sep 2006 07:37:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-25T07:37:57Z</dc:date>
    <item>
      <title>Problem with SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632947#M282344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am selecting from table AUFM with below query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT mblnr mjahr zeile matnr werks lgort meins&lt;/P&gt;&lt;P&gt;                 ebeln ebelp aufnr sakto&lt;/P&gt;&lt;P&gt;       INTO TABLE iaufm_tmp&lt;/P&gt;&lt;P&gt;       FROM aufm&lt;/P&gt;&lt;P&gt;       FOR ALL ENTRIES IN x_viaufkst_tmp&lt;/P&gt;&lt;P&gt;       WHERE budat GE zp_date&lt;/P&gt;&lt;P&gt;         AND aufnr = x_viaufkst_tmp-aufnr .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this query is giving short dump with following description &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The program "ZNEME362_PRF " has exceeded the maximum permitted runtime and has therefore been terminated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table x_viaufkst contains more than 3000 records thats why I guess the query is taking much time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 1 :&lt;/P&gt;&lt;P&gt;Whether this query is utilizing the secondary index defined on table AUFM. Table AUFM has a secondary index defined with fields MANDT and AUFNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 2 : &lt;/P&gt;&lt;P&gt;If answers is No for Question 1, then would following code will solve the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT mblnr mjahr zeile matnr werks lgort meins&lt;/P&gt;&lt;P&gt;                 ebeln ebelp aufnr sakto&lt;/P&gt;&lt;P&gt;       INTO TABLE iaufm_tmp&lt;/P&gt;&lt;P&gt;       FROM aufm&lt;/P&gt;&lt;P&gt;       FOR ALL ENTRIES IN x_viaufkst_tmp&lt;/P&gt;&lt;P&gt;       WHERE aufnr = x_viaufkst_tmp-aufnr .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DELETE iaufm_tmp WHERE budat LT zp_date .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 3 : &lt;/P&gt;&lt;P&gt;What is maximum number of records that can be fetched from database to internal table (application server). Is this setting stored somewhere in ABAP?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:12:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632947#M282344</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632948#M282345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pawan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Whether this query is utilizing the secondary index defined on table AUFM. Table AUFM has a secondary index defined with fields MANDT and AUFNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  It must be bcos AUFNR is used in query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.  then would following code will solve the problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Yes, it may definitely help in improving the performance,&lt;/P&gt;&lt;P&gt;  bcos BUDAT will not be used in where,&lt;/P&gt;&lt;P&gt;  and it is not there is any index also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. What is maximum number of records that can be fetched from database to internal table (application server). Is this setting stored somewhere in ABAP? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The limit is usually set by physical constraints.&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:16:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632948#M282345</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632949#M282346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if there are any duplicate entries in ur internal table x_viaufkst_tmp remove them before the select statemen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;delete adjacent duplicates from x_viaufkst_tmp comparing AUFNR.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:18:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632949#M282346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632950#M282347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am already doing DELETE ADJACENT on x_viaufkst_tmp  internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:23:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632950#M282347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632951#M282348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create the iaufm_tmp with occurs 0..&lt;/P&gt;&lt;P&gt;and give more conditions in the select statement.&lt;/P&gt;&lt;P&gt;the itab fields should be of the same order as in the select sttement and the fields in select statement should be of the order in the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:24:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632951#M282348</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632952#M282349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your input.&lt;/P&gt;&lt;P&gt;What would you suggest to avoid short dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was in impression that my original select query with BUDAT is not utilizing the index and performace can be improved by removing the BUDAT from where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since DEV system doesn't have that many data, I can't even simulate the suituation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:29:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632952#M282349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SELECT statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632953#M282350</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;in where condn it is not a primary key or sec key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so system giving dump&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wat does ur itab1 consists or the table u r fetching contains any common data fld with the second table&lt;/P&gt;&lt;P&gt;so that may give u a soln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also try for gjahr as u alredy have budat&lt;/P&gt;&lt;P&gt;so from this budat take gjahr = budat+4(4)&lt;/P&gt;&lt;P&gt;as gjahr is primary key&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Sep 2006 07:37:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/1632953#M282350</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-25T07:37:57Z</dc:date>
    </item>
  </channel>
</rss>

