<?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: statements in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/statements/m-p/2580868#M590136</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;ON CHANGE OF &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;ON CHANGE OF dobj [OR dobj1 [OR dobj2] ... ]. &lt;/P&gt;&lt;P&gt;  statement_block &lt;/P&gt;&lt;P&gt;ENDON. &lt;/P&gt;&lt;P&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;The statements ON CHANGE OF and ENDON, which are forbidden in classes, define a control structure that can contain a statement block statement_block. After ON CHANGE OF, any number of data objects dobj1, dobj2... of any data type can be added, linked by OR. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;In a SELECT loop, a statement block should only be executed if the content of the column CARRID has changed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA spfli_wa TYPE spfli. &lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM spfli &lt;/P&gt;&lt;P&gt;       INTO spfli_wa &lt;/P&gt;&lt;P&gt;       ORDER BY carrid. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;  ON CHANGE OF spfli_wa-carrid. &lt;/P&gt;&lt;P&gt;    ... &lt;/P&gt;&lt;P&gt;  ENDON. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following section of a program shows how the ON control structure can be replaced by an IF control structure with an explicit auxiliary variable carrid_buffer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA carrid_buffer TYPE spfli-carrid. &lt;/P&gt;&lt;P&gt;CLEAR carrid_buffer. &lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM spfli &lt;/P&gt;&lt;P&gt;       INTO spfli_wa &lt;/P&gt;&lt;P&gt;       ORDER BY carrid. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;  IF spfli_wa-carrid &amp;lt;&amp;gt; carrid_buffer. &lt;/P&gt;&lt;P&gt;    carrid_buffer = spfli_wa-carrid. &lt;/P&gt;&lt;P&gt;    ... &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ENDON &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;ENDON. &lt;/P&gt;&lt;P&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;The ENDON statement closes a conditional statement block introducud by ON CHANGE OF. &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;AT - itab &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;LOOP AT itab result ... &lt;/P&gt;&lt;P&gt;  [AT FIRST. &lt;/P&gt;&lt;P&gt;     ... &lt;/P&gt;&lt;P&gt;   ENDAT.] &lt;/P&gt;&lt;P&gt;    [AT NEW comp1. &lt;/P&gt;&lt;P&gt;       ... &lt;/P&gt;&lt;P&gt;     ENDAT. &lt;/P&gt;&lt;P&gt;       [AT NEW comp2. &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;       [[[...] &lt;/P&gt;&lt;P&gt;       AT END OF comp2. &lt;/P&gt;&lt;P&gt;         ... &lt;/P&gt;&lt;P&gt;       ENDAT.] &lt;/P&gt;&lt;P&gt;     AT END OF comp1. &lt;/P&gt;&lt;P&gt;       ... &lt;/P&gt;&lt;P&gt;     ENDAT.] &lt;/P&gt;&lt;P&gt;  [AT LAST. &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;&lt;/P&gt;&lt;P&gt;Extras: &lt;/P&gt;&lt;P&gt;1. ...  FIRST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... &lt;SPAN __jive_macro_name="NEW"&gt;&lt;/SPAN&gt;|{END OF} comp &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. ...  LAST &lt;/P&gt;&lt;P&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;The statement block of a LOOP loop can contain control structures for control level processing. The respective control statement is AT. The statements AT and ENDAT define statement blocks that are executed at control breaks. Within these statement blocks, the statement SUM can be specified to total numeric components of a group level. In the case of output behavior result, the same applies as for LOOP AT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that group level processing can be executed correctly, the following rules should be noted: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After LOOP there should be no limiting condition cond specified. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table must not be modified within the LOOP loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The work area wa specified in the LOOP statement after the INTO addition must be compatible with the line type of the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The content of a work area wa specified in the LOOP statement after the INTO addition must not be modified. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The prerequisite for control level processing is that the internal table is sorted in exactly the same sequence as the component of its line type - that is, first in accordance with the first component, then in accordance with the second component, and so on. The line structure and the corresponding sorting sequence gives a group structure of the content of the internal table, whose levels can be evaluated using AT statements. The AT-ENDAT control structures must be aligned one after the other, in accordance with the group structure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement blocks within the AT-ENDAT control structures are listed if an appropriate control break is made in the current table line. Statements in the LOOP-ENDLOOP control structure that are not executed within an AT-ENDAT control structure are executed each time the loop is run through. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the INTO addition is used in the LOOP statement to assign the content of the current line to a work area wa, its content is changed upon entry into the AT-ENDAT control structure as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The components of the current group key will remain unchanged. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All components with a character-type, flat data type to the right of the current group key are set to character "*" at that position. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the other components to the right of the current group key are set to their initial value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the AT-ENDAT control structure is exited, the content of the current table line is assigned to the entire work area wa. &lt;/P&gt;&lt;P&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;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2007 10:14:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-01T10:14:54Z</dc:date>
    <item>
      <title>statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statements/m-p/2580865#M590133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;explain&lt;/P&gt;&lt;P&gt;on change of&lt;/P&gt;&lt;P&gt;endon.&lt;/P&gt;&lt;P&gt;at new&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 17:00:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statements/m-p/2580865#M590133</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T17:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statements/m-p/2580866#M590134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;on change of f1.&lt;/P&gt;&lt;P&gt;endon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is executed whenever a new value of f1 is encountered.&lt;/P&gt;&lt;P&gt;This can be used in loop-endloop  as well as do-enddo statements.&lt;/P&gt;&lt;P&gt;**********************&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;on change of itab-f1.&lt;/P&gt;&lt;P&gt;---&amp;gt; code&lt;/P&gt;&lt;P&gt;endon.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;***********************&lt;/P&gt;&lt;P&gt;data : a type i.&lt;/P&gt;&lt;P&gt;a = 1.&lt;/P&gt;&lt;P&gt;do 20 times.&lt;/P&gt;&lt;P&gt;a = a + 1.&lt;/P&gt;&lt;P&gt;on change of a.&lt;/P&gt;&lt;P&gt;---&amp;gt; code&lt;/P&gt;&lt;P&gt;endon.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;************************&lt;/P&gt;&lt;P&gt;Also even multiple fields can be checked.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="23" type="ul"&gt;&lt;P&gt; &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;on change of itab-f1 or itab-f2.&lt;/P&gt;&lt;P&gt;---&amp;gt; code&lt;/P&gt;&lt;P&gt;endon.&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;at new f1.&lt;/P&gt;&lt;P&gt;---&amp;gt; code&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even this is executed whenever new value of f1 is encountered but this cannot be used in do-enddo and also in case of chewcking multiple fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward points if you find it useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 10:09:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statements/m-p/2580866#M590134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T10:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statements/m-p/2580867#M590135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Veera,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why dont you try searching the forums for those answers before posting such questions&lt;/P&gt;&lt;P&gt;incase you do not know how to do so, try this link&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/forumsearch" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/forumsearch&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 10:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statements/m-p/2580867#M590135</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2007-08-01T10:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statements/m-p/2580868#M590136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;ON CHANGE OF &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;ON CHANGE OF dobj [OR dobj1 [OR dobj2] ... ]. &lt;/P&gt;&lt;P&gt;  statement_block &lt;/P&gt;&lt;P&gt;ENDON. &lt;/P&gt;&lt;P&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;The statements ON CHANGE OF and ENDON, which are forbidden in classes, define a control structure that can contain a statement block statement_block. After ON CHANGE OF, any number of data objects dobj1, dobj2... of any data type can be added, linked by OR. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;In a SELECT loop, a statement block should only be executed if the content of the column CARRID has changed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA spfli_wa TYPE spfli. &lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM spfli &lt;/P&gt;&lt;P&gt;       INTO spfli_wa &lt;/P&gt;&lt;P&gt;       ORDER BY carrid. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;  ON CHANGE OF spfli_wa-carrid. &lt;/P&gt;&lt;P&gt;    ... &lt;/P&gt;&lt;P&gt;  ENDON. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following section of a program shows how the ON control structure can be replaced by an IF control structure with an explicit auxiliary variable carrid_buffer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA carrid_buffer TYPE spfli-carrid. &lt;/P&gt;&lt;P&gt;CLEAR carrid_buffer. &lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM spfli &lt;/P&gt;&lt;P&gt;       INTO spfli_wa &lt;/P&gt;&lt;P&gt;       ORDER BY carrid. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;  IF spfli_wa-carrid &amp;lt;&amp;gt; carrid_buffer. &lt;/P&gt;&lt;P&gt;    carrid_buffer = spfli_wa-carrid. &lt;/P&gt;&lt;P&gt;    ... &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;  ... &lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;ENDON &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;ENDON. &lt;/P&gt;&lt;P&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;The ENDON statement closes a conditional statement block introducud by ON CHANGE OF. &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;AT - itab &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;LOOP AT itab result ... &lt;/P&gt;&lt;P&gt;  [AT FIRST. &lt;/P&gt;&lt;P&gt;     ... &lt;/P&gt;&lt;P&gt;   ENDAT.] &lt;/P&gt;&lt;P&gt;    [AT NEW comp1. &lt;/P&gt;&lt;P&gt;       ... &lt;/P&gt;&lt;P&gt;     ENDAT. &lt;/P&gt;&lt;P&gt;       [AT NEW comp2. &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;       [[[...] &lt;/P&gt;&lt;P&gt;       AT END OF comp2. &lt;/P&gt;&lt;P&gt;         ... &lt;/P&gt;&lt;P&gt;       ENDAT.] &lt;/P&gt;&lt;P&gt;     AT END OF comp1. &lt;/P&gt;&lt;P&gt;       ... &lt;/P&gt;&lt;P&gt;     ENDAT.] &lt;/P&gt;&lt;P&gt;  [AT LAST. &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;&lt;/P&gt;&lt;P&gt;Extras: &lt;/P&gt;&lt;P&gt;1. ...  FIRST &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. ... &lt;SPAN __jive_macro_name="NEW"&gt;&lt;/SPAN&gt;|{END OF} comp &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. ...  LAST &lt;/P&gt;&lt;P&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;The statement block of a LOOP loop can contain control structures for control level processing. The respective control statement is AT. The statements AT and ENDAT define statement blocks that are executed at control breaks. Within these statement blocks, the statement SUM can be specified to total numeric components of a group level. In the case of output behavior result, the same applies as for LOOP AT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that group level processing can be executed correctly, the following rules should be noted: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After LOOP there should be no limiting condition cond specified. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table must not be modified within the LOOP loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The work area wa specified in the LOOP statement after the INTO addition must be compatible with the line type of the table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The content of a work area wa specified in the LOOP statement after the INTO addition must not be modified. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The prerequisite for control level processing is that the internal table is sorted in exactly the same sequence as the component of its line type - that is, first in accordance with the first component, then in accordance with the second component, and so on. The line structure and the corresponding sorting sequence gives a group structure of the content of the internal table, whose levels can be evaluated using AT statements. The AT-ENDAT control structures must be aligned one after the other, in accordance with the group structure. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statement blocks within the AT-ENDAT control structures are listed if an appropriate control break is made in the current table line. Statements in the LOOP-ENDLOOP control structure that are not executed within an AT-ENDAT control structure are executed each time the loop is run through. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the INTO addition is used in the LOOP statement to assign the content of the current line to a work area wa, its content is changed upon entry into the AT-ENDAT control structure as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The components of the current group key will remain unchanged. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All components with a character-type, flat data type to the right of the current group key are set to character "*" at that position. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the other components to the right of the current group key are set to their initial value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the AT-ENDAT control structure is exited, the content of the current table line is assigned to the entire work area wa. &lt;/P&gt;&lt;P&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;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 10:14:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statements/m-p/2580868#M590136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T10:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: statements</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statements/m-p/2580869#M590137</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;syntax for on change of is&lt;/P&gt;&lt;P&gt;ON CHANGE OF &amp;lt;F1&amp;gt; OR &amp;lt;F2&amp;gt; OR...&lt;/P&gt;&lt;P&gt;&amp;lt;...STMTS...&amp;gt;&lt;/P&gt;&lt;P&gt;ENDON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;syntax for at new is&lt;/P&gt;&lt;P&gt;AT NEW &amp;lt;F&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;...stmts..&amp;gt;&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both trigger when there is a change in value of a given field(s). We can trigger ON,ENDON for multiple field changes  by using OR but AT NEW is triggered only for a single field.&lt;/P&gt;&lt;P&gt;In between AT NEW  and ENDAT fields dont have the values i.e., primery keys set to blanks,numeric fields set to * s. But fields do have the value in between ON and ENDON.&lt;/P&gt;&lt;P&gt;If the first value of field is zero or blank ON won't be triggered.But AT NEW triggers even the first field is zero or blank.&lt;/P&gt;&lt;P&gt;AT  statements i.e., control break events are to be used only in LOOP and ENDLOOP.&lt;/P&gt;&lt;P&gt;ON  CHANGE of can be used in any loop,event...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2007 10:24:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statements/m-p/2580869#M590137</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-01T10:24:02Z</dc:date>
    </item>
  </channel>
</rss>

