<?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 on function module fagl_segment_contains_data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225631#M1983979</link>
    <description>&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;Thanks for this. Per checking the OSS Note, software component is SAP_FIN 720 but we are still currently on SAP_FIN 617.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1831624-ulp08.png" /&gt;&lt;/P&gt;&lt;P&gt;Does this mean the correction cannot be applied to our system?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kath&lt;/P&gt;</description>
    <pubDate>Tue, 04 Aug 2020 10:29:50 GMT</pubDate>
    <dc:creator>former_member602116</dc:creator>
    <dc:date>2020-08-04T10:29:50Z</dc:date>
    <item>
      <title>Performance issue on function module fagl_segment_contains_data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225627#M1983975</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt;We have a custom transaction code that has a runtime issue as it takes very long to process . Per checking via SAT, long runtime (almost 90% runtime) is happening in check_data(1) TO check_data(4) of standard FM FAGL_SEGMENT_CONTAINS_DATA since inside these subroutines there is a select from a generic identifier. Since this is standard SAP, I didn't expect to see a code where nested loop is performed. &lt;/P&gt;
  &lt;P&gt;LOOP AT lt_ledgers.&lt;/P&gt;
  &lt;P&gt;LOOP AT lt_tka02.&lt;/P&gt;
  &lt;P&gt;WHILE ( ld_akt_year &amp;lt;= ld_end_year AND&lt;BR /&gt; ld_akt_year &amp;lt;= ld_syyear ) .&lt;/P&gt;
  &lt;P&gt;PERFORM check_data USING ...&lt;/P&gt;
  &lt;P&gt;PERFORM check_data(2) USING ...&lt;/P&gt;
  &lt;P&gt;PERFORM check_data(3) USING ...&lt;/P&gt;
  &lt;P&gt;PERFORM check_data(4) USING ...&lt;/P&gt;
  &lt;P&gt;ENDWHILE.&lt;/P&gt;
  &lt;P&gt;ENDLOOP.&lt;/P&gt;
  &lt;P&gt;ENDLOOP.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Is this kind of code okay?&lt;/P&gt;We have always been taught to avoid retrieving from the database within a loop and to also avoid nested loops. But in this FM, retrieving from database is inside a nested loop. Please correct me if I'm wrong.
  &lt;P&gt;Thank you.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Kath&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 09:54:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225627#M1983975</guid>
      <dc:creator>former_member602116</dc:creator>
      <dc:date>2020-08-04T09:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on function module fagl_segment_contains_data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225628#M1983976</link>
      <description>&lt;P&gt;Hello  &lt;SPAN class="mention-scrubbed"&gt;kdarunday&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Yeah, sometimes these happen... Check SAP OSS note #2219690 - it might help.&lt;/P&gt;Kind regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Tue, 04 Aug 2020 09:58:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225628#M1983976</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-08-04T09:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on function module fagl_segment_contains_data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225629#M1983977</link>
      <description>&lt;P&gt;What SAP version do you currently have?&lt;/P&gt;&lt;P&gt;Did you check support.sap.com. There is a SAP note from late 2016 concerning this issue. And looking at the code changes from that SAP note, it should address your problem, as your posted coding would be affected by it:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;2219690 - Performance correction in function module FAGL_SEGMENT_CONTAINS_DATA&lt;BR /&gt;&lt;A href="https://launchpad.support.sap.com/#/notes/2219690"&gt;https://launchpad.support.sap.com/#/notes/2219690&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 04 Aug 2020 10:03:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225629#M1983977</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-08-04T10:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on function module fagl_segment_contains_data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225630#M1983978</link>
      <description>&lt;P&gt;Hi Mateusz,&lt;/P&gt;&lt;P&gt;Thanks for the confirmation. I have checked the OSS Note however, per checking the software component is SAP_FIN 720&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1831622-e6o36.png" /&gt;&lt;/P&gt;&lt;P&gt;And we are still currently on SAP_FIN 617:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1831623-yfcvh.png" /&gt;&lt;/P&gt;&lt;P&gt;Does this mean the correction cannot be applied to our system?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Kath&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 10:25:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225630#M1983978</guid>
      <dc:creator>former_member602116</dc:creator>
      <dc:date>2020-08-04T10:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on function module fagl_segment_contains_data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225631#M1983979</link>
      <description>&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;Thanks for this. Per checking the OSS Note, software component is SAP_FIN 720 but we are still currently on SAP_FIN 617.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1831624-ulp08.png" /&gt;&lt;/P&gt;&lt;P&gt;Does this mean the correction cannot be applied to our system?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kath&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 10:29:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225631#M1983979</guid>
      <dc:creator>former_member602116</dc:creator>
      <dc:date>2020-08-04T10:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on function module fagl_segment_contains_data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225632#M1983980</link>
      <description>&lt;P&gt;Yes, it would appear so. In this case I would raise a ticket with SAP as this is a standard code's issue.&lt;/P&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Tue, 04 Aug 2020 13:10:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225632#M1983980</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2020-08-04T13:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue on function module fagl_segment_contains_data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225633#M1983981</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;kdarunday&lt;/SPAN&gt;, since you are on 617, and the correction is only offered for 720, I strongly assume that the SAP note cannot be applied to your system (neither through trx. SNOTE, nor 'manually' by your development through modification).
&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;To be sure though, you could download the SAP note with Trx. SNOTE and check its status.&lt;/LI&gt;&lt;LI&gt;Also, you could have a developer check if modifying the referenced repository items (FM FAGL_SEGMENT_CONTAINS_DATA, Include LFAGL_SEGMENT_CHECKF01) according to the changes in the SAP note would help your problem. But again, I strongly assume that you will be missing further neccessary DDIC and Repository data, because you are on an older version and there are also prerequisite SAP notes to be implemented as well.&lt;/LI&gt;&lt;LI&gt;Best thing you can do, is open a support request with SAP regarding your problem. I assume though, that the answer will be to upgrade to either 720 or the latest SAP_FIN version which is currently 730, if i am not mistaken.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 04 Aug 2020 13:32:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue-on-function-module-fagl-segment-contains-data/m-p/12225633#M1983981</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-08-04T13:32:23Z</dc:date>
    </item>
  </channel>
</rss>

