<?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: Form Routine calling itself in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-routine-calling-itself/m-p/7823515#M1589218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed.  I should have included the code above this section where the NUMBER_GET_NEXT FM is called to build the next lv_ean11(UPC number) value used in the select.  This process will continue until a matching UPC number is not found in MEAN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Apr 2011 15:05:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-04-27T15:05:08Z</dc:date>
    <item>
      <title>Form Routine calling itself</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-routine-calling-itself/m-p/7823513#M1589216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to know what the perfomance issues if any the following code would cause:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single matnr&lt;/P&gt;&lt;P&gt;                       from mean&lt;/P&gt;&lt;P&gt;                       into lv_matnr&lt;/P&gt;&lt;P&gt;                      where ean11 = lv_ean11&lt;/P&gt;&lt;P&gt;                        and eantp = 'UC'.      "#EC *&lt;/P&gt;&lt;P&gt;              if sy-subrc = 0.                 " If Same UPC existed / assigned to material then generate next UPC number&lt;/P&gt;&lt;P&gt;                 perform GET_NEXT_NUMBER.  " Get Next number in the same number range&lt;/P&gt;&lt;P&gt;              else.&lt;/P&gt;&lt;P&gt;                 V_UPC = lv_upc_chk.&lt;/P&gt;&lt;P&gt;              endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that this code is in the form routine GET_NEXT_NUMBER and if the select to MEAN is successful it calls itself.  If this happens many times wouldn't this have a negative effect on performance?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 14:46:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-routine-calling-itself/m-p/7823513#M1589216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-27T14:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Form Routine calling itself</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-routine-calling-itself/m-p/7823514#M1589217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; I would like to know what the perfomance issues if any the following code would cause:&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; select single matnr&lt;/P&gt;&lt;P&gt;&amp;gt;                        from mean&lt;/P&gt;&lt;P&gt;&amp;gt;                        into lv_matnr&lt;/P&gt;&lt;P&gt;&amp;gt;                       where ean11 = lv_ean11&lt;/P&gt;&lt;P&gt;&amp;gt;                         and eantp = 'UC'.      "#EC *&lt;/P&gt;&lt;P&gt;&amp;gt;               if sy-subrc = 0.                 " If Same UPC existed / assigned to material then generate next UPC number&lt;/P&gt;&lt;P&gt;&amp;gt;                  perform GET_NEXT_NUMBER.  " Get Next number in the same number range&lt;/P&gt;&lt;P&gt;&amp;gt;               else.&lt;/P&gt;&lt;P&gt;&amp;gt;                  V_UPC = lv_upc_chk.&lt;/P&gt;&lt;P&gt;&amp;gt;               endif.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; The issue is that this code is in the form routine GET_NEXT_NUMBER and if the select to MEAN is successful it calls itself.  If this happens many times wouldn't this have a negative effect on performance?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless you change lv_ean11 - This will be endless loop. Forget about performance but think about getting out from the routine. &lt;/P&gt;&lt;P&gt;if the value is changed then that is ok if it serves the purpose. This is a recursive call and cannot be eliminated if required.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 14:58:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-routine-calling-itself/m-p/7823514#M1589217</guid>
      <dc:creator>former_member191735</dc:creator>
      <dc:date>2011-04-27T14:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Form Routine calling itself</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-routine-calling-itself/m-p/7823515#M1589218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed.  I should have included the code above this section where the NUMBER_GET_NEXT FM is called to build the next lv_ean11(UPC number) value used in the select.  This process will continue until a matching UPC number is not found in MEAN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 15:05:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-routine-calling-itself/m-p/7823515#M1589218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-27T15:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Form Routine calling itself</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/form-routine-calling-itself/m-p/7823516#M1589219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that's alright, If you cannot eliminate the recursive call. as far as i know, there is no alternate to recursive&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 15:09:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/form-routine-calling-itself/m-p/7823516#M1589219</guid>
      <dc:creator>former_member191735</dc:creator>
      <dc:date>2011-04-27T15:09:18Z</dc:date>
    </item>
  </channel>
</rss>

