<?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: another problem about select..sum.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604742#M1085239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bill,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There might be the case the value of debit and credit are same so it is showing the same output. You can try the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT aufnr SUM( wrbtr ) AS jfje FROM bsis&lt;/P&gt;&lt;P&gt; into CORRESPONDING FIELDS OF TABLE it_syye&lt;/P&gt;&lt;P&gt; WHERE bukrs = '1500'&lt;/P&gt;&lt;P&gt; AND   aufnr = it_num-aufnr&lt;/P&gt;&lt;P&gt; AND   budat &amp;gt;= '20040131'&lt;/P&gt;&lt;P&gt; AND   budat &amp;lt;= q_date2&lt;/P&gt;&lt;P&gt; AND   hkont = '0041010013'&lt;/P&gt;&lt;P&gt; AND   ( shkzg = 'S' or shkzg = 'H' )&lt;/P&gt;&lt;P&gt; GROUP by aufnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the result now generated is different then that solves your query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Surinder&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Oct 2008 07:17:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-09T07:17:55Z</dc:date>
    <item>
      <title>another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604733#M1085230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;I'm back, and there is another select ..sum problem.&lt;/P&gt;&lt;P&gt;the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT aufnr SUM( wrbtr ) AS jfje FROM bsis
 into CORRESPONDING FIELDS OF TABLE it_syye
 WHERE bukrs = '1500'
 AND   aufnr = it_num-aufnr
 AND   budat &amp;gt;= '20040131'
 AND   budat &amp;lt;= q_date2
 AND   hkont = '0041010013'
 AND   shkzg = 'S'
 GROUP by aufnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT aufnr SUM( wrbtr ) AS dfje FROM bsis
 into  CORRESPONDING FIELDS OF TABLE it_syye1
 WHERE bukrs = '1500'
 AND   aufnr = it_num-aufnr
 AND   budat &amp;gt;= '20040131'
 AND   budat &amp;lt;= q_date2
 AND   hkont = '0041010013'
 AND   shkzg = 'H'
 GROUP by aufnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to select the credit amount and debit amount from the table BSIS,but using the select sum , it looks like the field SHKZG doesn't work.&lt;/P&gt;&lt;P&gt;It select all the amount no matter what the SHKZG is 'S' or 'H'.&lt;/P&gt;&lt;P&gt;Could anyone explain that ,and give a good solution?&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 06:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604733#M1085230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-09T06:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604734#M1085231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;strange... as a workaround can you try to replace SHKZG with BSCHL (posting key)&lt;/P&gt;&lt;P&gt;shkzg = 'S' ==&amp;gt; bschl = '40'&lt;/P&gt;&lt;P&gt;shkzg = 'H' ==&amp;gt; bschl = '50'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 06:26:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604734#M1085231</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-10-09T06:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604735#M1085232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bill,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You wanna say that u give any of the 3 condition i.e.&lt;/P&gt;&lt;P&gt;    SHKZG = 'H'.&lt;/P&gt;&lt;P&gt;    SHKZG = 'S'.&lt;/P&gt;&lt;P&gt;    SHKZG = ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its gives the same result???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Surinder&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 06:32:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604735#M1085232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-09T06:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604736#M1085233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;2 conditions&lt;/P&gt;&lt;P&gt;shkzg = 'S' &lt;/P&gt;&lt;P&gt;shkzg = 'H'&lt;/P&gt;&lt;P&gt;the result is same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 06:44:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604736#M1085233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-09T06:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604737#M1085234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, eric&lt;/P&gt;&lt;P&gt;I use the BSCHL instead of SHKZG ,but the result is same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 06:45:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604737#M1085234</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-09T06:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604738#M1085235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the third case and check the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And tell the output for all three cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Surinder&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 06:46:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604738#M1085235</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-09T06:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604739#M1085236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Try the third case and check the result.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; And tell the output for all three cases.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; Regards,&lt;/P&gt;&lt;P&gt;&amp;gt; Surinder&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this does not make any sense... shkzg is either S or H, but can NEVER be empty...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 06:49:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604739#M1085236</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-10-09T06:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604740#M1085237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is what i wanted to know that for condition SHKZG = ' ' is it given the sum as zero or sumthing else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Surinder&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 07:05:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604740#M1085237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-09T07:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604741#M1085238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK.&lt;/P&gt;&lt;P&gt;the result is: SHKZG&lt;/P&gt;&lt;P&gt;condition 'S' and 'H' is same.&lt;/P&gt;&lt;P&gt;condition '  ' is null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 07:10:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604741#M1085238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-09T07:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604742#M1085239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bill,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There might be the case the value of debit and credit are same so it is showing the same output. You can try the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT aufnr SUM( wrbtr ) AS jfje FROM bsis&lt;/P&gt;&lt;P&gt; into CORRESPONDING FIELDS OF TABLE it_syye&lt;/P&gt;&lt;P&gt; WHERE bukrs = '1500'&lt;/P&gt;&lt;P&gt; AND   aufnr = it_num-aufnr&lt;/P&gt;&lt;P&gt; AND   budat &amp;gt;= '20040131'&lt;/P&gt;&lt;P&gt; AND   budat &amp;lt;= q_date2&lt;/P&gt;&lt;P&gt; AND   hkont = '0041010013'&lt;/P&gt;&lt;P&gt; AND   ( shkzg = 'S' or shkzg = 'H' )&lt;/P&gt;&lt;P&gt; GROUP by aufnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the result now generated is different then that solves your query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Surinder&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Oct 2008 07:17:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604742#M1085239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-09T07:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604743#M1085240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bill Gu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you cannot use " INTO CORRESPODING FIELDS" with SELECT SUM ( )  statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunny.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 01:13:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604743#M1085240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T01:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: another problem about select..sum..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604744#M1085241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bill,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The answer is very simple... both amounts must be the same alway, if you get any difference you have to check.  That's a financial concept, Debit less Credit must be zero. Remember that table BSIS have G/L open items, if you check any document on BSIS all of them have the same amount in credit and debit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope is helps. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimas B. Salazar P.&lt;/P&gt;&lt;P&gt;ABAP Consultant&lt;/P&gt;&lt;P&gt;Caracas - Venezuela&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 01:58:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/another-problem-about-select-sum/m-p/4604744#M1085241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-21T01:58:23Z</dc:date>
    </item>
  </channel>
</rss>

