<?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: Prob in loop statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-in-loop-statement/m-p/1442286#M210220</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;When i'm debugging the following code it is not coming out of the loop statement.&lt;/P&gt;&lt;P&gt;FORM sub_dowload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: l_g_lt_dt TYPE dats,&lt;/P&gt;&lt;P&gt;      l_g_lt_tm TYPE tims.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  l_g_lt_dt = wa_update-last_run_dt.&lt;/P&gt;&lt;P&gt;  l_g_lt_tm = wa_update-last_run_tm.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;              prog_name        &lt;/P&gt;&lt;P&gt;              plant             &lt;/P&gt;&lt;P&gt;              last_run_dt       &lt;/P&gt;&lt;P&gt;              last_run_tm        &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;INTO TABLE  i_update&lt;/P&gt;&lt;P&gt;  FROM   z_download&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN i_t001w&lt;/P&gt;&lt;P&gt;  WHERE  plant EQ i_t001w-werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT i_update[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT i_update INTO wa_update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*if last run date is blank&lt;/P&gt;&lt;P&gt;      IF NOT l_g_lt_dt IS INITIAL.&lt;/P&gt;&lt;P&gt;        wa_update-last_run_dt = l_g_lt_dt.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        wa_update-last_run_dt = g_sysdate - 1.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;*if last run time is blank&lt;/P&gt;&lt;P&gt;      IF NOT l_g_lt_tm IS INITIAL.&lt;/P&gt;&lt;P&gt;        wa_update-last_run_tm = l_g_lt_tm.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        wa_update-last_run_tm = g_systime.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      APPEND wa_update TO i_update.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " sub_download&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me the possible error i made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also i'm trying to clear the work area at the start of subroutine but it is not working as seen in debugging mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Simran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 16 Jul 2006 08:38:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-16T08:38:25Z</dc:date>
    <item>
      <title>Prob in loop statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-in-loop-statement/m-p/1442285#M210219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;When i'm debugging the code it is not coming out of the loop statement.&lt;/P&gt;&lt;P&gt;Can anyone tell me the possible error i made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also i'm trying to clear the work area  at the start of subroutine but it is not working as seen in debugging mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Simran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Jul 2006 08:35:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-in-loop-statement/m-p/1442285#M210219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-16T08:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Prob in loop statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-in-loop-statement/m-p/1442286#M210220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;When i'm debugging the following code it is not coming out of the loop statement.&lt;/P&gt;&lt;P&gt;FORM sub_dowload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: l_g_lt_dt TYPE dats,&lt;/P&gt;&lt;P&gt;      l_g_lt_tm TYPE tims.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  l_g_lt_dt = wa_update-last_run_dt.&lt;/P&gt;&lt;P&gt;  l_g_lt_tm = wa_update-last_run_tm.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;              prog_name        &lt;/P&gt;&lt;P&gt;              plant             &lt;/P&gt;&lt;P&gt;              last_run_dt       &lt;/P&gt;&lt;P&gt;              last_run_tm        &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;INTO TABLE  i_update&lt;/P&gt;&lt;P&gt;  FROM   z_download&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN i_t001w&lt;/P&gt;&lt;P&gt;  WHERE  plant EQ i_t001w-werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT i_update[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT i_update INTO wa_update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*if last run date is blank&lt;/P&gt;&lt;P&gt;      IF NOT l_g_lt_dt IS INITIAL.&lt;/P&gt;&lt;P&gt;        wa_update-last_run_dt = l_g_lt_dt.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        wa_update-last_run_dt = g_sysdate - 1.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;*if last run time is blank&lt;/P&gt;&lt;P&gt;      IF NOT l_g_lt_tm IS INITIAL.&lt;/P&gt;&lt;P&gt;        wa_update-last_run_tm = l_g_lt_tm.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        wa_update-last_run_tm = g_systime.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      APPEND wa_update TO i_update.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " sub_download&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone tell me the possible error i made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also i'm trying to clear the work area at the start of subroutine but it is not working as seen in debugging mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Simran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Jul 2006 08:38:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-in-loop-statement/m-p/1442286#M210220</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-16T08:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Prob in loop statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-in-loop-statement/m-p/1442287#M210221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you are doing is to append a new row for each row of the table, so the table is continously getting new rows, so apparently it will not come of out the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess want to update the row rather than appending a new row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY i_update FROM wa_update INDEX SY-INDEX. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY I_UPDATE FROM WA_UPDATE WHERE XXX = XXXX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note : Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Jul 2006 08:52:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-in-loop-statement/m-p/1442287#M210221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-16T08:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Prob in loop statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-in-loop-statement/m-p/1442288#M210222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;If i want to get records greater than the last run date and last run time,from db table do i need give the range &lt;/P&gt;&lt;P&gt;i.e. GE last_run_dt&lt;/P&gt;&lt;P&gt;and  LE sy-datum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or just the GE last_run_dt will retrieve all records uptill sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Simran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Jul 2006 09:32:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-in-loop-statement/m-p/1442288#M210222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-16T09:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Prob in loop statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/prob-in-loop-statement/m-p/1442289#M210223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anything greater than the LAST_RUN_DT should give you everything till SY_DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note : Please close the thread if the issue is resolved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Jul 2006 09:34:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/prob-in-loop-statement/m-p/1442289#M210223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-16T09:34:15Z</dc:date>
    </item>
  </channel>
</rss>

