<?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: looping issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/7115454#M1510368</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can post the complete code, that might help us understand better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if you are not appending your values, why are you repeatedly selecting from DB into a variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jul 2010 11:43:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-09T11:43:59Z</dc:date>
    <item>
      <title>looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/7115452#M1510366</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;I loop over a table. Within that loop I have a while loop that continues to call the following code as long as flg_end is blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM find_next_step CHANGING p_next_step.&lt;/P&gt;&lt;P&gt;  DATA: lv_next_step TYPE stunr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT SINGLE stunr&lt;/P&gt;&lt;P&gt;    INTO lv_next_step&lt;/P&gt;&lt;P&gt;    FROM t683s&lt;/P&gt;&lt;P&gt;    WHERE kvewe = c_a             "Usage&lt;/P&gt;&lt;P&gt;      AND kappl = c_ka            "Application&lt;/P&gt;&lt;P&gt;      AND kalsm = 'ZCBK01'        "Procedure&lt;/P&gt;&lt;P&gt;      AND ( ( stunb &amp;gt;= p_next_step )&lt;/P&gt;&lt;P&gt;        AND ( stun2 &amp;lt;= p_next_step ) ).&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    p_next_step = lv_next_step.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    flg_end = 'X'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First pass and a step is successfully returned. Second pass the select fails...and I drop outside the while loop. This process repeats until I reach end of outer table.. Odd...if I remove the while loop and replace with a do loop...all additional reads fail. If I remove the inner loop and perform static calls to the program...all additional reads fail. What gives?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 10:44:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/7115452#M1510366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-09T10:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/7115453#M1510367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mathew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see the veriable "p_next_step" in your where condition&lt;/P&gt;&lt;P&gt;and it is set by same select statement via variable lv_next_step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems like it's caused by the value of this variable &lt;/P&gt;&lt;P&gt;on further loop steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please post your code including loop and while commands?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bulent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 11:16:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/7115453#M1510367</guid>
      <dc:creator>bbalci</dc:creator>
      <dc:date>2010-07-09T11:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/7115454#M1510368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can post the complete code, that might help us understand better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if you are not appending your values, why are you repeatedly selecting from DB into a variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 11:43:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/7115454#M1510368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-09T11:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/7115455#M1510369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;according to my analsys, either ur while loop will execute infinetly or it will not be executed even a single time,&lt;/P&gt;&lt;P&gt;as ur condition is not getting changed with in the same loop at every pass and also u are not storing values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 12:30:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/7115455#M1510369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-09T12:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: looping issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/7115456#M1510370</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 you please post the entire code? Please note that using a loop inside a loop (especially inside a loop at table )is not adviseable as it affects the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Please post the entire code so that we can better analyse the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shiny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 15:07:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-issue/m-p/7115456#M1510370</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-09T15:07:10Z</dc:date>
    </item>
  </channel>
</rss>

