<?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: group the data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/group-the-data/m-p/1527702#M241467</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the below complete spec because they seem to be incomplete and out of sync..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION- CRITERIA:&lt;/P&gt;&lt;P&gt;PLANT &lt;/P&gt;&lt;P&gt;DATE &lt;/P&gt;&lt;P&gt;TIME&lt;/P&gt;&lt;P&gt;==&amp;gt;&lt;/P&gt;&lt;P&gt;select-option: plant for mseg-werks,&lt;/P&gt;&lt;P&gt;               date for mkpf-budat.&lt;/P&gt;&lt;P&gt;            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM START:&lt;/P&gt;&lt;P&gt;IF PLANT = 1204 THEN REFER LAYOUT 1 AS AN OUTPUT AND&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;MSEG-MATNR ( MATERIAL)&lt;/P&gt;&lt;P&gt;MSEG-MENGE ( QUNTITY)&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;MKPF-BUDAT = SELECTION CRITERIA&lt;/P&gt;&lt;P&gt;MSEG-WERKS = THE SELECTION CRITERIA&lt;/P&gt;&lt;P&gt;MSEG-BWART = &amp;#145;101&amp;#146;&lt;/P&gt;&lt;P&gt;MSEG-AUFNR &amp;gt;0&lt;/P&gt;&lt;P&gt;MSEG-LGORT(SLOC) = 1204&amp;amp;7610&amp;amp;7620&amp;amp;7630.&lt;/P&gt;&lt;P&gt;TABLES MKPF AND MSEG CAN BE LINKED VAI THE KEY FIELD MBLNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==&amp;gt;&lt;/P&gt;&lt;P&gt;select mseg-lgort mseg-matnr mseg-menge mseg-aufnr &lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;from mkpf inner join mseg on mkpf-mblnr = mseg-mblnr&lt;/P&gt;&lt;P&gt;where mkpf-budat in date and mseg-werks in plant and mseg-bwart = '101' and mseg-aufnr &amp;gt; 0 and mseg-lgort in ('1204','7610','7620','7630').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Group the data SLOC 1204, 7610, 7620, 7630, 7640. as per the layout.&lt;/P&gt;&lt;P&gt;==&amp;gt;Not sure what do you mean by that by in the itab you can use the AT NEW and AT END OF events to group it by storage location as it is our first field in the internal table. Please remember to sort it before the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Group the data in each individual SLOC where CAUFV-AUART =&lt;/P&gt;&lt;P&gt;ZP20 FOR DOOR&lt;/P&gt;&lt;P&gt;ZP24 FOR REAR&lt;/P&gt;&lt;P&gt;ZP26&amp;amp;ZP27 FOR WIND&lt;/P&gt;&lt;P&gt;ZP25 FOR TUFF ASSEMBLINES&lt;/P&gt;&lt;P&gt;ZP28 FOR LAM ASSEMBLINES&lt;/P&gt;&lt;P&gt;WHERE CAUFV-AUFNR = MSEG-AUFNR&lt;/P&gt;&lt;P&gt;==&amp;gt;&lt;/P&gt;&lt;P&gt;select mseg-lgort caufv-auart &lt;/P&gt;&lt;P&gt;into itab1&lt;/P&gt;&lt;P&gt;from mseg inner join caufv on mseg-aufnr = caufv-aufnr&lt;/P&gt;&lt;P&gt;where mseg-lgort = itab-lgort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can check on the above as well as the below on auart field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF CAUFV-AUART = ZR00. GROUP THOSE VALUES WHERE MARC-DISGR =&lt;/P&gt;&lt;P&gt;ZP20 FOR DOOR REWORK&lt;/P&gt;&lt;P&gt;ZP24 FOR REAR REWORK&lt;/P&gt;&lt;P&gt;ZP26 &amp;amp;ZP27 REWORKS&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:55:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-24T11:55:54Z</dc:date>
    <item>
      <title>group the data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/group-the-data/m-p/1527701#M241466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECTION- CRITERIA:&lt;/P&gt;&lt;P&gt;PLANT &lt;/P&gt;&lt;P&gt;DATE &lt;/P&gt;&lt;P&gt;TIME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM START:&lt;/P&gt;&lt;P&gt;IF PLANT = 1204 THEN REFER LAYOUT 1 AS AN OUTPUT AND&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;MSEG-MATNR ( MATERIAL)&lt;/P&gt;&lt;P&gt;MSEG-MENGE ( QUNTITY)&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;MKPF-BUDAT = SELECTION CRITERIA&lt;/P&gt;&lt;P&gt;MSEG-WERKS = THE SELECTION CRITERIA&lt;/P&gt;&lt;P&gt;MSEG-BWART = &amp;#145;101&amp;#146;&lt;/P&gt;&lt;P&gt;MSEG-AUFNR &amp;gt;0&lt;/P&gt;&lt;P&gt;MSEG-LGORT(SLOC) = 1204&amp;amp;7610&amp;amp;7620&amp;amp;7630.&lt;/P&gt;&lt;P&gt;TABLES MKPF AND MSEG CAN BE LINKED VAI THE KEY FIELD MBLNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Group the data SLOC 1204, 7610, 7620, 7630, 7640. as per the layout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Group the data in each individual SLOC where CAUFV-AUART =&lt;/P&gt;&lt;P&gt;ZP20 FOR DOOR&lt;/P&gt;&lt;P&gt;ZP24 FOR REAR&lt;/P&gt;&lt;P&gt;ZP26&amp;amp;ZP27 FOR WIND&lt;/P&gt;&lt;P&gt;ZP25 FOR TUFF ASSEMBLINES&lt;/P&gt;&lt;P&gt;ZP28 FOR LAM ASSEMBLINES&lt;/P&gt;&lt;P&gt;WHERE CAUFV-AUFNR = MSEG-AUFNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF CAUFV-AUART = ZR00. GROUP THOSE VALUES WHERE MARC-DISGR =&lt;/P&gt;&lt;P&gt;ZP20 FOR DOOR REWORK&lt;/P&gt;&lt;P&gt;ZP24 FOR REAR REWORK&lt;/P&gt;&lt;P&gt;ZP26 &amp;amp;ZP27  REWORKS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the requirement how can i group the data can anybody suggest me and how can i write the code for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2006 09:34:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/group-the-data/m-p/1527701#M241466</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T09:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: group the data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/group-the-data/m-p/1527702#M241467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the below complete spec because they seem to be incomplete and out of sync..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION- CRITERIA:&lt;/P&gt;&lt;P&gt;PLANT &lt;/P&gt;&lt;P&gt;DATE &lt;/P&gt;&lt;P&gt;TIME&lt;/P&gt;&lt;P&gt;==&amp;gt;&lt;/P&gt;&lt;P&gt;select-option: plant for mseg-werks,&lt;/P&gt;&lt;P&gt;               date for mkpf-budat.&lt;/P&gt;&lt;P&gt;            &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM START:&lt;/P&gt;&lt;P&gt;IF PLANT = 1204 THEN REFER LAYOUT 1 AS AN OUTPUT AND&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;MSEG-MATNR ( MATERIAL)&lt;/P&gt;&lt;P&gt;MSEG-MENGE ( QUNTITY)&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;MKPF-BUDAT = SELECTION CRITERIA&lt;/P&gt;&lt;P&gt;MSEG-WERKS = THE SELECTION CRITERIA&lt;/P&gt;&lt;P&gt;MSEG-BWART = &amp;#145;101&amp;#146;&lt;/P&gt;&lt;P&gt;MSEG-AUFNR &amp;gt;0&lt;/P&gt;&lt;P&gt;MSEG-LGORT(SLOC) = 1204&amp;amp;7610&amp;amp;7620&amp;amp;7630.&lt;/P&gt;&lt;P&gt;TABLES MKPF AND MSEG CAN BE LINKED VAI THE KEY FIELD MBLNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==&amp;gt;&lt;/P&gt;&lt;P&gt;select mseg-lgort mseg-matnr mseg-menge mseg-aufnr &lt;/P&gt;&lt;P&gt;into table itab&lt;/P&gt;&lt;P&gt;from mkpf inner join mseg on mkpf-mblnr = mseg-mblnr&lt;/P&gt;&lt;P&gt;where mkpf-budat in date and mseg-werks in plant and mseg-bwart = '101' and mseg-aufnr &amp;gt; 0 and mseg-lgort in ('1204','7610','7620','7630').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Group the data SLOC 1204, 7610, 7620, 7630, 7640. as per the layout.&lt;/P&gt;&lt;P&gt;==&amp;gt;Not sure what do you mean by that by in the itab you can use the AT NEW and AT END OF events to group it by storage location as it is our first field in the internal table. Please remember to sort it before the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Group the data in each individual SLOC where CAUFV-AUART =&lt;/P&gt;&lt;P&gt;ZP20 FOR DOOR&lt;/P&gt;&lt;P&gt;ZP24 FOR REAR&lt;/P&gt;&lt;P&gt;ZP26&amp;amp;ZP27 FOR WIND&lt;/P&gt;&lt;P&gt;ZP25 FOR TUFF ASSEMBLINES&lt;/P&gt;&lt;P&gt;ZP28 FOR LAM ASSEMBLINES&lt;/P&gt;&lt;P&gt;WHERE CAUFV-AUFNR = MSEG-AUFNR&lt;/P&gt;&lt;P&gt;==&amp;gt;&lt;/P&gt;&lt;P&gt;select mseg-lgort caufv-auart &lt;/P&gt;&lt;P&gt;into itab1&lt;/P&gt;&lt;P&gt;from mseg inner join caufv on mseg-aufnr = caufv-aufnr&lt;/P&gt;&lt;P&gt;where mseg-lgort = itab-lgort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can check on the above as well as the below on auart field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF CAUFV-AUART = ZR00. GROUP THOSE VALUES WHERE MARC-DISGR =&lt;/P&gt;&lt;P&gt;ZP20 FOR DOOR REWORK&lt;/P&gt;&lt;P&gt;ZP24 FOR REAR REWORK&lt;/P&gt;&lt;P&gt;ZP26 &amp;amp;ZP27 REWORKS&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:55:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/group-the-data/m-p/1527702#M241467</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-24T11:55:54Z</dc:date>
    </item>
  </channel>
</rss>

