<?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: SY fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-fields/m-p/3278115#M783876</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when I give sy-dbcnt after end loop,it displays 0.Why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Jan 2008 18:19:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-06T18:19:08Z</dc:date>
    <item>
      <title>SY fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-fields/m-p/3278113#M783874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is SY-TABIX AND SY-INDEX.&lt;/P&gt;&lt;P&gt;LOOP AT ITABLE1.&lt;/P&gt;&lt;P&gt;WRITE : / ITABLE1-MATNR,SY-INDEX,SY-TABIX.&lt;/P&gt;&lt;P&gt;ENDLOOP.      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above codes displays 0 in sy-index place and 1,2,3...last record number in sy-tabix place&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to find out total number of records in a database?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2008 17:56:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-fields/m-p/3278113#M783874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-06T17:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: SY fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-fields/m-p/3278114#M783875</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 is used to find the current line in the internal table; it&amp;#146;s a current line index, 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;&lt;/P&gt;&lt;P&gt;SY-INDEX is the number of Iterations for a loop. bascially DO - ENDO .&lt;/P&gt;&lt;P&gt;&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;some more info.............&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;&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;&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;&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;&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;&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;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;&lt;/P&gt;&lt;P&gt;SY-DBCNT gives the Nunber of records in database table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2008 18:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-fields/m-p/3278114#M783875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-06T18:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: SY fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-fields/m-p/3278115#M783876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when I give sy-dbcnt after end loop,it displays 0.Why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2008 18:19:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-fields/m-p/3278115#M783876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-06T18:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: SY fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sy-fields/m-p/3278116#M783877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gopi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-DBCNT gives the number of records in database table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After an open SQL statement, the system field sy-dbcnt contains the number of database lines processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample code.........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ychatest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : v_matnr LIKE mara-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT matnr FROM mara INTO v_matnr UP TO 1 ROWS.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;WRITE : sy-dbcnt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use it after select statement........................&lt;/P&gt;&lt;P&gt;if u r talking about the counting of number of records in the internal table then you have to use the describe statement to get the count.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2008 18:28:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sy-fields/m-p/3278116#M783877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-06T18:28:56Z</dc:date>
    </item>
  </channel>
</rss>

