<?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: control break in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-break/m-p/3250920#M776222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi chaitanya,&lt;/P&gt;&lt;P&gt;                   some of the important points before going to use CONTROL BREAK statements.&lt;/P&gt;&lt;P&gt;1.we have to place these statements with in loop.&lt;/P&gt;&lt;P&gt;2.sort the data before going to loop ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT FIRST : FOR HEADINGS&lt;/P&gt;&lt;P&gt;AT NEW  : BASED ON FILED DATA IS DISPLAYED&lt;/P&gt;&lt;P&gt;AT END OF : FOR SUBTOTALS&lt;/P&gt;&lt;P&gt;AT LAST : FOR GRAND TOTALS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;syntax:&lt;/P&gt;&lt;P&gt;sort itab by &amp;lt;field1&amp;gt; &amp;lt;field2&amp;gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;at first.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at new &amp;lt;field&amp;gt;&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at end of &amp;lt;filed&amp;gt;&lt;/P&gt;&lt;P&gt;endat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at last&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;STRONG&gt;Reward points if helpful.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt; Kiran Kumar.G.A&lt;/P&gt;&lt;P&gt;        &lt;EM&gt;Have a Nice Day..&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Jan 2008 04:46:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-19T04:46:57Z</dc:date>
    <item>
      <title>control break</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-break/m-p/3250916#M776218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what are the control break statements in Reports?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 03:55:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-break/m-p/3250916#M776218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T03:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: control break</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-break/m-p/3250917#M776219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Control breaking statements&lt;/STRONG&gt; are use in within loop only except on change of statement , because on change of can be used in select and also other loops like do while, while also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This control breaking statements used for we can format the output of internal table contents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Contrlo breaking Statements are :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AT NEW / ENDAT.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AT FIRST / ENDAT.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AT LAST / ENDAT.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ON CHANGE OF / ENDON.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AT END OF / ENDAT.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SUM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see this program you can understand very easily &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using &lt;STRONG&gt;AT FIRST , AT NEW, AT THE END OF , AT LAST.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;F1 TYPE I,&lt;/P&gt;&lt;P&gt;F2(6) TYPE C,&lt;/P&gt;&lt;P&gt;F3(10) TYPE N,&lt;/P&gt;&lt;P&gt;F4(16) TYPE P DECIMALS 2,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END OF ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: SUB_TOT(10) TYPE P DECIMALS 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**--1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB-F1 = 1.&lt;/P&gt;&lt;P&gt;ITAB-F2 = 'ONE'.&lt;/P&gt;&lt;P&gt;ITAB-F3 = 10.&lt;/P&gt;&lt;P&gt;ITAB-F4 = '1000.00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND ITAB.&lt;/P&gt;&lt;P&gt;CLEAR ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB-F1 = 1.&lt;/P&gt;&lt;P&gt;ITAB-F2 = 'ONE'.&lt;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lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB_TOT = SUB_TOT + ITAB-F4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT END OF F1.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;WRITE: / 'SUB TOTAL :' COLOR 3 INVERSE ON, SUB_TOT COLOR 3 INVERSE ON.&lt;/P&gt;&lt;P&gt;CLEAR SUB_TOT.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LAST.&lt;/P&gt;&lt;P&gt;SUM.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;WRITE: 'SUM:', ITAB-F4.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 04:01:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-break/m-p/3250917#M776219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T04:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: control break</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-break/m-p/3250918#M776220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Control break statements are of 4 types:&lt;/P&gt;&lt;P&gt;AT FIRST&amp;#151;&amp;#151;&amp;gt;this is used for system field heading in ABAP program. &lt;/P&gt;&lt;P&gt;AT NEW&amp;#151;&amp;#151;&amp;#151;&amp;gt;this is used to display the fields. &lt;/P&gt;&lt;P&gt;AT END&amp;#151;&amp;#151;&amp;#151;&amp;gt;this is used for row-wise calculation i.e, sub-total. &lt;/P&gt;&lt;P&gt;AT LAST&amp;#151;&amp;#151;-&amp;gt;this is used for calculation of grand total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these are the control statements used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Few Points to remember about control break statements are &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#1 when we place control breaks statements with in select &amp;amp; end-select then i will generate an complie time error and says us to use it in loop&amp;#133;...endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#2 when u r using control break commands.internal table must be sorted with key field.and control-break commands must be used in between the LOOP and ENDLOOP only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vinodh Balakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 04:03:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-break/m-p/3250918#M776220</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T04:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: control break</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-break/m-p/3250919#M776221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Control break statements are used to create statement blocks which process only specific table lines the LOOP &amp;#150; ENDLOOP block.&lt;/P&gt;&lt;P&gt;You open such a statement block with the control level statement AT and close it with the control level statement ENDAT. &lt;/P&gt;&lt;P&gt;Table should be sorted when you use control-break statements. You can break the sequential access of internal tables by using these statements.&lt;/P&gt;&lt;P&gt;1.at first / endat &lt;/P&gt;&lt;P&gt;2.at last / endat &lt;/P&gt;&lt;P&gt;3.at new / endat &lt;/P&gt;&lt;P&gt;4.at end of / endat &lt;/P&gt;&lt;P&gt;5.on change of / endon&lt;/P&gt;&lt;P&gt;Use the at first and at last statements to perform processing during the first or last loop pass of an internal table.&lt;/P&gt;&lt;P&gt;Use at first for: &lt;/P&gt;&lt;P&gt;Loop initialization processing &lt;/P&gt;&lt;P&gt;Writing totals at the top of a report &lt;/P&gt;&lt;P&gt;Writing headings &lt;/P&gt;&lt;P&gt;Use at last for: &lt;/P&gt;&lt;P&gt;Loop termination processing &lt;/P&gt;&lt;P&gt;Writing totals at the bottom of a report &lt;/P&gt;&lt;P&gt;Writing footings &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example code:&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;      BUKRS LIKE LFC1-BUKRS,&lt;/P&gt;&lt;P&gt;      UM01H LIKE LFC1-UM01H,&lt;/P&gt;&lt;P&gt;      UM01U LIKE LFC1-UM01U,&lt;/P&gt;&lt;P&gt;      END OF ITAB.&lt;/P&gt;&lt;P&gt;SELECT BUKRS UM01H UM01U INTO TABLE ITAB FROM LFC1.&lt;/P&gt;&lt;P&gt;SORT ITAB BY BUKRS.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;WRITE:/ ITAB-BUKRS,7 ITAB-UM01H,ITAB-UM01U.&lt;/P&gt;&lt;P&gt;AT END OF BUKRS.&lt;/P&gt;&lt;P&gt;  SUM.&lt;/P&gt;&lt;P&gt;  WRITE:/ ITAB-BUKRS COLOR 7,7 ITAB-UM01H COLOR 7,ITAB-UM01U COLOR 7.&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:/ &amp;#145;TOTAL&amp;#146; COLOR 3,ITAB-UM01H COLOR 1,ITAB-UM01U COLOR 1.&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;reward points,if it is helpful.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;chandu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 04:08:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-break/m-p/3250919#M776221</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T04:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: control break</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-break/m-p/3250920#M776222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi chaitanya,&lt;/P&gt;&lt;P&gt;                   some of the important points before going to use CONTROL BREAK statements.&lt;/P&gt;&lt;P&gt;1.we have to place these statements with in loop.&lt;/P&gt;&lt;P&gt;2.sort the data before going to loop ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT FIRST : FOR HEADINGS&lt;/P&gt;&lt;P&gt;AT NEW  : BASED ON FILED DATA IS DISPLAYED&lt;/P&gt;&lt;P&gt;AT END OF : FOR SUBTOTALS&lt;/P&gt;&lt;P&gt;AT LAST : FOR GRAND TOTALS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;syntax:&lt;/P&gt;&lt;P&gt;sort itab by &amp;lt;field1&amp;gt; &amp;lt;field2&amp;gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;at first.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at new &amp;lt;field&amp;gt;&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at end of &amp;lt;filed&amp;gt;&lt;/P&gt;&lt;P&gt;endat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at last&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;STRONG&gt;Reward points if helpful.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt; Kiran Kumar.G.A&lt;/P&gt;&lt;P&gt;        &lt;EM&gt;Have a Nice Day..&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 04:46:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-break/m-p/3250920#M776222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T04:46:57Z</dc:date>
    </item>
  </channel>
</rss>

