<?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: Statement WHILE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634045#M2013625</link>
    <description>&lt;P&gt;by the way in my programme i have already declare  P_VOLUME &lt;/P&gt;&lt;P&gt;is it right if i put like this :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;P_VPI = P_VOLUME MOD 10. &lt;/P&gt;&lt;BR /&gt;WRITE 'Le volume est divisible par 10'. &lt;BR /&gt;&lt;BR /&gt;WHILE  P_VPI &amp;lt;&amp;gt; 0. &lt;BR /&gt;P_VOLUME = P_VOLUME + 1.WRITE SY-INDEX. &lt;BR /&gt;ENDWHILE.</description>
    <pubDate>Thu, 09 Jun 2022 22:38:48 GMT</pubDate>
    <dc:creator>d4xtian</dc:creator>
    <dc:date>2022-06-09T22:38:48Z</dc:date>
    <item>
      <title>Statement WHILE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634044#M2013624</link>
      <description>&lt;P&gt;Can somebody lead me tot the solution please..&lt;/P&gt;
  &lt;P&gt;I want to test if a number is a multiple of 10, if yes it display a sentence that say yes, if not i want it to add 1 to that number until it become a multiple of 10 and i want to count how manu time it add.&lt;BR /&gt;&lt;BR /&gt;how to say « if P_VPI is not MOD 10 » in abap to put this condition in my While statement ?&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;thanks&lt;/P&gt;P_VPI = P_VOLUME MOD 10. 
  &lt;BR /&gt;
  &lt;BR /&gt;WRITE 'Le volume est divisible par 10'.
  &lt;BR /&gt;w
  &lt;BR /&gt;WHILE ??? .
  &lt;BR /&gt; P_VOLUME = P_VOLUME + 1.WRITE SY-INDEX.
  &lt;BR /&gt;ENDWHILE.</description>
      <pubDate>Thu, 09 Jun 2022 22:34:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634044#M2013624</guid>
      <dc:creator>d4xtian</dc:creator>
      <dc:date>2022-06-09T22:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Statement WHILE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634045#M2013625</link>
      <description>&lt;P&gt;by the way in my programme i have already declare  P_VOLUME &lt;/P&gt;&lt;P&gt;is it right if i put like this :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;P_VPI = P_VOLUME MOD 10. &lt;/P&gt;&lt;BR /&gt;WRITE 'Le volume est divisible par 10'. &lt;BR /&gt;&lt;BR /&gt;WHILE  P_VPI &amp;lt;&amp;gt; 0. &lt;BR /&gt;P_VOLUME = P_VOLUME + 1.WRITE SY-INDEX. &lt;BR /&gt;ENDWHILE.</description>
      <pubDate>Thu, 09 Jun 2022 22:38:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634045#M2013625</guid>
      <dc:creator>d4xtian</dc:creator>
      <dc:date>2022-06-09T22:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Statement WHILE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634046#M2013626</link>
      <description>&lt;P&gt;&lt;STRONG&gt;This may be of help to you.&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: P_VPI TYPE I.&lt;BR /&gt;DATA: LV_MOD TYPE P LENGTH 8 DECIMALS 2,&lt;BR /&gt;      LV_INT TYPE INT8.&lt;BR /&gt;&lt;BR /&gt;LV_INT = P_VPI.&lt;BR /&gt;LV_MOD = P_VPI MOD 10.&lt;BR /&gt;IF LV_MOD = 0.&lt;BR /&gt;  WRITE: 'Number: ', P_VPI , 'divisible par 10'.&lt;BR /&gt;ELSE.&lt;BR /&gt;  WHILE LV_MOD &amp;lt;&amp;gt; 0.&lt;BR /&gt;    P_VPI = LV_INT + SY-INDEX.&lt;BR /&gt;    LV_MOD = P_VPI MOD 10.&lt;BR /&gt;    IF LV_MOD = 0.&lt;BR /&gt;      WRITE: 'SY-INDEX:',  SY-INDEX.&lt;BR /&gt;      CONTINUE.&lt;BR /&gt;    ENDIF.&lt;BR /&gt;  ENDWHILE.&lt;BR /&gt;ENDIF.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Jun 2022 03:55:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634046#M2013626</guid>
      <dc:creator>former_member808116</dc:creator>
      <dc:date>2022-06-10T03:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Statement WHILE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634047#M2013627</link>
      <description>&lt;P&gt;For fun, assuming SY-INDEX can be used in the logical expression of WHILE (the ABAP documentation says it can be used only in the statement block of WHILE, not in the logical expression), the code can be simplified to:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: P_VPI TYPE I.
IF P_VPI MOD 10 = 0.&amp;lt;br&amp;gt;  WRITE: 'Number: ', P_VPI , 'divisible par 10'.
ELSE.
  WHILE ( P_VPI + sy-index - 1 ) MOD 10 &amp;lt;&amp;gt; 0.
    WRITE: 'SY-INDEX:',  SY-INDEX.
  ENDWHILE.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Jun 2022 07:06:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634047#M2013627</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-06-10T07:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Statement WHILE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634048#M2013628</link>
      <description>&lt;P&gt;Isn't this just ordinary maths, not requiring a loop.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF p_vpi MOD 10 = 0.
  WRITE 'YES!!!'.
ELSE.
  DATA(iterations) = 10 - p_vpi MOD 10.
  WRITE 'I need to add 1 to p_vpi', iterations, 'times to get to divisible by ten'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Jun 2022 10:10:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634048#M2013628</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-06-10T10:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Statement WHILE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634049#M2013629</link>
      <description>&lt;P&gt;No it is an training project, it is what was asking to do...&lt;/P&gt;&lt;P&gt;just to learn how to loop is working.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 12:29:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634049#M2013629</guid>
      <dc:creator>d4xtian</dc:creator>
      <dc:date>2022-06-10T12:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Statement WHILE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634050#M2013630</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please try as below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if (n MOD 10) NE 0.
    lv_count = (10 - n MOD 10).&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Jun 2022 12:45:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634050#M2013630</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2022-06-10T12:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Statement WHILE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634051#M2013631</link>
      <description>&lt;P&gt;Ah, OK. Training exercise.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 20:57:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-while/m-p/12634051#M2013631</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-06-11T20:57:21Z</dc:date>
    </item>
  </channel>
</rss>

