<?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: COUNT(*) problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/count-problem/m-p/2057895#M424986</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry i cant get your actual query count(*) returns the how many lines are read by the select query ..for your case i think it only fetch one record so it is giing 1 to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2007 06:16:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-19T06:16:26Z</dc:date>
    <item>
      <title>COUNT(*) problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/count-problem/m-p/2057892#M424983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following select statement:&lt;/P&gt;&lt;P&gt;SELECT COUNT( * ) FROM marc&lt;/P&gt;&lt;P&gt;  JOIN mard ON marc&lt;SUB&gt;matnr = mard&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;  JOIN mara ON marc&lt;SUB&gt;matnr = mara&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;  JOIN eina ON mara&lt;SUB&gt;matnr = eina&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;  JOIN lfa1 ON eina&lt;SUB&gt;lifnr = lfa1&lt;/SUB&gt;lifnr&lt;/P&gt;&lt;P&gt;  JOIN wtaddi ON marc&lt;SUB&gt;matnr = wtaddi&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;  INTO COUNT_PROMO_ZERO&lt;/P&gt;&lt;P&gt;  WHERE marc~werks = p_plant&lt;/P&gt;&lt;P&gt;  AND mard~labst = 0&lt;/P&gt;&lt;P&gt;  AND eina~loekz &amp;lt;&amp;gt; 'X'&lt;/P&gt;&lt;P&gt;  AND lfa1~sperq NOT IN ('01','02','03')&lt;/P&gt;&lt;P&gt;  AND lfa1~sperm &amp;lt;&amp;gt; 'X'&lt;/P&gt;&lt;P&gt;  AND mara~lvorm &amp;lt;&amp;gt;'X'&lt;/P&gt;&lt;P&gt;  AND mara~mstae NOT IN ('01','02','03')&lt;/P&gt;&lt;P&gt;  AND marc~matnr = p_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COUNT_PROMO_ZERO is a type i variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that if I run this statement for a material(matnr) with field mard~labst &amp;gt; 0, the count_promo_zero is 1. Why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2007 09:12:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/count-problem/m-p/2057892#M424983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-18T09:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT(*) problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/count-problem/m-p/2057893#M424984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your join between MARC and MARD you forget fields WERKS. Your request make a mix of MARC and MARD with different WERKS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i think there is a record with a WERKS &amp;lt;&amp;gt; p_plant and labst &amp;lt;&amp;gt; 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ADD: marc&lt;SUB&gt;werks = mard&lt;/SUB&gt;werks in the JOIN MARD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Check all your JOIN, to get the whole set of key)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2007 10:02:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/count-problem/m-p/2057893#M424984</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-03-18T10:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT(*) problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/count-problem/m-p/2057894#M424985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi George,&lt;/P&gt;&lt;P&gt; As per raymond, check your keys declaration and where clause. Do u have the parameter for matnr?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 06:00:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/count-problem/m-p/2057894#M424985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T06:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT(*) problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/count-problem/m-p/2057895#M424986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry i cant get your actual query count(*) returns the how many lines are read by the select query ..for your case i think it only fetch one record so it is giing 1 to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2007 06:16:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/count-problem/m-p/2057895#M424986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-19T06:16:26Z</dc:date>
    </item>
  </channel>
</rss>

