<?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: Query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1531784#M242986</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select charg bwart menge&lt;/P&gt;&lt;P&gt;into itab&lt;/P&gt;&lt;P&gt;from mseg&lt;/P&gt;&lt;P&gt;where charg = pcharg&lt;/P&gt;&lt;P&gt;and bwart in ('101','561'....) "your complete list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab.&lt;/P&gt;&lt;P&gt;loop at itab&lt;/P&gt;&lt;P&gt;  at new charg.&lt;/P&gt;&lt;P&gt;     ltot = 0.&lt;/P&gt;&lt;P&gt;  endat.&lt;/P&gt;&lt;P&gt;  if bwart in ('101','561'...) "all positive ones&lt;/P&gt;&lt;P&gt;     ltot = ltot + itab-menge.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;     ltot = ltot - itab-menge.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  at end of charg.&lt;/P&gt;&lt;P&gt;     write : / charg, ltot.&lt;/P&gt;&lt;P&gt;  endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--please note to define ltot with 2 decimals as it is your requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Note that you can even use the Debit/Credit indicator to do the needful for add or subtract&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Aug 2006 11:43:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-24T11:43:25Z</dc:date>
    <item>
      <title>Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1531783#M242985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt; Could u help me how to write this code&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Sum up all the Quantities (MSEG-MENGE) for the batch entered on the selection screen where the movement type (MSEG-BWART) equals 101, 561, 563 and 565 and subtract the summed quantities (MSEG-MENGE) where the movement type (MSEG-BWART) equals 102, 562, 564 and 566. The quantities can be summed by selecting the quantity (MSEG-MENGE) from the table MSEG where the batch number (MSEG-CHARG) equals the batch number entered on the selection screen. Quantity will be displayed with 2 decimal places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;srinu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 11:37:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1531783#M242985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T11:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1531784#M242986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select charg bwart menge&lt;/P&gt;&lt;P&gt;into itab&lt;/P&gt;&lt;P&gt;from mseg&lt;/P&gt;&lt;P&gt;where charg = pcharg&lt;/P&gt;&lt;P&gt;and bwart in ('101','561'....) "your complete list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab.&lt;/P&gt;&lt;P&gt;loop at itab&lt;/P&gt;&lt;P&gt;  at new charg.&lt;/P&gt;&lt;P&gt;     ltot = 0.&lt;/P&gt;&lt;P&gt;  endat.&lt;/P&gt;&lt;P&gt;  if bwart in ('101','561'...) "all positive ones&lt;/P&gt;&lt;P&gt;     ltot = ltot + itab-menge.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;     ltot = ltot - itab-menge.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  at end of charg.&lt;/P&gt;&lt;P&gt;     write : / charg, ltot.&lt;/P&gt;&lt;P&gt;  endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--please note to define ltot with 2 decimals as it is your requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Note that you can even use the Debit/Credit indicator to do the needful for add or subtract&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Anurag Bankley&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 11:43:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1531784#M242986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T11:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1531785#M242987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Srinu&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   Apart from the logic provided by Anurag, you can also &lt;/P&gt;&lt;P&gt;extract SHKZG(Debit/Credit) Indicator from MSEG for &lt;/P&gt;&lt;P&gt;summing and subtracting the quantities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 12:00:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1531785#M242987</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T12:00:23Z</dc:date>
    </item>
  </channel>
</rss>

