<?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: Rewrite Dump iterator in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/rewrite-dump-iterator/m-p/12623628#M2012880</link>
    <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt; thanks for your answer, &lt;/P&gt;</description>
    <pubDate>Fri, 05 Aug 2022 08:02:36 GMT</pubDate>
    <dc:creator>former_member816096</dc:creator>
    <dc:date>2022-08-05T08:02:36Z</dc:date>
    <item>
      <title>Rewrite Dump iterator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rewrite-dump-iterator/m-p/12623625#M2012877</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;
  &lt;P&gt;help abap begginer&lt;/P&gt;
  &lt;P&gt;I found program for my project, except it returns a Dump, (Time-out), the DO iteration never ends, i think i have to add a stop condition but i don't know where exactly and how stop it. plz correct me plz. thanks&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;l_date = ls_new_p2001-begda - 1.
DO.
LOOP AT lt_persw INTO ls_persw WHERE datum = l_date
                               AND ftkla = 0
                               AND stdaz &amp;lt;&amp;gt; 0.
ENDLOOP.
IF sy-subrc = 0.
SELECT SINGLE * FROM pa2001 INTO pa2001 WHERE pernr = ls_new_p2001-pernr
                                        AND subty = 'CE'
                                        AND begda &amp;lt;= l_date
                                        AND endda &amp;gt;= l_date.
    IF sy-subrc = 0.
     l_date = l_date - 1.
    ELSE.
     EXIT.
    ENDIF.
 ELSE.
   l_date = l_date - 1.
 ENDIF.
ENDDO.


&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Aug 2022 13:19:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rewrite-dump-iterator/m-p/12623625#M2012877</guid>
      <dc:creator>former_member816096</dc:creator>
      <dc:date>2022-08-04T13:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rewrite Dump iterator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rewrite-dump-iterator/m-p/12623626#M2012878</link>
      <description>&lt;P&gt;READ TABLE ... WHERE&lt;BR /&gt;&lt;BR /&gt;Are you sure?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 07:29:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rewrite-dump-iterator/m-p/12623626#M2012878</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-08-05T07:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Rewrite Dump iterator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rewrite-dump-iterator/m-p/12623627#M2012879</link>
      <description>&lt;P&gt;For clarity and efficiency use something like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;l_date = ls_new_p2001-begda - 1.
DO.
  IF entry_exists( l_date ).
    SELECT SINGLE * FROM pa2001 INTO pa2001 WHERE pernr = ls_new_p2001-pernr
                                        AND subty = 'CE'
                                        AND begda &amp;lt;= l_date
                                        AND endda &amp;gt;= l_date.
    IF sy-subrc = 0.
     l_date = l_date - 1.
    ELSE.
     EXIT.
    ENDIF.
 ELSE.
   l_date = l_date - 1.
 ENDIF.
ENDDO.&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;METHOD entry_exists. " Returning parameter r_result type abap_bool&lt;BR /&gt;  LOOP AT lt_persw INTO ls_persw WHERE datum = l_date
                                 AND ftkla = 0
                                 AND stdaz &amp;lt;&amp;gt; 0.&lt;BR /&gt;    r_result = abap_true.
    RETURN.
  ENDLOOP.
ENDMETHOD.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But that's not the cause of your error. &lt;/P&gt;&lt;P&gt;There is one place I can see where you'll get an eternal loop. In your LOOP AT - if there are no entries that match from the start date down, then the loop will never end.&lt;BR /&gt;&lt;BR /&gt;Try running it in debug.&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 07:38:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rewrite-dump-iterator/m-p/12623627#M2012879</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-08-05T07:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rewrite Dump iterator</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/rewrite-dump-iterator/m-p/12623628#M2012880</link>
      <description>&lt;P&gt; &lt;SPAN class="mention-scrubbed"&gt;matthew.billingham&lt;/SPAN&gt; thanks for your answer, &lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 08:02:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/rewrite-dump-iterator/m-p/12623628#M2012880</guid>
      <dc:creator>former_member816096</dc:creator>
      <dc:date>2022-08-05T08:02:36Z</dc:date>
    </item>
  </channel>
</rss>

