<?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: Regarding collect in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872026#M1323435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you should set do_sum = 'X' in your fieldcatalog, for each field you want do sum.&lt;/P&gt;&lt;P&gt;Then you have to sort by matnr and set SUBTOT = 'X' for this field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frisoni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jul 2009 01:31:57 GMT</pubDate>
    <dc:creator>guilherme_frisoni</dc:creator>
    <dc:date>2009-07-29T01:31:57Z</dc:date>
    <item>
      <title>Regarding collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872023#M1323432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;selection screen has 2 options&lt;/P&gt;&lt;P&gt;detail&lt;/P&gt;&lt;P&gt;summary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;already one internal table is getting the detailed values.&lt;/P&gt;&lt;P&gt;now i have write code for summary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when summary is clicked&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the output shoul be sorted by matnr and all  the similar&lt;/P&gt;&lt;P&gt;matnr should be consolidated .ie all the qunatity &lt;/P&gt;&lt;P&gt;and price values should be totalled for similar matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please let me knwo ur suggestions for logic of this&lt;/P&gt;&lt;P&gt;FORM SUMMARY_REPORT .&lt;/P&gt;&lt;P&gt;sort tbl_output by matnr.&lt;/P&gt;&lt;P&gt;loop at tbl_output.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING tbl_output TO tbl_output1.&lt;/P&gt;&lt;P&gt;append tbl_output1.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort tbl_output1 by matnr.&lt;/P&gt;&lt;P&gt;loop at tbl_output1.&lt;/P&gt;&lt;P&gt;at end of matnr.&lt;/P&gt;&lt;P&gt;sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 00:46:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872023#M1323432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-29T00:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872024#M1323433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Revanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this way:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
" sort tbl_output by matnr. -&amp;gt; you dont need, unsell you want for output
LOOP AT tbl_output.
  tbl_output1-matnr =  tbl_output-matnr.
  tbl_output1-value_field =  tbl_output-value_field.
  " next velues fileds
  collect tbl_output1.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Collect will sum all value fields comparing all non-numeric fields.&lt;/P&gt;&lt;P&gt;So, using move-corresponding won't work, unless you have just matnr field as non-numerica.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Frisoni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 00:55:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872024#M1323433</guid>
      <dc:creator>guilherme_frisoni</dc:creator>
      <dc:date>2009-07-29T00:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872025#M1323434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi thanks for your info but i want to do it with alv functions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can use do_sum = x for the fields to be consolidated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but what option should i use for consolidating based on matnr??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie at similar matnr the consolidation should take place in alv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 01:13:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872025#M1323434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-29T01:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872026#M1323435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you should set do_sum = 'X' in your fieldcatalog, for each field you want do sum.&lt;/P&gt;&lt;P&gt;Then you have to sort by matnr and set SUBTOT = 'X' for this field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frisoni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 01:31:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872026#M1323435</guid>
      <dc:creator>guilherme_frisoni</dc:creator>
      <dc:date>2009-07-29T01:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872027#M1323436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i have put teh do_sum = x&lt;/P&gt;&lt;P&gt;but where should i sort matnr and put subtot = x??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM write_fieldcat1 USING 'WERKS' 'TBL_OUTPUT' 'AUFK' 'X' 1 ' ' ' '.&lt;/P&gt;&lt;P&gt;  PERFORM write_fieldcat1 USING 'AUFNR' 'TBL_OUTPUT' 'AUFK' ' ' 2 ' ' ' '.&lt;/P&gt;&lt;P&gt;  PERFORM write_fieldcat1 USING 'MATNR' 'TBL_OUTPUT' 'AFPO' ' ' 3 ' ' ' '.&lt;/P&gt;&lt;P&gt;  if p_sum = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM write_fieldcat1 USING 'WKG010' 'TBL_OUTPUT' ' ' ' ' 4 'PV Alum' 'X'.&lt;/P&gt;&lt;P&gt;    PERFORM write_fieldcat1 USING 'WKG0102' 'TBL_OUTPUT' ' ' ' ' 5 'PV Cemt' 'X'.&lt;/P&gt;&lt;P&gt;    PERFORM write_fieldcat1 USING 'WKG0103' 'TBL_OUTPUT' ' ' ' ' 6 'PV Ceno' 'X'.&lt;/P&gt;&lt;P&gt;    PERFORM write_fieldcat1 USING 'WKG0104' 'TBL_OUTPUT' ' ' ' ' 7 'PV Pulp' 'X'.&lt;/P&gt;&lt;P&gt;    PERFORM write_fieldcat1 USING 'WKG0105' 'TBL_OUTPUT' ' ' ' ' 8 'PV Silica' 'X'.&lt;/P&gt;&lt;P&gt;    PERFORM write_fieldcat1 USING 'WKG0106' 'TBL_OUTPUT' ' ' ' ' 9 'PV MACDO' 'X'.&lt;/P&gt;&lt;P&gt;    PERFORM write_fieldcat1 USING 'WKG0107' 'TBL_OUTPUT' ' ' ' ' 10 'PV NonFM' 'X'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM WRITE_FIELDCAT1  USING    name tab st key pos desc sum.&lt;/P&gt;&lt;P&gt;  st_fieldcat-fieldname = name.&lt;/P&gt;&lt;P&gt;  st_fieldcat-tabname = tab.&lt;/P&gt;&lt;P&gt;  st_fieldcat-ref_tabname = st.&lt;/P&gt;&lt;P&gt;  st_fieldcat-key = key.&lt;/P&gt;&lt;P&gt;  st_fieldcat-col_pos = pos.&lt;/P&gt;&lt;P&gt;  st_fieldcat-seltext_m = desc.&lt;/P&gt;&lt;P&gt;  st_fieldcat-do_sum = sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND st_fieldcat TO tbl_fieldcat.&lt;/P&gt;&lt;P&gt;  CLEAR st_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " WRITE_FIELDCAT1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 01:45:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872027#M1323436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-29T01:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872028#M1323437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to set your SORT order in SORT table for ALV.&lt;/P&gt;&lt;P&gt;Take a look here: &lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frisoni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2009 01:58:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-collect/m-p/5872028#M1323437</guid>
      <dc:creator>guilherme_frisoni</dc:creator>
      <dc:date>2009-07-29T01:58:20Z</dc:date>
    </item>
  </channel>
</rss>

