<?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: Read a local Table after modifying it in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-local-table-after-modifying-it/m-p/4149767#M992365</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;u r moving it to internal table and after modifying u can find that in table what else the result want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jul 2008 13:27:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-24T13:27:21Z</dc:date>
    <item>
      <title>Read a local Table after modifying it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-local-table-after-modifying-it/m-p/4149766#M992364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus.&lt;/P&gt;&lt;P&gt;I have a local table lt_table.&lt;/P&gt;&lt;P&gt;At some point of my code I modify that table using indexes and it works well.&lt;/P&gt;&lt;P&gt;The problem is that after I change that table I cannot read it into a structure with the changes being reflected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: 
          i type sy-tabix,
          lt_table type table of bla,
          ls_table type bla.


LOOP AT SOME_TABLE INTO SOME_WA.

   READ lt_table into ls_table
   WITH KEY field1 = SOME_WA-field1
   BINARY SEARCH.

   ...

   MODIFY lt_table FROM ls_table index i.

ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After I modify the table, I can see in debug that the table was modified but the structure ls_table doesn't see the new results...&lt;/P&gt;&lt;P&gt;Is this normal behaviour from ABAP?&lt;/P&gt;&lt;P&gt;Thank you for your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jorge&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 13:20:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-local-table-after-modifying-it/m-p/4149766#M992364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T13:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Read a local Table after modifying it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-local-table-after-modifying-it/m-p/4149767#M992365</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;u r moving it to internal table and after modifying u can find that in table what else the result want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 13:27:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-local-table-after-modifying-it/m-p/4149767#M992365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T13:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Read a local Table after modifying it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-local-table-after-modifying-it/m-p/4149768#M992366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT SOME_TABLE INTO SOME_WA.
  
   READ lt_table into ls_table
   WITH KEY field1 = SOME_WA-field1
   BINARY SEARCH.
  if sy-subrc eq 0.
 i = sy-tabix.
 .....
  ... 
   MODIFY lt_table FROM ls_table index i.
   clear ls_table.
 endif.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if you don't use clear. and then check ls_table you will see old data only.&lt;/P&gt;&lt;P&gt;where are you reading. which index you are reading that also matters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 13:27:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-local-table-after-modifying-it/m-p/4149768#M992366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T13:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Read a local Table after modifying it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-local-table-after-modifying-it/m-p/4149769#M992367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;check by using,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY &amp;lt;itab&amp;gt; INDEX &amp;lt;idx&amp;gt; FROM &amp;lt;wa&amp;gt; 
       TRANSPORTING &amp;lt;field&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 13:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-local-table-after-modifying-it/m-p/4149769#M992367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T13:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Read a local Table after modifying it</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-local-table-after-modifying-it/m-p/4149770#M992368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your looping criteria is on SOME_TABLE and modifying ls_table where only the work area will be modified.. so keep looping in a reverse way to incorporate your modified changes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 13:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-a-local-table-after-modifying-it/m-p/4149770#M992368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-24T13:27:48Z</dc:date>
    </item>
  </channel>
</rss>

