<?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: at new in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344865#M801976</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 ll work only if the mentioned field is the first field of the int table......if it is the 4th field den&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;at new &amp;lt;4th fld&amp;gt;&lt;/STRONG&gt; is same as &lt;STRONG&gt;at new&amp;lt;1st to 4th fld&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so use &lt;STRONG&gt;on change&lt;/STRONG&gt; of as said above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Will.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jan 2008 03:55:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-28T03:55:45Z</dc:date>
    <item>
      <title>at new</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344860#M801971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as i understood, this command "AT NEW field" we use to process a block whenever the specified field is changed, but it's not working for me.... &lt;/P&gt;&lt;P&gt;The content of the field is the same in the next loop and it keeps on processing this block....Why? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone explain it to me, please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Jan 2008 18:11:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344860#M801971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-27T18:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: at new</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344861#M801972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THAT FIELD SHOULD BE IN THE FIRST COLOUMN IN INTERNAL TABLE.&lt;/P&gt;&lt;P&gt;and it sould sorted on that field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the pre-requisite for using AT NEW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ON CHANGE it is not required to be in first coloumn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regsrds.&lt;/P&gt;&lt;P&gt;santhosh reddy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Santhosh Reddy on Jan 27, 2008 11:47 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Jan 2008 18:16:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344861#M801972</guid>
      <dc:creator>SantoshKallem</dc:creator>
      <dc:date>2008-01-27T18:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: at new</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344862#M801973</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; If you have 2 fields in the structure. ex:  &lt;/P&gt;&lt;P&gt;begin of itab,&lt;/P&gt;&lt;P&gt;  matnr   type  matnr,&lt;/P&gt;&lt;P&gt;  werks  type werks,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;Sort  itab by matnr werks.&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;   AT NEW  matnr.&lt;/P&gt;&lt;P&gt;   END AT.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; In the above logic, AT NEW is used on matnr value. it will be triggered when matnr value changes. (i.e., for every new material number it will be triggered.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;   AT NEW  werks.&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;In the above logic, AT NEW is used on werks.  This will be triggered for a new plant number. but as this field is the second field of the structure (matnr is the first field), hence even if plant is same for the next record, if material number changes, then also this will be triggered.&lt;/P&gt;&lt;P&gt;ex:  matnr    werks.&lt;/P&gt;&lt;P&gt;        1001     700&lt;/P&gt;&lt;P&gt;        1002     700&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   In the above case, during the second record execution also AT NEW werks will be triggered as matnr has been changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hope its clear.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2008 02:50:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344862#M801973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-28T02:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: at new</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344863#M801974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reethu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of at new, it triggers whenever there is a change in the fields before that particular field.ie. if there is a change in that combinations from the first field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 10,&lt;/P&gt;&lt;P&gt;no(5) type n,&lt;/P&gt;&lt;P&gt;id(10) type n,&lt;/P&gt;&lt;P&gt;name(20) type c,&lt;/P&gt;&lt;P&gt;F1(20) type c,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lets consider this IT has value like this,&lt;/P&gt;&lt;P&gt;No ID Name F1&lt;/P&gt;&lt;P&gt;1 100 abc hello&lt;/P&gt;&lt;P&gt;1 100 abc hi&lt;/P&gt;&lt;P&gt;3 300 abc test&lt;/P&gt;&lt;P&gt;4 400 lmn test1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at new name : it triggers for 1st and 4th record.&lt;/P&gt;&lt;P&gt;on chage of name : it triggers for 1st 3rd and 4th record since the values of combination for the fields no, id, name change inthose records.&lt;/P&gt;&lt;P&gt;hope it helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kindly reward if found helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers.&lt;/P&gt;&lt;P&gt;Hema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2008 03:04:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344863#M801974</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-28T03:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: at new</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344864#M801975</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;If you want the AT NEW logic for the field not in the first column of the structure .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use On Change Of &amp;lt;field&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code under this will be executed only when the content of field &amp;lt;field&amp;gt;&lt;/P&gt;&lt;P&gt;changes .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2008 03:45:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344864#M801975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-28T03:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: at new</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344865#M801976</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 ll work only if the mentioned field is the first field of the int table......if it is the 4th field den&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;at new &amp;lt;4th fld&amp;gt;&lt;/STRONG&gt; is same as &lt;STRONG&gt;at new&amp;lt;1st to 4th fld&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so use &lt;STRONG&gt;on change&lt;/STRONG&gt; of as said above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Will.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2008 03:55:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344865#M801976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-28T03:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: at new</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344866#M801977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reethu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Keep the field FIELD1 on which you have to do AT NEW in the last of your internal table structure.&lt;/P&gt;&lt;P&gt;2. Sort your internal Table keeping FIELD1 as the last field.&lt;/P&gt;&lt;P&gt;3. Now use AT NEW you will get perfect result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2008 04:02:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344866#M801977</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-28T04:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: at new</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344867#M801978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, &lt;/P&gt;&lt;P&gt;Misunderstandings about control statements: &lt;/P&gt;&lt;P&gt;The ON CHANGE OF statement can prove dangerous when not used correctly. Never compare it with AT NEW, while this context is strictly defined, the context of the ON CHANGE OF is not. It simply compares the content of the comparison field with its former content, at the exact location where it is executed. You can use the command anywhere in the program and it behaves complete independent from anything else. Better not to use it. &lt;/P&gt;&lt;P&gt;The LOOP AT itab statement in combination with control level statements (AT NEW) can also cause confusion. The processing is dependent on how the internal table is sorted and the order of the fields (use sorted table with sorting order is equal to the sort (key) fields in the table definition). The control level statement takes the field or all previous fields into account for checks on value change. It becomes even worse is you use the WHERE statement in the LOOP AT. So don&amp;#146;t use control level statements if this is the case. &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chaitanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2008 11:14:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/at-new/m-p/3344867#M801978</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-28T11:14:41Z</dc:date>
    </item>
  </channel>
</rss>

