<?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: Print numbers between specific numbers using Control Check statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584769#M2009621</link>
    <description>&lt;P&gt;You can try the bellow code too, same of your code with little change on the condetion, &lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;PARAMETERS:int_01 TYPE i DEFAULT 25,
           int_02 TYPE i DEFAULT 20.

DO int_01  TIMES.

    IF sy-index &amp;gt; int_02.
         WRITE: / |{ sy-index }|.
    ENDIF.

ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;21&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;23&lt;/P&gt;&lt;P&gt;24&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2022 11:14:08 GMT</pubDate>
    <dc:creator>Yasin</dc:creator>
    <dc:date>2022-06-14T11:14:08Z</dc:date>
    <item>
      <title>Print numbers between specific numbers using Control Check statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584766#M2009618</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;PARAMETERS:int_01 TYPE i DEFAULT 25,&lt;BR /&gt;           int_02 TYPE i DEFAULT 20.
&lt;BR /&gt;DO int_01 TIMES.&lt;BR /&gt;    IF sy-index &amp;lt; int_02.&lt;BR /&gt;        CONTINUE.&lt;BR /&gt;    ENDIF.&lt;BR /&gt;    WRITE: / |{ sy-index }|.&lt;BR /&gt;ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Also tried using &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;DO int_01 TIMES.&lt;BR /&gt;      CHECK sy-index between int_02 AND int_01.&lt;BR /&gt;      WRITE: / |{ sy-index} |&lt;BR /&gt;ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;but also not getting the result I need.&lt;/P&gt;
  &lt;P&gt;Result of the first code is:&lt;/P&gt;
  &lt;P&gt;20&lt;/P&gt;
  &lt;P&gt;21&lt;/P&gt;
  &lt;P&gt;22&lt;/P&gt;
  &lt;P&gt;23&lt;/P&gt;
  &lt;P&gt;24&lt;/P&gt;
  &lt;P&gt;25.&lt;/P&gt;
  &lt;P&gt;I only need to print the numbers 21,22,23,24 and 25. Why is 20 being included?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 10:50:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584766#M2009618</guid>
      <dc:creator>walkerist79</dc:creator>
      <dc:date>2022-06-14T10:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Print numbers between specific numbers using Control Check statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584767#M2009619</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In below code, what happening is when sy-index is equal to 20 it will check if condition.&lt;/P&gt;&lt;P&gt;Then if condition 20 &amp;lt; 20 condition is false hence it will not go inside if statement and will execute write statement. and will print 20.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS:int_01 TYPE i DEFAULT 25,&lt;BR /&gt;           int_02 TYPE i DEFAULT 20.
&lt;BR /&gt;DO int_01 TIMES.&lt;BR /&gt;    IF sy-index &amp;lt; int_02.&lt;BR /&gt;        CONTINUE.&lt;BR /&gt;    ENDIF.&lt;BR /&gt;    WRITE: / |{ sy-index }|.&lt;BR /&gt;ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if you want result from 21 then you will have to change the if condition like below code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS:int_01 TYPE i DEFAULT 25,&lt;BR /&gt;           int_02 TYPE i DEFAULT 20.
&lt;BR /&gt;DO int_01 TIMES.&lt;BR /&gt;    IF sy-index &amp;lt;= int_02.&lt;BR /&gt;        CONTINUE.&lt;BR /&gt;    ENDIF.&lt;BR /&gt;    WRITE: / |{ sy-index }|.&lt;BR /&gt;ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anuja Kawadiwale&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 11:03:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584767#M2009619</guid>
      <dc:creator>anujawani242683</dc:creator>
      <dc:date>2022-06-14T11:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Print numbers between specific numbers using Control Check statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584768#M2009620</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;This is related to the do loop nature, it will run first  then will check the value on the next loop.&lt;/P&gt;&lt;P&gt;you can try the bellow code it is working as per your requirements &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS:int_01 TYPE i DEFAULT 25,&lt;BR /&gt;           int_02 TYPE i DEFAULT 20.&lt;BR /&gt;&lt;BR /&gt;DATA Counter TYPE I.&lt;BR /&gt;Counter = int_02.&lt;BR /&gt;&lt;BR /&gt;WHILE  Counter &amp;lt; int_01 .&lt;BR /&gt;   Counter = Counter + 1.&lt;BR /&gt;   WRITE: / |{ Counter }|.&lt;BR /&gt;ENDWHILE.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 11:05:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584768#M2009620</guid>
      <dc:creator>Yasin</dc:creator>
      <dc:date>2022-06-14T11:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Print numbers between specific numbers using Control Check statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584769#M2009621</link>
      <description>&lt;P&gt;You can try the bellow code too, same of your code with little change on the condetion, &lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;PARAMETERS:int_01 TYPE i DEFAULT 25,
           int_02 TYPE i DEFAULT 20.

DO int_01  TIMES.

    IF sy-index &amp;gt; int_02.
         WRITE: / |{ sy-index }|.
    ENDIF.

ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;21&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;23&lt;/P&gt;&lt;P&gt;24&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 11:14:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584769#M2009621</guid>
      <dc:creator>Yasin</dc:creator>
      <dc:date>2022-06-14T11:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Print numbers between specific numbers using Control Check statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584770#M2009622</link>
      <description>&lt;P&gt;Are you really asking, if you use CHECK number BETWEEN 20 and 25, why the condition is true between 20 and 25 ?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 12:03:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584770#M2009622</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-06-14T12:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Print numbers between specific numbers using Control Check statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584771#M2009623</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;PARAMETERS:INT_01 TYPE I DEFAULT 25,
           INT_02 TYPE I DEFAULT 20.

DO INT_01 TIMES.
  CHECK SY-INDEX BETWEEN INT_02 + 1  AND INT_01.
  WRITE: / |{ SY-INDEX }| .
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Jun 2022 06:53:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/print-numbers-between-specific-numbers-using-control-check-statement/m-p/12584771#M2009623</guid>
      <dc:creator>former_member808116</dc:creator>
      <dc:date>2022-06-15T06:53:30Z</dc:date>
    </item>
  </channel>
</rss>

