<?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 Events in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527628#M572729</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3344472"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3069795"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jul 2007 07:58:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-11T07:58:14Z</dc:date>
    <item>
      <title>Control Events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527625#M572726</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;Can anyone tell me what control events in ABAP are and their syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks n Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dinesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 07:29:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527625#M572726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T07:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Control Events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527626#M572727</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;I suppose you mean the events for validation, don't you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's so, they are the event AT SELECTION-SCREEN except:&lt;/P&gt;&lt;P&gt;- AT SELECTION-SCREEN OUTPUT: it should be used to change the attributes of selection-screen;&lt;/P&gt;&lt;P&gt;- AT SELECTION-SCREEN ON VALUE-REQUEST: it's to trigger a search help;&lt;/P&gt;&lt;P&gt;- AT SELECTION-SCREEN ON HELP-REQUEST: it's to trigger the documentation of an input field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These events allow to insert some validations who stops the running of the program at the selection-screen level in order to correct the errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 07:49:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527626#M572727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T07:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Control Events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527627#M572728</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 events are&lt;/P&gt;&lt;P&gt;at new(every new record follows)&lt;/P&gt;&lt;P&gt;at first (at the top of the list i.e,first statement like headers)&lt;/P&gt;&lt;P&gt;at end of (every record ends it get triggered)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at last ( it is useful in summation of records) these r used in loop statements only&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to execute some statements for certain records of the dataset only, use the control statements AT and ENDAT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system processes the statement blocks between the control statements for the different options of AT as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT FIRST&lt;/P&gt;&lt;P&gt;The system executes the statement block once for the first record of the dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LAST&lt;/P&gt;&lt;P&gt;The system executes the statement block once for the last record of the dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use the AT and ENDAT statements for control level processing&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 useful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ashu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 07:55:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527627#M572728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T07:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Control Events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527628#M572729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Refer&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3344472"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3069795"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 07:58:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527628#M572729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T07:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Control Events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527629#M572730</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;check this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9f1f35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9f1f35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Control statements of an internal table are: &lt;/P&gt;&lt;P&gt;1. AT FIRST&lt;/P&gt;&lt;P&gt;2: AT NEW&lt;/P&gt;&lt;P&gt;3. AT END OF&lt;/P&gt;&lt;P&gt;4. AT LAST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT &amp;lt;line&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;statement block&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIRST&lt;/P&gt;&lt;P&gt;the first line of the internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LAST&lt;/P&gt;&lt;P&gt;the last line of the internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEW &amp;lt;field&amp;gt;&lt;/P&gt;&lt;P&gt;the beginning of a group of lines with the same contents in &amp;lt;field&amp;gt; and in the superior fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END OF &amp;lt;field&amp;gt;&lt;/P&gt;&lt;P&gt;the end of a group of lines with the same contents in &amp;lt;field&amp;gt; and in the superior fields&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;Reshma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 07:58:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527629#M572730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T07:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Control Events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527630#M572731</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 Events are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;1. AT NEW f. 
2. AT END OF f. 
3. AT FIRST. 
4. AT LAST.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you sort an extract dataset, control levels are defined in it.The control level hierarchy of an extract dataset corresponds to the sequence of the fields in the HEADER field group. After sorting, you can use the AT statement within a loop to program statement blocks that the system processes only at a control break, that is, when the control level changes.&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;&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 a different value from the previous record (AT NEW) or the subsequent record (AT END). Field &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;If the extract dataset is not sorted, the AT... ENDAT block is never executed. Furthermore, all extract records with the value HEX 00 in the field &amp;lt;f&amp;gt; are ignored when the control breaks are determined. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The AT... ENDAT blocks in a loop are processed in the order in which they occur. This sequence should be the same as the sort sequence. This sequence must not necessarily be the sequence of the fields in the HEADER field group, but can also be the one determined in the SORT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have sorted an extract dataset by the fields &amp;lt;f1&amp;gt;, &amp;lt;f2&amp;gt;, ..., the processing of the control levels should be written between the other control statements as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP.&lt;/P&gt;&lt;P&gt;  AT FIRST.... ENDAT.&lt;/P&gt;&lt;P&gt;    AT NEW &amp;lt;f1&amp;gt;....... ENDAT. &lt;/P&gt;&lt;P&gt;      AT NEW &amp;lt;f2&amp;gt;....... ENDAT. &lt;/P&gt;&lt;P&gt;     ...&lt;/P&gt;&lt;P&gt;          AT &amp;lt;fgi&amp;gt;..... ENDAT. &lt;/P&gt;&lt;P&gt;          &amp;lt;single line processing without control statement&amp;gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;      AT END OF &amp;lt;f2&amp;gt;.... ENDAT. &lt;/P&gt;&lt;P&gt;    AT END OF &amp;lt;f1&amp;gt;.... ENDAT. &lt;/P&gt;&lt;P&gt;  AT LAST..... ENDAT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You do not have to use all of the statement blocks listed here, but only the ones you require.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/at_itab.htm" target="test_blank"&gt;http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/at_itab.htm&lt;/A&gt;&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 07:58:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527630#M572731</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T07:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Control Events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527631#M572732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dinesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/at_extra.htm" target="test_blank"&gt;http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/at_extra.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 09:01:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527631#M572732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T09:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Control Events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527632#M572733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. AT FIRST&lt;/P&gt;&lt;P&gt;2: AT NEW&lt;/P&gt;&lt;P&gt;3. AT END OF&lt;/P&gt;&lt;P&gt;4. AT LAST&lt;/P&gt;&lt;P&gt;5. ON CHANGE OF...this is can be used out side the loop also....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 09:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527632#M572733</guid>
      <dc:creator>Shahid</dc:creator>
      <dc:date>2007-07-11T09:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Control Events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527633#M572734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Guys.... it was helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 09:37:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527633#M572734</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T09:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Control Events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527634#M572735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check out &lt;/P&gt;&lt;P&gt;help.sap.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2007 11:08:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/control-events/m-p/2527634#M572735</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-11T11:08:36Z</dc:date>
    </item>
  </channel>
</rss>

