<?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: loop counter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653692#M611876</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swathi..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;incase of  DO loop or WHILE loop. the loop counter is stored in SY-INDEX.&lt;/P&gt;&lt;P&gt;incase of  internal table Loop. EndLoop  the counter is stored in SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;REWARD IF HELPFUL&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Aug 2007 03:31:52 GMT</pubDate>
    <dc:creator>varma_narayana</dc:creator>
    <dc:date>2007-08-28T03:31:52Z</dc:date>
    <item>
      <title>loop counter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653689#M611873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in which system variable loop counter store&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 03:21:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653689#M611873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T03:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: loop counter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653690#M611874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use sy-tabix, or u can use sy-loopc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 03:26:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653690#M611874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T03:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: loop counter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653691#M611875</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;In LOOP AT IT_TABLE into wa_table, loop counter store in SY-TABIX.&lt;/P&gt;&lt;P&gt;But in Do n Times loop, it strore in SY-INDEX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 03:28:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653691#M611875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T03:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: loop counter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653692#M611876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swathi..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;incase of  DO loop or WHILE loop. the loop counter is stored in SY-INDEX.&lt;/P&gt;&lt;P&gt;incase of  internal table Loop. EndLoop  the counter is stored in SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;REWARD IF HELPFUL&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 03:31:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653692#M611876</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-08-28T03:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: loop counter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653693#M611877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swathi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system structure have two variables sy-tabix and sy-index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable sy-tabix, for the internal tables operations. This variable holds the number of the record currently being read in an internal table loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When a loop statement is executed, the system assigns value 1 for the first iteration and increases it for each new record. If we use any READ statement inside the LOOP, then the successfull READ operation changes the value of sy-tabix to the position of the required record in the read table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variable sy-index is used for the iterative operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This variable holds the current iteration number in a WHILE or DO loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Vikas Bittera.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***Points for usefull answers &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; ***&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 03:46:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653693#M611877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T03:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: loop counter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653694#M611878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is not working if there is a condition in your loop!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TABIX is the index of the internal table&lt;/P&gt;&lt;P&gt;So it will show you in which line you are but this is definietly not a counter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case you will have to create a counter manually.&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, 06 Nov 2015 09:26:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/2653694#M611878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-11-06T09:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: loop counter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/13925225#M2037734</link>
      <description>&lt;P&gt;This is wrong!!!&lt;/P&gt;&lt;P&gt;If you have a loop with a where condition&amp;nbsp; -&amp;gt; Your first hit in sy-tabix can by anything&lt;/P&gt;&lt;P&gt;lets asume you habe an internal table:&lt;/P&gt;&lt;P&gt;row 1 = value A&lt;BR /&gt;row 2 = value B&lt;BR /&gt;row 3 = value C&lt;/P&gt;&lt;P&gt;If your code is:&lt;BR /&gt;loop at internal_table&lt;BR /&gt;where value = 'B'&lt;/P&gt;&lt;P&gt;--&amp;gt; sy-tabix will be 2!!!!!&lt;/P&gt;&lt;P&gt;so you cannot use this as an loop count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 15:33:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-counter/m-p/13925225#M2037734</guid>
      <dc:creator>MarioMller</dc:creator>
      <dc:date>2024-10-31T15:33:46Z</dc:date>
    </item>
  </channel>
</rss>

