<?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 question. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769383#M332309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can always increase performance, but there comes a point where the extra work isn't worth it, so I wouldn't bother with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, there seems to me to be a logic error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF p_date+4(2) &amp;gt;= '01'.
  COMPUTE: balance_month_01 =   itab_bal00 + itab_bal01.
ENDIF.

ELSEIF p_date+4(2) &amp;gt;= '02'.                &amp;lt;=====
  COMPUTE: balance_month_02 = itab_bal00 + itab_bal01 +
itab_bal02.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;(Which will help performance).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Dec 2006 15:11:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-15T15:11:38Z</dc:date>
    <item>
      <title>Performance question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769379#M332305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi people!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm confuse here!  I need to compute the balance of some months in a program for the GL module. I use the table faglflext to make that, but I need good performance and I don't know if I make the code correct or I need to change it to take a better performance. Some one can check that! Thanks!&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  LOOP AT t_itab1 INTO wa_itab WHERE racct  NE ''.

    itab_kslvt = itab_kslvt + wa_itab-kslvt. 
    itab_ksl01 = itab_ksl01 + wa_itab-ksl01. 
    itab_ksl02 = itab_ksl02 + wa_itab-ksl02.
    itab_ksl03 = itab_ksl03 + wa_itab-ksl03. 
    itab_ksl04 = itab_ksl04 + wa_itab-ksl04.
    itab_ksl05 = itab_ksl05 + wa_itab-ksl05. 
    itab_ksl06 = itab_ksl06 + wa_itab-ksl06.
    itab_ksl07 = itab_ksl07 + wa_itab-ksl07. 
    itab_ksl08 = itab_ksl08 + wa_itab-ksl08.
    itab_ksl09 = itab_ksl09 + wa_itab-ksl09. 
    itab_ksl10 = itab_ksl10 + wa_itab-ksl10.
    itab_ksl11 = itab_ksl11 + wa_itab-ksl11. 
    itab_ksl12 = itab_ksl12 + wa_itab-ksl12.

        IF p_date+4(2) &amp;gt;= '01'.

          COMPUTE: balance_month_01 =   itab_bal00 + itab_bal01.

        ENDIF.

        IF p_date+4(2) &amp;gt;= '02'.

          COMPUTE: balance_month_02 = itab_bal00 + itab_bal01 + itab_bal02.

        ENDIF.

        IF p_date+4(2) &amp;gt;= '03'.

          COMPUTE: balance_month_03 = itab_bal00 + itab_bal01 + itab_bal02 + 
                                                           itab_bal03.

        ENDIF.

        IF p_date+4(2) &amp;gt;= '04'.

          COMPUTE: balance_month_04 = itab_bal00 + itab_bal01 + itab_bal02 + 
                                                           itab_bal03 + itab_bal04.

        ENDIF.

        IF p_date+4(2) &amp;gt;= '05'.

          COMPUTE: balance_month_05 = itab_bal00 + itab_bal01 + itab_bal02 + 
                                                           itab_bal03 + itab_bal04 + itab_bal05.

        ENDIF.

        IF p_date+4(2) &amp;gt;= '06'.

          COMPUTE: balance_month_06 =  itab_bal00 + itab_bal01 + itab_bal02 + 
                                                            itab_bal03 + itab_bal04 + itab_bal05 + 
                                                            itab_bal06.

        ENDIF.

        IF p_date+4(2) &amp;gt;= '07'.

          COMPUTE: balance_month_07 =  itab_bal00 + itab_bal01 + itab_bal02 + 
                                                            itab_bal03 + itab_bal04 + itab_bal05 + 
                                                            itab_bal06 + itab_bal07.

        ENDIF.

        IF p_date+4(2) &amp;gt;= '08'.

          COMPUTE: balance_month_08 =  itab_bal00 + itab_bal01 + itab_bal02 + 
                                                            itab_bal03 + itab_bal04 + itab_bal05 + 
                                                            itab_bal06 + itab_bal07 + itab_bal08.

        ENDIF.

        IF p_date+4(2) &amp;gt;= '09'.

          COMPUTE: balance_month_09 =  itab_bal00 + itab_bal01 + itab_bal02 + 
                                                            itab_bal03 + itab_bal04 + itab_bal05 +   
                                                            itab_bal06 + itab_bal07 + itab_bal08 + 
                                                            itab_bal09.

        ENDIF.

        IF p_date+4(2) &amp;gt;= '10'.

          COMPUTE: balance_month_10 =  itab_bal00 + itab_bal01 + itab_bal02 + 
                                                            itab_bal03 + itab_bal04 + itab_bal05 + 
                                                            itab_bal06 + itab_bal07 + itab_bal08 + 
                                                            itab_bal09 + itab_bal10.

        ENDIF.

        IF p_date+4(2) &amp;gt;= '11'.

          COMPUTE: balance_month_11 = itab_bal00 + itab_bal01 + itab_bal02 + 
                                                           itab_bal03 + itab_bal04 + itab_bal05 + 
                                                           itab_bal06 + itab_bal07 + itab_bal08 + 
                                                           itab_bal09 + itab_bal10 + itab_bal11.

        ENDIF.

        IF p_date+4(2) &amp;gt;= '12'.

          COMPUTE: balance_month_12 =  itab_bal00 + itab_bal01 + itab_bal02 + 
                                                            itab_bal03 + itab_bal04 + itab_bal05 + 
                                                            itab_bal06 + itab_bal07 + itab_bal08 + 
                                                            itab_bal09 + itab_bal10 + itab_bal11 + 
                                                            itab_bal12.

        ENDIF.

endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 15:04:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769379#M332305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T15:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769380#M332306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you could try to get rid of the records that you don't want to process before the LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* Delete all unwanted records here.
 delete t_itab1 where racct &amp;lt;&amp;gt; space.


  LOOP AT t_itab1 INTO wa_itab.     "&amp;lt;- get rid of the WHERE clause&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 15:08:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769380#M332306</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-12-15T15:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769381#M332307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also,  using field symbols, might help as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;field-symbols: &amp;lt;fs&amp;gt; like line of t_itab1.



loop at t_itab1 assigning &amp;lt;fs&amp;gt;.


endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 15:10:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769381#M332307</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-12-15T15:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769382#M332308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Besides you can use CASE instead of IF/ENDIF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please go through this,&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap&lt;/A&gt;&lt;EM&gt;Performance&lt;/EM&gt;and+Tuning&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kathirvel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 15:11:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769382#M332308</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T15:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769383#M332309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can always increase performance, but there comes a point where the extra work isn't worth it, so I wouldn't bother with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, there seems to me to be a logic error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
IF p_date+4(2) &amp;gt;= '01'.
  COMPUTE: balance_month_01 =   itab_bal00 + itab_bal01.
ENDIF.

ELSEIF p_date+4(2) &amp;gt;= '02'.                &amp;lt;=====
  COMPUTE: balance_month_02 = itab_bal00 + itab_bal01 +
itab_bal02.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;(Which will help performance).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Rob Burbank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 15:11:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769383#M332309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T15:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769384#M332310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;have a look at this, for sure faster:&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF p_date+4(2) &amp;gt;= '01'.
 
          COMPUTE: balance_month_01 =   itab_bal00 + itab_bal01.
 
        ENDIF.
 
        IF p_date+4(2) &amp;gt;= '02'.
 
          COMPUTE: balance_month_02 = balance_month_01 + itab_bal02.
 
        ENDIF.
 
        IF p_date+4(2) &amp;gt;= '03'.
 
          COMPUTE: balance_month_03 = balance_month_02  + itab_bal03.
 
        ENDIF.
 
        IF p_date+4(2) &amp;gt;= '04'.
 
          COMPUTE: balance_month_04 = balance_month_03  + itab_bal04.
 
        ENDIF.
 
        IF p_date+4(2) &amp;gt;= '05'.
 
          COMPUTE: balance_month_05 = balance_month_04  + itab_bal05.
 
        ENDIF.
 
        IF p_date+4(2) &amp;gt;= '06'.
 
          COMPUTE: balance_month_06 =  balance_month_05  + itab_bal06.
 
        ENDIF.
 
        IF p_date+4(2) &amp;gt;= '07'.
 
          COMPUTE: balance_month_07 =  balance_month_06  + itab_bal07.
 
        ENDIF.
 
        IF p_date+4(2) &amp;gt;= '08'.
 
          COMPUTE: balance_month_08 =  balance_month_07  + itab_bal08.
 
        ENDIF.
 
        IF p_date+4(2) &amp;gt;= '09'.
 
          COMPUTE: balance_month_09 =  balance_month_08 + itab_bal09.
 
        ENDIF.
 
        IF p_date+4(2) &amp;gt;= '10'.
 
          COMPUTE: balance_month_10 =  balance_month_09  + itab_bal10.
 
        ENDIF.
 
        IF p_date+4(2) &amp;gt;= '11'.
 
          COMPUTE: balance_month_11 = balance_month_11  + itab_bal11.
 
        ENDIF.
 
        IF p_date+4(2) &amp;gt;= '12'.
 
          COMPUTE: balance_month_12 =  balance_month_12  +  itab_bal12.
 
        ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;obviously at the beginning set balance_month_1 ... balance_month_12 to 0&lt;/P&gt;&lt;P&gt;and another thing is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;       IF p_date+4(2) &amp;gt;= '01'.
 
          COMPUTE: balance_month_01 =   itab_bal00 + itab_bal01.
        ELSE.
CONTINUE.
        ENDIF.
        IF p_date+4(2) &amp;gt;= '02'.
          COMPUTE: balance_month_02 = itab_bal00 + itab_bal01 + itab_bal02.
        ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if pdate is not greater that 01 for sure is not as well greater then 02 so skip all the checks and go on using CONTINUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sergio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 15:14:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769384#M332310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T15:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769385#M332311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is better if I don't want to take an empty field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the field in the select or delete the records that exist in the internal table that have the field empty?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 17:18:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769385#M332311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T17:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Performance question.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769386#M332312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since this seems like a separate question, why not close this post (if answered) and start a new one?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 17:23:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-question/m-p/1769386#M332312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T17:23:07Z</dc:date>
    </item>
  </channel>
</rss>

