<?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: help with this report in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-this-report/m-p/2807531#M656155</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;copy and paste ur code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Sep 2007 09:31:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-26T09:31:54Z</dc:date>
    <item>
      <title>help with this report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-this-report/m-p/2807530#M656154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi to all sdners,&lt;/P&gt;&lt;P&gt;                      please with this report&lt;/P&gt;&lt;P&gt;                1.control break report to display customer wise sales order item list including     gross and net totals.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 09:29:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-this-report/m-p/2807530#M656154</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T09:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: help with this report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-this-report/m-p/2807531#M656155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;copy and paste ur code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 09:31:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-this-report/m-p/2807531#M656155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T09:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: help with this report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-this-report/m-p/2807532#M656156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;See the sample code using Control break statements  and do accordingly using the tables KN1,VBAK and VBAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write a s single Join&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;kunnr a&lt;/SUB&gt;name1&lt;/P&gt;&lt;P&gt;          b&lt;SUB&gt;vbeln b&lt;/SUB&gt;netwr&lt;/P&gt;&lt;P&gt;          c&lt;SUB&gt;posnr c&lt;/SUB&gt;matnr c~kwmeng&lt;/P&gt;&lt;P&gt;    into table itab&lt;/P&gt;&lt;P&gt;from kna1 as a join vbak as b &lt;/P&gt;&lt;P&gt;on a&lt;SUB&gt;kunnr  =  b&lt;/SUB&gt;kunnr  join vbap as c&lt;/P&gt;&lt;P&gt;on b&lt;SUB&gt;vbeln = c&lt;/SUB&gt;vbeln &lt;/P&gt;&lt;P&gt;where a~kunnr in s_kunnr .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by kunnr.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;  at new kunnr.&lt;/P&gt;&lt;P&gt;     ....&lt;/P&gt;&lt;P&gt;  endat.&lt;/P&gt;&lt;P&gt;at end of kunnr.&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All this AT NEW, AT FIRST, AT END OF and AT LAST are called control break statements of Internal tables and are used to calculate the TOTALS based on sertain key fields in that internal table&lt;/P&gt;&lt;P&gt;FIrst to use these statements the ITAB has to be sorted by the key fields on whcih you need the SUM of the fields.&lt;/P&gt;&lt;P&gt;Some time you will get * when mopving data from this int table to other table using these commands&lt;/P&gt;&lt;P&gt;so you have to use&lt;/P&gt;&lt;P&gt;READ TABLE ITAB INDEX SY-TABIX in AT..ENDAT..if you are using other fields between them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: sflight_tab TYPE SORTED TABLE OF sflight &lt;/P&gt;&lt;P&gt;                  WITH UNIQUE KEY carrid connid fldate, &lt;/P&gt;&lt;P&gt;      sflight_wa  LIKE LINE OF sflight_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM sflight &lt;/P&gt;&lt;P&gt;       INTO TABLE sflight_tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT sflight_tab INTO sflight_wa. &lt;/P&gt;&lt;P&gt;  AT NEW connid. &lt;/P&gt;&lt;P&gt;    WRITE: / sflight_wa-carrid, &lt;/P&gt;&lt;P&gt;             sflight_wa-connid. &lt;/P&gt;&lt;P&gt;    ULINE. &lt;/P&gt;&lt;P&gt;  ENDAT. &lt;/P&gt;&lt;P&gt;  WRITE: / sflight_wa-fldate, &lt;/P&gt;&lt;P&gt;           sflight_wa-seatsocc. &lt;/P&gt;&lt;P&gt;  AT END OF connid. &lt;/P&gt;&lt;P&gt;    SUM. &lt;/P&gt;&lt;P&gt;    ULINE. &lt;/P&gt;&lt;P&gt;    WRITE: / 'Sum', &lt;/P&gt;&lt;P&gt;              sflight_wa-seatsocc UNDER sflight_wa-seatsocc. &lt;/P&gt;&lt;P&gt;    SKIP. &lt;/P&gt;&lt;P&gt;  ENDAT. &lt;/P&gt;&lt;P&gt;  AT END OF carrid. &lt;/P&gt;&lt;P&gt;    SUM. &lt;/P&gt;&lt;P&gt;    ULINE. &lt;/P&gt;&lt;P&gt;    WRITE: / 'Carrier Sum', &lt;/P&gt;&lt;P&gt;              sflight_wa-seatsocc UNDER sflight_wa-seatsocc. &lt;/P&gt;&lt;P&gt;    NEW-PAGE. &lt;/P&gt;&lt;P&gt;  ENDAT. &lt;/P&gt;&lt;P&gt;  AT LAST. &lt;/P&gt;&lt;P&gt;    SUM. &lt;/P&gt;&lt;P&gt;    WRITE: / 'Overall Sum', &lt;/P&gt;&lt;P&gt;              sflight_wa-seatsocc UNDER sflight_wa-seatsocc. &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;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 09:40:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-this-report/m-p/2807532#M656156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T09:40:22Z</dc:date>
    </item>
  </channel>
</rss>

