<?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: Internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546198#M579262</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;sy-index will give u the number of iteration in the loop.&lt;/P&gt;&lt;P&gt;sy-tabix will give u the number rows filled in an internal table at the moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TABIX:&lt;/P&gt;&lt;P&gt;Current line in an internal table. With the following statements SY-TABIX is set for index tables. With hashed tables, SY-TABIX is not filled or it is set to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- APPEND sets SY-TABIX to the index of the last table row, that is the total number of entries in the target table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- COLLECT sets SY-TABIX to the index of the existing or appended table row. With hashed tables, SY-TABIX is set to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- LOOP AT sets SY-TABIX to the index of the current table row at the beginning of every loop pass. After leaving a loop, SY-TABIX is set to the value it had before entering the loop. With hashed tables, SY-TABIX is set to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- READ TABLE sets SY-TABIX to the index of the table row read. If no row is found with binary search while reading, SY-TABIX contains the index of the next-highest row or the total number of rows +1. If no row is found with linear search while reading, SY-TABIX is undefined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- SEARCH itab FOR sets SY-TABIX to the index of the table row, in which the search string was found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-INDEX:&lt;/P&gt;&lt;P&gt;SY-INDEX contains the number of loop passes in DO and WHILE loops, including the current loop pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Roja Velagapudi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jul 2007 09:42:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-18T09:42:00Z</dc:date>
    <item>
      <title>Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546196#M579260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the difference between sy-index and sy-tabix?can any one provide me with some points on this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 09:39:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546196#M579260</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T09:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546197#M579261</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;SY-TABIX means Table Index. This signifies the number of table index. Each row of a table has certain index or counter. The value of sy-tabix for the last entry would be equivalent to number of table entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-INDEX means the number of Iterations for a loop. bascially DO - ENDO .&lt;/P&gt;&lt;P&gt;SY-INDEX is not equal to SY-TABIX. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the belwo program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report tabix_index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 100 times.&lt;/P&gt;&lt;P&gt;wa_tab-index = sy-index.&lt;/P&gt;&lt;P&gt;append wa_tab to itab.&lt;/P&gt;&lt;P&gt;clear wa_tab.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa_tab.&lt;/P&gt;&lt;P&gt;write:/1 sy-tabix.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this answers your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful answers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Omakr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 09:40:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546197#M579261</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T09:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546198#M579262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;sy-index will give u the number of iteration in the loop.&lt;/P&gt;&lt;P&gt;sy-tabix will give u the number rows filled in an internal table at the moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TABIX:&lt;/P&gt;&lt;P&gt;Current line in an internal table. With the following statements SY-TABIX is set for index tables. With hashed tables, SY-TABIX is not filled or it is set to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- APPEND sets SY-TABIX to the index of the last table row, that is the total number of entries in the target table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- COLLECT sets SY-TABIX to the index of the existing or appended table row. With hashed tables, SY-TABIX is set to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- LOOP AT sets SY-TABIX to the index of the current table row at the beginning of every loop pass. After leaving a loop, SY-TABIX is set to the value it had before entering the loop. With hashed tables, SY-TABIX is set to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- READ TABLE sets SY-TABIX to the index of the table row read. If no row is found with binary search while reading, SY-TABIX contains the index of the next-highest row or the total number of rows +1. If no row is found with linear search while reading, SY-TABIX is undefined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- SEARCH itab FOR sets SY-TABIX to the index of the table row, in which the search string was found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-INDEX:&lt;/P&gt;&lt;P&gt;SY-INDEX contains the number of loop passes in DO and WHILE loops, including the current loop pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Roja Velagapudi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 09:42:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546198#M579262</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T09:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546199#M579263</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 you are using a internal table within loop, then sy-tabix wil return the current record number of the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-index wil return the current loop index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Niyaz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 09:43:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546199#M579263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T09:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546200#M579264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;SY-TABIX - Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SEARCH &amp;lt;itab&amp;gt; FOR sets SY-TABIX to the index of the table line in which the search string is found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY_INDEX - In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it was useful.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 09:47:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546200#M579264</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T09:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546201#M579265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;SY-INDEX&lt;/P&gt;&lt;P&gt;In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TABIX&lt;/P&gt;&lt;P&gt;Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table. &lt;/P&gt;&lt;P&gt;-COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.&lt;/P&gt;&lt;P&gt;-LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE. &lt;/P&gt;&lt;P&gt;-READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry. &lt;/P&gt;&lt;P&gt;-SEARCH &amp;lt;itab&amp;gt; FOR sets SY-TABIX to the index of the table line in which the search string is found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-TABIX means Table Index. This signifies the number of table index. Each row of a table has certain index or counter. The value of sy-tabix for the last entry would be equivalent to number of table entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-INDEX means the number of Iterations for a loop. bascially DO - ENDO .&lt;/P&gt;&lt;P&gt;SY-INDEX is not equal to SY-TABIX. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report tabix_index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 100 times.&lt;/P&gt;&lt;P&gt;wa_tab-index = sy-index.&lt;/P&gt;&lt;P&gt;append wa_tab to itab.&lt;/P&gt;&lt;P&gt;clear wa_tab.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa_tab.&lt;/P&gt;&lt;P&gt;write:/1 sy-tabix.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 09:52:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546201#M579265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T09:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546202#M579266</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;SY-TABIX means Table Index. This signifies the number of table index. Each row of a table has certain index or counter. The value of sy-tabix for the last entry would be equivalent to number of table entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-INDEX means the number of Iterations for a loop. bascially DO - ENDO .&lt;/P&gt;&lt;P&gt;SY-INDEX is not equal to SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the belwo program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report tabix_index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 100 times.&lt;/P&gt;&lt;P&gt;wa_tab-index = sy-index.&lt;/P&gt;&lt;P&gt;append wa_tab to itab.&lt;/P&gt;&lt;P&gt;clear wa_tab.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab into wa_tab.&lt;/P&gt;&lt;P&gt;write:/1 sy-tabix.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2007 09:53:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2546202#M579266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-18T09:53:33Z</dc:date>
    </item>
  </channel>
</rss>

