<?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 Conversion and aggregate datas from large table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-and-aggregate-datas-from-large-table/m-p/1601743#M270160</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 to make a report reading aggregate datas from MSEG linked as an &lt;/P&gt;&lt;P&gt;inner join with MBEW. Some fields have to be convert with conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a first time, I thought select datas from mseg and create an internal &lt;/P&gt;&lt;P&gt;table with basic operations and conversions.Then, I thought aggregate datas&lt;/P&gt;&lt;P&gt;on another internal table target. &lt;/P&gt;&lt;P&gt;But MSEG is a very large table, for example selecting year&amp;#146;s 2006 there&lt;/P&gt;&lt;P&gt;is more than 6 millions of rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your opinion, what is the best statement to minimise the number of datas&lt;/P&gt;&lt;P&gt;transfers ? (An example of code will be very appreciated).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selection__________________________Operation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material______________mseg-matnr___Group by&lt;/P&gt;&lt;P&gt;Plant_________________mseg-werks___Group by&lt;/P&gt;&lt;P&gt;Storage location______mseg-lgort___Group by&lt;/P&gt;&lt;P&gt;Special stock_________mseg-sobkz___Group by&lt;/P&gt;&lt;P&gt;Code valuation________mseg-kzbws___Group by&lt;/P&gt;&lt;P&gt;Supplier______________mseg-emlif___Group by&lt;/P&gt;&lt;P&gt;Order Number__________mseg-aufnr___If bwart = '101'  =&amp;gt; Type Order = 'S'&lt;/P&gt;&lt;P&gt;Movement type_________mseg-bwart___Group by&lt;/P&gt;&lt;P&gt;Posting date__________mkpf-budat___Group by month and year&lt;/P&gt;&lt;P&gt;Debit/credit__________mseg-shkzg&lt;/P&gt;&lt;P&gt;Quantity______________mseg-menge___If shkzg ='H' =&amp;gt; Sum( -1 * menge ) Else  Sum( menge )&lt;/P&gt;&lt;P&gt;Standard price________mbew-vmstp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Oct 2006 08:34:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-10T08:34:05Z</dc:date>
    <item>
      <title>Conversion and aggregate datas from large table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-and-aggregate-datas-from-large-table/m-p/1601743#M270160</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 to make a report reading aggregate datas from MSEG linked as an &lt;/P&gt;&lt;P&gt;inner join with MBEW. Some fields have to be convert with conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a first time, I thought select datas from mseg and create an internal &lt;/P&gt;&lt;P&gt;table with basic operations and conversions.Then, I thought aggregate datas&lt;/P&gt;&lt;P&gt;on another internal table target. &lt;/P&gt;&lt;P&gt;But MSEG is a very large table, for example selecting year&amp;#146;s 2006 there&lt;/P&gt;&lt;P&gt;is more than 6 millions of rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your opinion, what is the best statement to minimise the number of datas&lt;/P&gt;&lt;P&gt;transfers ? (An example of code will be very appreciated).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selection__________________________Operation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material______________mseg-matnr___Group by&lt;/P&gt;&lt;P&gt;Plant_________________mseg-werks___Group by&lt;/P&gt;&lt;P&gt;Storage location______mseg-lgort___Group by&lt;/P&gt;&lt;P&gt;Special stock_________mseg-sobkz___Group by&lt;/P&gt;&lt;P&gt;Code valuation________mseg-kzbws___Group by&lt;/P&gt;&lt;P&gt;Supplier______________mseg-emlif___Group by&lt;/P&gt;&lt;P&gt;Order Number__________mseg-aufnr___If bwart = '101'  =&amp;gt; Type Order = 'S'&lt;/P&gt;&lt;P&gt;Movement type_________mseg-bwart___Group by&lt;/P&gt;&lt;P&gt;Posting date__________mkpf-budat___Group by month and year&lt;/P&gt;&lt;P&gt;Debit/credit__________mseg-shkzg&lt;/P&gt;&lt;P&gt;Quantity______________mseg-menge___If shkzg ='H' =&amp;gt; Sum( -1 * menge ) Else  Sum( menge )&lt;/P&gt;&lt;P&gt;Standard price________mbew-vmstp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2006 08:34:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-and-aggregate-datas-from-large-table/m-p/1601743#M270160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-10T08:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion and aggregate datas from large table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-and-aggregate-datas-from-large-table/m-p/1601744#M270161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what do you think about using a cursor in this case ?&lt;/P&gt;&lt;P&gt;good or bad idea ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2006 12:14:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-and-aggregate-datas-from-large-table/m-p/1601744#M270161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-10T12:14:08Z</dc:date>
    </item>
  </channel>
</rss>

