<?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: Which loop is better ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-loop-is-better/m-p/12564146#M2007937</link>
    <description>&lt;P&gt;expensive = database access, etc.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Sep 2022 07:31:53 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2022-09-08T07:31:53Z</dc:date>
    <item>
      <title>Which loop is better ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-loop-is-better/m-p/12564143#M2007934</link>
      <description>&lt;P&gt;From an Input let's say '3' i want to display a product of that input from 1 to 10, but i want to skip the 5th iterration.&lt;BR /&gt;I made two loop and i would like to know if there is one that is better than an other in term of optimisation...&lt;/P&gt;
  &lt;P&gt;And yes i have already declare all variables and parameters.&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt;Loop1&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;WHILE v_y &amp;lt;= 10 .            " Loop the into the v_y  until it is equal 10

  IF v_y &amp;lt;&amp;gt; 5 .              " We check if v_y is different than 5
    v_res = p_x * v_y .
    WRITE :/ p_x,'*',v_y,'=',v_res .
  ELSE.                      " If v_y = 5 we skip and we do nothing

  ENDIF .
  v_y = v_y + 1 .            " We increment the v_y to go to the next number
ENDWHILE .&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Loop 2&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;WHILE v_y &amp;lt;= 10 .            " Loop the mutiply until variable equal 10

  IF v_y = 5 .              " We check if v_y is different than 5
    v_y = v_y + 1 .         "We increment the v_y
    CONTINUE.
  ENDIF.
    v_res = p_x * v_y .
    WRITE :/ p_x,'*',v_y,'=',v_res .
    v_y = v_y + 1 .            " We increment the v_y to go to the next number
ENDWHILE .&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Sep 2022 17:20:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-loop-is-better/m-p/12564143#M2007934</guid>
      <dc:creator>d4xtian</dc:creator>
      <dc:date>2022-09-07T17:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Which loop is better ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-loop-is-better/m-p/12564144#M2007935</link>
      <description>&lt;P&gt;You should not waste time in optimizing few microseconds... Focus on expensive constructs only.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 18:16:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-loop-is-better/m-p/12564144#M2007935</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-09-07T18:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Which loop is better ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-loop-is-better/m-p/12564145#M2007936</link>
      <description>&lt;P&gt;thank you   &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;what are you calling expensive construts ?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 21:20:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-loop-is-better/m-p/12564145#M2007936</guid>
      <dc:creator>d4xtian</dc:creator>
      <dc:date>2022-09-07T21:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Which loop is better ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/which-loop-is-better/m-p/12564146#M2007937</link>
      <description>&lt;P&gt;expensive = database access, etc.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 07:31:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/which-loop-is-better/m-p/12564146#M2007937</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-09-08T07:31:53Z</dc:date>
    </item>
  </channel>
</rss>

