<?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 Tuning in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903711#M1145020</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>Fri, 30 Jan 2009 06:09:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-30T06:09:10Z</dc:date>
    <item>
      <title>Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903705#M1145014</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;Can we do furthur performance tuning on the below code. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;form check_fac.

  data: begin of it_eslh_knumv occurs 0,
          packno like eslh-packno,
          knumv  like eslh-knumv,
        end of it_eslh_knumv,

        begin of it_ses_konv occurs 0,
          knumv like konv-knumv,
          kschl like konv-kschl,
          kposn like konv-kposn,
          kwert like konv-kwert,
          kpein like konv-kpein,
          kmein like konv-kmein,
          kbetr like konv-kbetr,
        end of it_ses_konv,

        l_idx like sy-tabix,
        l_kposn like konv-kposn.

  sort: it_essr by ebeln ebelp.

  loop at it_essr into wa_essr.
    wa_s994-mandt      = sy-mandt.
    wa_s994-zzebeln_02 = wa_essr-ebeln.
    wa_s994-zzebelp_03 = wa_essr-ebelp.
	(some more assignments here)
    loop at it_ses_package into wa_ses_package
      where packno_h = wa_essr-packno.

*     ESLH data
      wa_s994-zzpackno2 = wa_ses_package-packno_h.
      wa_s994-zzdel1    = wa_ses_package-packno_h.
      wa_s994-zzfpackno = wa_ses_package-fpackno.
      wa_s994-zzhpackno = wa_ses_package-hpackno.
      	(some more assignments here)

   loop at it_esll_plus2 into wa_esll_plus2
        where packno = wa_ses_package-sub_packno.
  wa_s994-zzintrow2  = wa_esll_plus2-introw.
  wa_s994-zzsrvpos   = wa_esll_plus2-srvpos.           
  wa_s994-zzmenge2   = wa_esll_plus2-menge.            
  wa_s994-zzktext11  = wa_esll_plus2-ktext1.    

        append wa_s994 to it_s994.
      endloop.                                               
    endloop.  
  endloop.  



* Get all the condition no. from ESLH for the sub package numbers
  select packno knumv from eslh into table it_eslh_knumv
     for all entries in it_s994
     where packno = it_s994-zzpackn_01.

* Get all the condition records from KONV
  select  knumv kschl kposn kwert kpein kmein kbetr
    from  konv
    into corresponding fields of table it_ses_konv
    for all entries in it_eslh_knumv
    where ( kschl = 'PRS'  or kschl = 'Z001'
    or      kschl = 'Z002' or kschl = 'Z003' )
    and     kappl = 'MS'
    and     knumv = it_eslh_knumv-knumv.

  sort it_eslh_knumv by packno knumv.
  sort it_s994 by zzpackn_01 zzintrow2.
  sort it_ses_konv by knumv kposn.

  if not it_ses_konv[] is initial.
    loop at it_s994 into wa_s994.
      l_idx = sy-tabix.
read table it_eslh_knumv with key packno = wa_s994-zzpackn_01 binary search.
      if sy-subrc = 0.
        clear l_kposn.
        l_kposn = wa_s994-zzintrow2.
        read table it_ses_konv with key knumv = it_eslh_knumv-knumv kposn = l_kposn binary search.
        if sy-subrc = 0.
          loop at it_ses_konv where knumv = it_eslh_knumv-knumv and kposn = l_kposn.

            if it_ses_konv-kschl = 'PRS'.
              wa_s994-zzkwert_p = it_ses_konv-kwert.
              wa_s994-zzkpein_p = it_ses_konv-kpein.
              wa_s994-zzkmein_p = it_ses_konv-kmein.
              wa_s994-zzkbetr_p = it_ses_konv-kbetr.
            endif.
            if it_ses_konv-kschl = 'Z001'.
              wa_s994-zzkwert_1 = it_ses_konv-kwert.
              wa_s994-zzkpein_1 = it_ses_konv-kpein.
              wa_s994-zzkmein_1 = it_ses_konv-kmein.
              wa_s994-zzkbetr_1 = it_ses_konv-kbetr.
            endif.
            if it_ses_konv-kschl = 'Z002'.
              wa_s994-zzkwert_2 = it_ses_konv-kwert.
              wa_s994-zzkpein_2 = it_ses_konv-kpein.
              wa_s994-zzkmein_2 = it_ses_konv-kmein.
              wa_s994-zzkbetr_2 = it_ses_konv-kbetr.
            endif.
            if it_ses_konv-kschl = 'Z003'.
              wa_s994-zzkwert_3 = it_ses_konv-kwert.
              wa_s994-zzkpein_3 = it_ses_konv-kpein.
              wa_s994-zzkmein_3 = it_ses_konv-kmein.
              wa_s994-zzkbetr_3 = it_ses_konv-kbetr.
            endif.
            at end of kposn.
              modify it_s994 index l_idx
                from wa_s994
            transporting zzkwert_p zzkpein_p zzkmein_p zzkbetr_p
                          zzkwert_1 zzkpein_1 zzkmein_1 zzkbetr_1
                          zzkwert_2 zzkpein_2 zzkmein_2 zzkbetr_2
                          zzkwert_3 zzkpein_3 zzkmein_3 zzkbetr_3.
            endat.
          endloop.

        endif.
      endif.
    endloop.
  endif.

endform.                    " check_fac&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Dec 12, 2008 4:19 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 14:14:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903705#M1145014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-12T14:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903706#M1145015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see [The Performance of Nested Loops|&lt;A class="jive_macro jive_macro_blogpost" href="https://community.sap.com/" __jive_macro_name="blogpost" modifiedtitle="true" __default_attr="41337"&gt;&lt;/A&gt;].&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, 12 Dec 2008 14:29:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903706#M1145015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-12T14:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903707#M1145016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;1. Instead of using 'occurs 0' use 'types' in data declaration. &lt;/P&gt;&lt;P&gt;2. try to used field-symbol instead of work area or header line. &lt;/P&gt;&lt;P&gt;3. try to use Read statemene rather than nested loop &lt;/P&gt;&lt;P&gt;4. try to avoid move corresponding in select statement. &lt;/P&gt;&lt;P&gt;5. before using the 'for all entries' you should be check the table is initial or not. &lt;/P&gt;&lt;P&gt;6.in where clause we may write this where kschl in ( 'PRS' , 'Z001', 'Z002', 'Z003' ) &lt;/P&gt;&lt;P&gt;i hope this is useful for u . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards: &lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2008 07:01:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903707#M1145016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-15T07:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903708#M1145017</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 recommend the measure-not-guessing approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check with SE30 and ST05  find out the longest running parts , then post the results here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the complete report:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_blogpost" href="https://community.sap.com/" __jive_macro_name="blogpost" modifiedtitle="true" __default_attr="45105"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your expensive SQL statements:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_blogpost" href="https://community.sap.com/" __jive_macro_name="blogpost" modifiedtitle="true" __default_attr="44587"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2008 13:39:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903708#M1145017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-15T13:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903709#M1145018</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 go through your code &amp;amp; use for all entries if used joins.&lt;/P&gt;&lt;P&gt;Use all key fields when using for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use binary search when reading...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Krishna...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2008 14:28:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903709#M1145018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-15T14:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903710#M1145019</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;please ask yourself these questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;why there is still a join syntax in OPEN SQL if you only need to speed up the performance with FAE?&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;why there are SAP Notes about FAE pitfalls and KNOWN performance issues with them?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your apporoach is: I will turn all my problems into  nails so I only have to use my hammer (wich is the only tool I need ever).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, but in reality you need a set of tools (means:Joins are not always evil, FAE are not always good)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2008 14:46:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903710#M1145019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-15T14:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Performance Tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903711#M1145020</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>Fri, 30 Jan 2009 06:09:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-tuning/m-p/4903711#M1145020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-30T06:09:10Z</dc:date>
    </item>
  </channel>
</rss>

