<?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: Help with runtime analysis in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-runtime-analysis/m-p/2179189#M463142</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;Just double click on the relevant keyword (OPEN CURSOR / FETCH), and it will navigate you to the source code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll see, what you can do to improve the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 May 2007 12:37:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-02T12:37:37Z</dc:date>
    <item>
      <title>Help with runtime analysis</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-runtime-analysis/m-p/2179187#M463140</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 have a report with pretty bad performence and found the SE30 - ABAP runtime analysis to test it with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the hit list I can find an Open Cursor S615 that use 36% of the runtime and a Fetch S615 that uses 13% of the runtime. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is open cursor and fetch? As I understand it is a different way to write a select statement but the program are using an ordinary select. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Glenn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 12:32:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-runtime-analysis/m-p/2179187#M463140</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-02T12:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with runtime analysis</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-runtime-analysis/m-p/2179188#M463141</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 the normal SELECT statement, the data from the selection is always read directly into the target area specified in the INTO clause during the SELECT statement. When you use a cursor to read data, you decouple the process from the SELECT statement. To do this, you must open a cursor for a SELECT statement. Afterwards, you can place the lines from the selection into a flat target area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Opening and Closing Cursors&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To open a cursor for a SELECT statement, use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN CURSOR [WITH HOLD] &amp;lt;c&amp;gt; FOR SELECT      &amp;lt;result&amp;gt; &lt;/P&gt;&lt;P&gt;                                  FROM      &amp;lt;source&amp;gt; &lt;/P&gt;&lt;P&gt;                                  [WHERE    &amp;lt;condition&amp;gt;]&lt;/P&gt;&lt;P&gt;                                  [GROUP BY &amp;lt;fields&amp;gt;] &lt;/P&gt;&lt;P&gt;                                  [HAVING   &amp;lt;cond&amp;gt;]&lt;/P&gt;&lt;P&gt;                                  [ORDER BY &amp;lt;fields&amp;gt;].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must first have declared the cursor &amp;lt;c&amp;gt; using the DATA statement and the special data type CURSOR. You can use all clauses of the SELECT statement apart from the INTO clause. Furthermore, you can only formulate the SELECT clause so that the selection consists of more than one line. This means that you may not use the SINGLE addition, and that the column selection may not contain only aggregate expressions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An open cursor points to an internal handler, similarly to a reference variable pointing to an object. You can reassign cursors so that more than one points to the same handler. In a MOVE statement, the target cursor adopts all of the attributes of the source cursor, namely its position, and all of the clauses in the OPEN CURSOR statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also open more than one cursor in parallel for a single database table. If a cursor is already open, you cannot reopen it. To close a cursor explicitly, use the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE CURSOR &amp;lt;c&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use this statement to close all cursors that you no longer require, since only a limited number of cursors may be open simultaneously. With one exception, a database LUW is concluded when you close a cursor either explicitly or implicitly. The WITH HOLD addition in the OPEN CURSOR statement allows you to prevent a cursor from being closed when a database commit occurs in Native SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reading Data&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An open cursor is linked to a multiple-line selection in the database table. To read the data into a target area in the ABAP program, use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FETCH NEXT CURSOR &amp;lt;c&amp;gt; INTO &amp;lt;target&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This writes one line of the selection into the target area &amp;lt;target&amp;gt;, and the cursor moves one line further in the selection set. The fetch statement decouples the INTO clause from the other clauses in the SELECT statement. All the INTO clauses of the SELECT statement can be used. The statement reads the lines that are needed to fill the target area of the INTO clause and moves the cursor to the next line to be read. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC is set to 0 until all the lines of the selection have been read; otherwise it is 4. After a FETCH statement, system field SY-DBCNT contains the number of all the lines read so far for the corresponding cursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the Demo Programs &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;demo_select_cursor_1&lt;/P&gt;&lt;P&gt;demo_select_cursor_2&lt;/P&gt;&lt;P&gt;demo_select_cursor_3&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 12:35:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-runtime-analysis/m-p/2179188#M463141</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-02T12:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help with runtime analysis</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-runtime-analysis/m-p/2179189#M463142</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;Just double click on the relevant keyword (OPEN CURSOR / FETCH), and it will navigate you to the source code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll see, what you can do to improve the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 12:37:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-runtime-analysis/m-p/2179189#M463142</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-02T12:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help with runtime analysis</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-runtime-analysis/m-p/2179190#M463143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The open cursor and fetch-statements are pointing to the same code. It is a very messy select with three joins and a lot of sum-calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the select-options are for material and contain 70 items to search for. If the user don't fill this select-option the report are much faster. Are there any limits saying that you should not use more than say 20 items in a select -option to avoid a full table scan or something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Glenn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 12:44:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-runtime-analysis/m-p/2179190#M463143</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-02T12:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with runtime analysis</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-runtime-analysis/m-p/2179191#M463144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try replacing jopin with differnt internal tables and select for all entries (delete adjacent duplicates if you have them i.e create auxiliary for all entries tables). You can also vary the order of the 3 new select statements based on which selection criteria are filled. Also put an information message on selection screen if 'important' selection criteria are not filled or for e.g. if materials are not filled in can you restict to material type and/ or group?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 18:19:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-runtime-analysis/m-p/2179191#M463144</guid>
      <dc:creator>alison_lloyd</dc:creator>
      <dc:date>2007-05-02T18:19:07Z</dc:date>
    </item>
  </channel>
</rss>

