<?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: SAP Query Big Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-big-problem/m-p/5846692#M1318967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had to use table EKBE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jun 2009 08:49:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-29T08:49:57Z</dc:date>
    <item>
      <title>SAP Query Big Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-big-problem/m-p/5846690#M1318965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a very tough one &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a Query using SAP Query .. This query is for displaying the PO quantity from table : EKPO and the delivered quantity from table : EKBE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have created a "Local Field"  to calcualate the Still to be delivered quantity Local Field = PO quantity - Delivered Quantity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is if the item has been recived more than one time with different quantities  .. for example :&lt;/P&gt;&lt;P&gt;PO quant = 12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Delivered Quantity = 3        Local Field = 12 - 3&lt;/P&gt;&lt;P&gt;2. Delivered Quantity = 4        Local Field = 12 - 4&lt;/P&gt;&lt;P&gt;3. Delivered Quantity = 5        Local Field = 12 - 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see the local field is 9 in the first delivery and 8 in the second and 7 in the third , It should be 9 in the first and 5 in the second and 0 in the third .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i run the report then try to sum the quantites you can imagine that the total sum of local field will be = 24 although the PO quantity is just 12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : If you could help me to know how to write a SELECT statement in the sap query or manipulating the Local Field using ABAP&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Please Advice and don't till me to use ABAP program from scratch &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Rgards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 14:10:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-big-problem/m-p/5846690#M1318965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-18T14:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Big Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-big-problem/m-p/5846691#M1318966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So why not create another local field for storing the current quantity, instead of using 12 all the time? For example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_quant_po = PO quantity (= 12 in your case).&lt;/P&gt;&lt;P&gt;First time:&lt;/P&gt;&lt;P&gt;lv_local_field = lv_quant_po - 3.&lt;/P&gt;&lt;P&gt;lv_quant = lv_local_field (=9).&lt;/P&gt;&lt;P&gt;Next.&lt;/P&gt;&lt;P&gt;lv_local_field = lv_quant_po - 4. (=5).&lt;/P&gt;&lt;P&gt;Last time.&lt;/P&gt;&lt;P&gt;lv_local_field = lv_quant_po - 5 (=0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a suggestion, since I don't really know your exact coding, situation etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2009 14:55:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-big-problem/m-p/5846691#M1318966</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-06-18T14:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Big Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-big-problem/m-p/5846692#M1318967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had to use table EKBE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 08:49:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-big-problem/m-p/5846692#M1318967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T08:49:57Z</dc:date>
    </item>
  </channel>
</rss>

