<?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: Select - SUM - inner join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000089#M1344083</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check your where clause values whether it matches the table values.. i thin something may be  wrong  with the values in where clause&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Jul 2009 06:05:33 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2009-07-31T06:05:33Z</dc:date>
    <item>
      <title>Select - SUM - inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000088#M1344082</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;    select sum( a~dmbtr )&lt;/P&gt;&lt;P&gt;          into o_debit&lt;/P&gt;&lt;P&gt;          from bsik as A inner join FAGLFLEXA as B&lt;/P&gt;&lt;P&gt;            on a&lt;SUB&gt;bukrs = b&lt;/SUB&gt;RBUKRS&lt;/P&gt;&lt;P&gt;           and a&lt;SUB&gt;gjahr = b&lt;/SUB&gt;RYEAR&lt;/P&gt;&lt;P&gt;           and a&lt;SUB&gt;belnr = b&lt;/SUB&gt;docnr&lt;/P&gt;&lt;P&gt;         where a~bukrs = x_bukrs&lt;/P&gt;&lt;P&gt;           and a~lifnr = p_lifnr&lt;/P&gt;&lt;P&gt;           and a~shkzg = 'S'&lt;/P&gt;&lt;P&gt;           and a~budat in s_budat&lt;/P&gt;&lt;P&gt;           and a~hkont gt '0000000000'&lt;/P&gt;&lt;P&gt;           and a~hkont le '9999999999'&lt;/P&gt;&lt;P&gt;           and b~prctr = p_prctr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above query is not giving result in o_debit though data is available in both the table. Please guide me, if I have written something wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2009 05:56:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000088#M1344082</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-31T05:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Select - SUM - inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000089#M1344083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check your where clause values whether it matches the table values.. i thin something may be  wrong  with the values in where clause&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2009 06:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000089#M1344083</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-07-31T06:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Select - SUM - inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000090#M1344084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where caluse values are correct. My problem is with Select Statement. Without inner join it is providing me the value. Can I use SUM() functionality with inner join.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2009 06:07:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000090#M1344084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-31T06:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Select - SUM - inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000091#M1344085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please help...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Aug 2009 05:31:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000091#M1344085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-01T05:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Select - SUM - inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000092#M1344086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Raj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test the following Sample It is working fine for me hope will work for you too, I did some little change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty_test,
  dmbtr LIKE bsik-dmbtr,
  END OF ty_test.
DATA: it_test TYPE STANDARD TABLE OF ty_test WITH HEADER LINE.

SELECT SUM( a~dmbtr ) as dmbtr
INTO CORRESPONDING FIELDS OF TABLE it_test
FROM bsik AS a INNER JOIN faglflexa AS b ON ( a~bukrs = b~rbukrs AND a~gjahr = b~ryear AND a~belnr = b~docnr )
WHERE a~bukrs = x_bukrs
AND a~lifnr = p_lifnr
AND a~shkzg = 'S'
AND a~budat IN s_budat
AND a~hkont GT '0000000000'
AND a~hkont LE '9999999999'
AND b~prctr = p_prctr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply if still any Issue,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Aug 2009 05:38:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000092#M1344086</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-08-01T05:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select - SUM - inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000093#M1344087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;zero value in it_test.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Aug 2009 06:25:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000093#M1344087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-01T06:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Select - SUM - inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000094#M1344088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Raj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Remove the &lt;STRONG&gt;Where Conditions&lt;/STRONG&gt; and try again i think data is not available according to your conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only use the following line of Code with out where conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty_test,
  dmbtr LIKE bsik-dmbtr,
  END OF ty_test.
DATA: it_test TYPE STANDARD TABLE OF ty_test WITH HEADER LINE.
 
SELECT SUM( a~dmbtr ) as dmbtr
INTO CORRESPONDING FIELDS OF TABLE it_test
FROM bsik AS a INNER JOIN faglflexa AS b ON ( a~bukrs = b~rbukrs AND a~gjahr = b~ryear AND a~belnr = b~docnr ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply Back if any problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Aug 2009 06:54:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000094#M1344088</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-08-01T06:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Select - SUM - inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000095#M1344089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Faisel, The query is working perfectly. Thanks for helping me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Aug 2009 06:54:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-sum-inner-join/m-p/6000095#M1344089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-01T06:54:44Z</dc:date>
    </item>
  </channel>
</rss>

