<?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: Loop at  itab Where in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437576#M1739905</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it2 = itab.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from it2 comparing col3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Umarking the thread as question due to its basic nature.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 May 2013 08:03:09 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2013-05-15T08:03:09Z</dc:date>
    <item>
      <title>Loop at  itab Where</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437575#M1739904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have internal table with several&amp;nbsp; collons. In colon three the values can be repeated , and I have to read only the firs one &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;col1&amp;nbsp;&amp;nbsp;&amp;nbsp; col2&amp;nbsp;&amp;nbsp; col3&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; V&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&lt;/P&gt;&lt;P&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; T&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to readd only the first line&amp;nbsp; of each entry in Col3 so in this case i am interested only in&amp;nbsp; line 1 A Y , and 3 V X . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tryed wirh at new col3 but id doesn work because col1 and colé are not unique . Than I tryed&amp;nbsp; with loop where statement .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with this code . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data lv_col3 like itab-col3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab in wa&lt;/P&gt;&lt;P&gt;where col3 NE lv_col3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lv_col3 = wa_col3&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;The idea was to pass the value of col3 to local variable&amp;nbsp; and in next loop take the same in "where" condition. It doesnt work .The loop goes trough all lines of internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The intrenal table is declared like&amp;nbsp; this itab TYPE TABLE OF pc261 (&amp;nbsp; structure ).&lt;/P&gt;&lt;P&gt;colon ther and&amp;nbsp; local vareiable&amp;nbsp; are char 6 type.&lt;/P&gt;&lt;P&gt;Please can you explain why where statement doesnt work in this case and advice how can i get only the first entry of each value&amp;nbsp; of the colon 3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 07:27:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437575#M1739904</guid>
      <dc:creator>k_gjergja</dc:creator>
      <dc:date>2013-05-15T07:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Loop at  itab Where</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437576#M1739905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it2 = itab.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from it2 comparing col3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Umarking the thread as question due to its basic nature.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 08:03:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437576#M1739905</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2013-05-15T08:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Loop at  itab Where</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437577#M1739906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, it is simple to delete .But that was not the question. I am courious why 'where' statemen doesnt work. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 08:11:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437577#M1739906</guid>
      <dc:creator>k_gjergja</dc:creator>
      <dc:date>2013-05-15T08:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Loop at  itab Where</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437578#M1739907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of using loop where... try with AT NEW event.&lt;/P&gt;&lt;P&gt;But to do this (check for yourself), you should:&lt;/P&gt;&lt;P&gt;- sort the table (by col3 col1?)&lt;/P&gt;&lt;P&gt;- loop normally&lt;/P&gt;&lt;P&gt;- use AT NEW (put your logic in here)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: be careful because in the at new some fields will be filled with '*' (asterisks). So you should use a temporary structure to hold current record&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 08:21:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437578#M1739907</guid>
      <dc:creator>Phillip_Morgan</dc:creator>
      <dc:date>2013-05-15T08:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Loop at  itab Where</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437579#M1739908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just read the LOOP &lt;A href="http://help.sap.com/abapdocu_731/en/abaploop_at_itab_cond.htm#!ABAP_ADDITION_3@3@"&gt;WHERE&lt;/A&gt; documentation&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;The logical expression declared after &lt;SPAN class="qtext"&gt;WHERE&lt;/SPAN&gt; is evaluated once when the loop is entered. Any changes to the second operand during loop processing are ignored.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So you could remove the WHERE and use a CHECK as first statement inside LOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN class="L0S52"&gt;LOOP &lt;SPAN class="L0S52"&gt;AT &lt;/SPAN&gt;itab &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;wa&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CHECK &lt;/SPAN&gt;wa&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;col3 &lt;SPAN class="L0S52"&gt;NE &lt;/SPAN&gt;lv_col3&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;APPEND &lt;/SPAN&gt;wa &lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;itab2&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; lv_col3 &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;wa&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;col3&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN class="L0S52"&gt;ENDLOOP&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 08:25:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437579#M1739908</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2013-05-15T08:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Loop at  itab Where</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437580#M1739909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then read the F1 help on LOOP AT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 08:25:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437580#M1739909</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-05-15T08:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Loop at  itab Where</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437581#M1739910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 09:03:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437581#M1739910</guid>
      <dc:creator>k_gjergja</dc:creator>
      <dc:date>2013-05-15T09:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Loop at  itab Where</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437582#M1739911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krsto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to make use of ON CHANGE OF statement in loop. This will allow to specify coloumn name. so this event will be triggered on change of value of that coloumn only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information goto this link..&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/abapdocu_702/en/abapon.htm"&gt;http://help.sap.com/abapdocu_702/en/abapon.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard,&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 06:54:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437582#M1739911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-05-16T06:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Loop at  itab Where</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437583#M1739912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you notice in that link that ON CHANGE OF is &lt;STRONG&gt;obsolete.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 07:32:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-itab-where/m-p/9437583#M1739912</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-05-16T07:32:39Z</dc:date>
    </item>
  </channel>
</rss>

