<?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: Performance Issue - How to improve the code? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322597#M1226780</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;performance issues do not relate to percentages, the absolute numbers count !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Percentages are interesting in the hitlist to find the main contributions to a problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Mar 2009 08:43:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-10T08:43:54Z</dc:date>
    <item>
      <title>Performance Issue - How to improve the code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322593#M1226776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am quite new in the ABAP world and start to play around a bit in the SAP Netweaver ABAP Trail version. I did a first ABAP program which I analysed with with Transaction code SE30 as  suggested in the ABAP tutorials for beginners. The outcome is that 70% of processing time are spent for ABAP where I guess it is particularly the query which causes that issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;&amp;gt; Query &amp;lt;------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM get_flights_from_to.

  SELECT
  p~connid s~fldate p~carrid p~cityfrom p~cityto p~deptime
    p~arrtime p~fltime
  INTO CORRESPONDING FIELDS OF TABLE connect_report_tab
  FROM spfli AS p
    LEFT OUTER JOIN sflight AS s ON p~carrid = s~carrid
      WHERE p~cityfrom = p_from
        AND p~cityto = p_to.

  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE e007(sabapdocu).
  ENDIF.
ENDFORM.      "get flights from to
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;------ Query -&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To output the result of that query I am using the ALV class as below: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;&amp;gt; ALV &amp;lt;------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM show_result_from_to.
  TRY.
      cl_salv_table=&amp;gt;factory(
        IMPORTING r_salv_table = connect_report_alv
        CHANGING  t_table = connect_report_tab ).
      connect_report_alv-&amp;gt;display( ).

    CATCH cx_salv_msg.
      MESSAGE 'ALV display not possible' TYPE 'I'
              DISPLAY LIKE 'E'.
  ENDTRY.
ENDFORM.                    "show_result_from_to
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;------ ALV -&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is actually where is the potential bottle neck in the code? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From my point of view it would be the join but if so then what other possibilities do I have to avoid that performance issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to simulate with that table is that I can get an overview of possible flights between 2 cities from table SPFLI and the date of these flights from Table SFLIGHT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your help and advice,&lt;/P&gt;&lt;P&gt;Bernd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Bernd Mueller on Mar 9, 2009 5:46 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 04:28:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322593#M1226776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T04:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue - How to improve the code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322594#M1226777</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;If ABAP processing is more it means work load is more on Application server for the program.&lt;/P&gt;&lt;P&gt;Select Query only affects database....&lt;/P&gt;&lt;P&gt;They Only issue of performance comes into picture when you retrieve data from Database Server..&lt;/P&gt;&lt;P&gt;But your select query Seams to use database 30%. That's Fine...&lt;/P&gt;&lt;P&gt;Make sure when ever your write report Database load is less.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joins have some performance issue.You can create a database View and query it in the report that will increase the performance Beacuse Views can be buffered at Application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 05:18:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322594#M1226777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T05:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue - How to improve the code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322595#M1226778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that I will optimize the sflight model ... maybe it is o.k.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better read this blog, it tells you the 70% ABAP means nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SE30&lt;/P&gt;&lt;P&gt;/people/siegfried.boes/blog/2007/11/13/the-abap-runtime-trace-se30--quick-and-easy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 08:10:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322595#M1226778</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T08:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue - How to improve the code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322596#M1226779</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;PRE&gt;&lt;CODE&gt;70% ABAP means nothing&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well I believe it depends on the context of the issue. In the issue described above, I believe it to be fine. But if you have a huge internal tables with rows &amp;gt; 10000 and you use nested loops for some processing. You will still get a larger percentage on ABAP; but then it is a performance issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2009 15:05:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322596#M1226779</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-09T15:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue - How to improve the code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322597#M1226780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;performance issues do not relate to percentages, the absolute numbers count !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Percentages are interesting in the hitlist to find the main contributions to a problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 08:43:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322597#M1226780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-10T08:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Issue - How to improve the code?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322598#M1226781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;Remove CORRESPONDING FIELDS.&lt;/P&gt;&lt;P&gt;Declare the type containing the required fields  and make it as internal table and then use it.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shashi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2009 12:21:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-how-to-improve-the-code/m-p/5322598#M1226781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-10T12:21:26Z</dc:date>
    </item>
  </channel>
</rss>

