<?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: Query on  Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672763#M617206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;modigy itab:&lt;/P&gt;&lt;P&gt;The system searches the internal table for the line whose table key corresponds to the key fields in wa. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but modift itab where &amp;lt;condition&amp;gt;:&lt;/P&gt;&lt;P&gt; this statement ll compare lines which satisfies the condition and then modify that line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Aparna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Aug 2007 05:26:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-16T05:26:14Z</dc:date>
    <item>
      <title>Query on  Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672760#M617203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is differnece between Modify Internal Table and Modify internal Table With Where Clause????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tell me with example i want to use it like &lt;/P&gt;&lt;P&gt; LOOP AT ITAB. &lt;/P&gt;&lt;P&gt;MODIFY ITAB.&lt;/P&gt;&lt;P&gt;ENDLOOP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;MOFIDY ITAB WHERE &amp;lt;SOME CONDITION&amp;gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and similar in case with Delete Internal Table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it good practice to put delete Itab Where condition in LOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 04:21:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672760#M617203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T04:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Query on  Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672761#M617204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When modifying or deleting within LOOP, you are implicitly deleting with index (as in MODIFY itab INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Internally the sentence uses sy-tabix which holds the current index for the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if the line you want to delete inside the loop is the line you're processing, then don't use DELETE/MODIFY ... WHERE as more than one line (including the one you're processing or not) may fulfill the condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Please reward points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 05:19:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672761#M617204</guid>
      <dc:creator>alejandro_bindi</dc:creator>
      <dc:date>2007-08-16T05:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Query on  Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672762#M617205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u are writeing where condition in a inside a loop there is no use y because u have control only on a pqaarticular record that is sy-tabix. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points to all helpful answers &lt;/P&gt;&lt;P&gt;kiran.M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 05:24:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672762#M617205</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T05:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Query on  Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672763#M617206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;modigy itab:&lt;/P&gt;&lt;P&gt;The system searches the internal table for the line whose table key corresponds to the key fields in wa. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but modift itab where &amp;lt;condition&amp;gt;:&lt;/P&gt;&lt;P&gt; this statement ll compare lines which satisfies the condition and then modify that line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Aparna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 05:26:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672763#M617206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T05:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Query on  Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672764#M617207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go through this link for details:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aparna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 05:27:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672764#M617207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T05:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Query on  Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672765#M617208</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;LOOP AT ITAB. &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;a = a+5&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;MODIFY ITAB.&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;in the above case if there is a field like a which is get modified by adding 5 to it , it will get modify directly &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;MOFIDY ITAB WHERE &amp;lt;SOME CONDITION&amp;gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the above condition when ever that condition comes in the internal table loop &lt;/P&gt;&lt;P&gt;it modifies that record and move forword &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MODIFY&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;if write MODIFY statement out of loop with giving any condition the program will genarate a SHORTDUMP,&lt;/P&gt;&lt;P&gt;when ever ur trying write MODIFY statement out of loop and u don't want to go program to shortdump then at  that sitvation you have mention the condition for that modify &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like modify also DELETE works &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is no problem with the DELETE statement &lt;/P&gt;&lt;P&gt;it is good to practice DELETE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewar if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 06:22:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672765#M617208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-16T06:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Query on  Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672766#M617209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Navdeep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Observe the Differences below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to Modify the records row by row using this below syntax&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;For eg: To increment the Sal of each employee by 1000&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB into wa.&lt;/P&gt;&lt;P&gt;  wa-sal = wa-sal + 1000. &lt;/P&gt;&lt;P&gt;MODIFY ITAB from wa.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To modify group of rows at a time based on a condition.&lt;/P&gt;&lt;P&gt;Here we use WHERE condition so it should not be in a Loop.&lt;/P&gt;&lt;P&gt;This is the correct method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA-CITY = 'MUMBAI'.&lt;/P&gt;&lt;P&gt;MOFIDY ITAB FROM WA WHERE CITY = 'BOMBAY'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Same rules are applicable incase of DELETE Also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if Helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2007 08:26:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-on-internal-table/m-p/2672766#M617209</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-08-16T08:26:06Z</dc:date>
    </item>
  </channel>
</rss>

