<?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 SQL QUERY FOR COUNT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370106#M525045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to know the no of records in a table in sap..&lt;/P&gt;&lt;P&gt;can anybody help on this how to get the count of the records.?&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;kp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jun 2007 23:40:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-05T23:40:59Z</dc:date>
    <item>
      <title>SQL QUERY FOR COUNT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370106#M525045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to know the no of records in a table in sap..&lt;/P&gt;&lt;P&gt;can anybody help on this how to get the count of the records.?&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;kp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 23:40:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370106#M525045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-05T23:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: SQL QUERY FOR COUNT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370107#M525046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;describe table int_table lines v_lines. " if it is internl table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table : goto se16 -&amp;gt;enter table -&amp;gt; enter-&amp;gt;click on number of entries&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 23:46:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370107#M525046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-05T23:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: SQL QUERY FOR COUNT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370108#M525047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am writing a report. in that i need to get the no of records( count) as output.&lt;/P&gt;&lt;P&gt;that table i am using is database table. and i need to store that no of record value into a variable(count).&lt;/P&gt;&lt;P&gt;Pls provide me the query syntax&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;KP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 00:26:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370108#M525047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T00:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: SQL QUERY FOR COUNT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370109#M525048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use describe after select query .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : v_lines type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;describe table itab lines v_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here itab is the internal table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 00:29:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370109#M525048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T00:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: SQL QUERY FOR COUNT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370110#M525049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi KP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can fetch the data of the database table into an internal table using SELECT statement and then find the no: of entries of the internal table using DESCRIBE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from sflight into table itab.&lt;/P&gt;&lt;P&gt;describe table itab lines count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 00:32:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370110#M525049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T00:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: SQL QUERY FOR COUNT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370111#M525050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi KP,&lt;/P&gt;&lt;P&gt;You can code it this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data var type i.
select count(*) from ztable into var.
write : var.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;var&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; gives you teh number of records.&lt;/P&gt;&lt;P&gt;The advantage of this is that you don't have to bring all the records into the application server, just to count the records. The n/w traffic is hence reduced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anil Madhavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 02:52:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370111#M525050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T02:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: SQL QUERY FOR COUNT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370112#M525051</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-dbcnt contains the no. of database records fetched by a select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from dbtab into table itab where &amp;lt;cond&amp;gt;.&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  write sy-dbcnt.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful, reward&lt;/P&gt;&lt;P&gt;Sathish. R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 03:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-for-count/m-p/2370112#M525051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T03:42:09Z</dc:date>
    </item>
  </channel>
</rss>

