<?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: internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354703#M520131</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[control break statements] at new statement is one of the control break statement used inside a loop  for giving o/p as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matnr         matktx      ersda............&lt;/P&gt;&lt;P&gt;1000         nbmncvb     bjcflbj            &lt;/P&gt;&lt;P&gt;                klbvhxkvh    cbhbvxbv&lt;/P&gt;&lt;P&gt;1001         klvnkvnzd    mnvxvnv  -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt; using at new only this o/p is given like this.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;1002         dvkhvhvh      klhvkxhv&lt;/P&gt;&lt;P&gt;.........................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and at new is triggered when ever the current field of a record in a internal table is different from next field of th another record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it works only when it follows some conditions like.&lt;/P&gt;&lt;P&gt;  1. internal table should be sorted.&lt;/P&gt;&lt;P&gt;  2.  the field which we give in at new should be the first field of internal table otherwise this event triggers for the fields which are before of given filed and leads to problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;suresh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2007 10:37:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-14T10:37:59Z</dc:date>
    <item>
      <title>internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354699#M520127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the use of at new statement?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 08:53:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354699#M520127</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T08:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354700#M520128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this comes under control statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for suppose ur having an internal table with values :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A      B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10     raghu&lt;/P&gt;&lt;P&gt;20     ram&lt;/P&gt;&lt;P&gt;10     kumar&lt;/P&gt;&lt;P&gt;20     sham&lt;/P&gt;&lt;P&gt;10      raj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U want to print like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10 raghu&lt;/P&gt;&lt;P&gt;10 kumar&lt;/P&gt;&lt;P&gt;10 raj&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------" /&gt;&lt;P&gt;10 ram&lt;/P&gt;&lt;P&gt;20 sham&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first sort the internal table then&lt;/P&gt;&lt;P&gt;use this logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt; at new A.&lt;/P&gt;&lt;P&gt;  write : '----&lt;/P&gt;&lt;HR originaltext="----------------------" /&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;for every new value of A varialbe it is going to trigger (at new).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward points if helpful,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raghunath.S&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 10:29:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354700#M520128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T10:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354701#M520129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&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;Reward points for useful Answers&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>Thu, 14 Jun 2007 10:30:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354701#M520129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T10:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354702#M520130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT NEW &amp;lt;f&amp;gt; | AT END OF &amp;lt;f&amp;gt;.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;A control break occurs when the value of the field &amp;lt;f&amp;gt; or a superior field in the current record has&lt;/P&gt;&lt;P&gt;a different value from the previous record (AT NEW) or the subsequent record (AT END). Field&lt;/P&gt;&lt;P&gt;&amp;lt;f&amp;gt; must be part of the HEADER field group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 10:34:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354702#M520130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T10:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354703#M520131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[control break statements] at new statement is one of the control break statement used inside a loop  for giving o/p as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matnr         matktx      ersda............&lt;/P&gt;&lt;P&gt;1000         nbmncvb     bjcflbj            &lt;/P&gt;&lt;P&gt;                klbvhxkvh    cbhbvxbv&lt;/P&gt;&lt;P&gt;1001         klvnkvnzd    mnvxvnv  -&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt; using at new only this o/p is given like this.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;1002         dvkhvhvh      klhvkxhv&lt;/P&gt;&lt;P&gt;.........................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and at new is triggered when ever the current field of a record in a internal table is different from next field of th another record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it works only when it follows some conditions like.&lt;/P&gt;&lt;P&gt;  1. internal table should be sorted.&lt;/P&gt;&lt;P&gt;  2.  the field which we give in at new should be the first field of internal table otherwise this event triggers for the fields which are before of given filed and leads to problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;suresh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 10:37:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354703#M520131</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T10:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354704#M520132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The AT NEW (and others like AT END OF...) are specially for table loop  &lt;/P&gt;&lt;P&gt;processing. The coding between AT new FIELD and ANDAT is triggerd  &lt;/P&gt;&lt;P&gt;whenever  the field or any field defined to the left is changed. Your  &lt;/P&gt;&lt;P&gt;table should be sorted by all fields from the left up to the considered  &lt;/P&gt;&lt;P&gt;FIELD. Btw all fields to the right contain *, so it can be usefull to  &lt;/P&gt;&lt;P&gt;have a second workarea filled to be printed or what ever you want. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sandeep.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 10:38:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354704#M520132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T10:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354705#M520133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;NEW}|{END OF} compi/&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;: Control levels are defined by the beginning or end of a group of lines with the same content in the component compi (where i = 1, 2, and so on) and in the components to the left of compi. The control breaks take place when the content of the component compi or another component to the left of compi changes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The compi components can be specified as described in Specification of Components, with the limitation that access to object attributes is not possible here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If the INTO or ASSIGNING additions are used in the LOOP statement, a field symbol can be entered after AT &lt;SPAN __jive_macro_name="NEW"&gt;&lt;/SPAN&gt;|{END OF} outside classes, to which the corresponding component of the work area wa or the field symbol &amp;lt;fs&amp;gt; is assigned. This form of dynamic component specification is obsolete and has been replaced by specification in the format (name). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 10:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354705#M520133</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T10:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354706#M520134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To all  gurus helping me  out. As iam new to this field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 10:09:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2354706#M520134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T10:09:20Z</dc:date>
    </item>
  </channel>
</rss>

