<?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 help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-help/m-p/2775134#M646771</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I didnt get the logic (as i donno the reqmt) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. But check if it is possible to use the FM once and store the data in an internal table (if DBT access is reqd in the FM)  and read the internal table inside the LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. SELECT kostl period miss_days&lt;/P&gt;&lt;P&gt;INTO TABLE gt_miss_data&lt;/P&gt;&lt;P&gt;FROM zaverageh_data&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN costcenters&lt;/P&gt;&lt;P&gt;WHERE kostl EQ costcenters-kostl&lt;/P&gt;&lt;P&gt;AND period BETWEEN l_stperiod&lt;/P&gt;&lt;P&gt;AND l_enperiod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above query, if any of the fields in the condition is not a key field then create an index for the same and try. This would increase the performance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Sep 2007 09:31:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-10T09:31:27Z</dc:date>
    <item>
      <title>performance help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-help/m-p/2775133#M646770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i buield this rfc to portal and when i run it it takes like 4,206,413 Microseconds&lt;/P&gt;&lt;P&gt;how i can decrease the time of runnig.&lt;/P&gt;&lt;P&gt;thankes &lt;/P&gt;&lt;P&gt;this is all my code &lt;/P&gt;&lt;P&gt;i reward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE sy-datum(4) '01' INTO l_stperiod.&lt;/P&gt;&lt;P&gt;tmp_stperiod = l_stperiod.&lt;/P&gt;&lt;P&gt;l_enperiod = sy-datum .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bet_period = l_enperiod - l_stperiod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT costcenters ASSIGNING &amp;lt;fs_cost&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_stperiod = tmp_stperiod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO bet_period TIMES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZEMP_MISS_DAYS'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;kostl = &amp;lt;fs_cost&amp;gt;-kostl&lt;/P&gt;&lt;P&gt;period = l_stperiod&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;emp_miss_days = emp_miss_days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_stperiod = l_stperiod + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_stperiod = tmp_stperiod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT emp_miss_days BY kostl period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT emp_miss_days .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING emp_miss_days TO col_miss_tab.&lt;/P&gt;&lt;P&gt;COLLECT col_miss_tab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*creating the data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF costcenters[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT kostl period miss_days&lt;/P&gt;&lt;P&gt;INTO TABLE gt_miss_data&lt;/P&gt;&lt;P&gt;FROM zaverageh_data&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN costcenters&lt;/P&gt;&lt;P&gt;WHERE kostl EQ costcenters-kostl&lt;/P&gt;&lt;P&gt;AND period BETWEEN l_stperiod&lt;/P&gt;&lt;P&gt;AND l_enperiod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 09:16:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-help/m-p/2775133#M646770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T09:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: performance help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-help/m-p/2775134#M646771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I didnt get the logic (as i donno the reqmt) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. But check if it is possible to use the FM once and store the data in an internal table (if DBT access is reqd in the FM)  and read the internal table inside the LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. SELECT kostl period miss_days&lt;/P&gt;&lt;P&gt;INTO TABLE gt_miss_data&lt;/P&gt;&lt;P&gt;FROM zaverageh_data&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN costcenters&lt;/P&gt;&lt;P&gt;WHERE kostl EQ costcenters-kostl&lt;/P&gt;&lt;P&gt;AND period BETWEEN l_stperiod&lt;/P&gt;&lt;P&gt;AND l_enperiod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above query, if any of the fields in the condition is not a key field then create an index for the same and try. This would increase the performance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2007 09:31:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-help/m-p/2775134#M646771</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-10T09:31:27Z</dc:date>
    </item>
  </channel>
</rss>

