<?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 Modifying an internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563894#M1077166</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi frirnds,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I need to modify a internal table under the loop of a another internal table... Presen, I am doing this as..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at itab1.&lt;/P&gt;&lt;P&gt;read table itab2 with key (Some condition)....&lt;/P&gt;&lt;P&gt;itab2-f1 = xxx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify itab2 index sy-tabix from itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Is the way i am approaching is correct...Because sy-tabix shows the record no of itab1, but i need to modify itab2.... Should i use sy-tabix or sy-index here....if i wont use any of that its going toshort dump..so i think i need to use an index...Pls sugest me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             Thanks,&lt;/P&gt;&lt;P&gt;             Shyam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Oct 2008 08:01:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-02T08:01:26Z</dc:date>
    <item>
      <title>Modifying an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563894#M1077166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi frirnds,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I need to modify a internal table under the loop of a another internal table... Presen, I am doing this as..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at itab1.&lt;/P&gt;&lt;P&gt;read table itab2 with key (Some condition)....&lt;/P&gt;&lt;P&gt;itab2-f1 = xxx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify itab2 index sy-tabix from itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Is the way i am approaching is correct...Because sy-tabix shows the record no of itab1, but i need to modify itab2.... Should i use sy-tabix or sy-index here....if i wont use any of that its going toshort dump..so i think i need to use an index...Pls sugest me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             Thanks,&lt;/P&gt;&lt;P&gt;             Shyam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2008 08:01:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563894#M1077166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-02T08:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563895#M1077167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In F1 help for statement READ TABLE :&lt;/P&gt;&lt;P&gt;SY-TABIX is set to the index of the entry. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2008 08:04:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563895#M1077167</guid>
      <dc:creator>h_senden2</dc:creator>
      <dc:date>2008-10-02T08:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563896#M1077168</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;Store the index directly after the read for use later like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Loop at itab1.
  read itab2 with key...
  if sy-subrc = 0.
    lv_tabix = sy-tabix.
  else.
   clear lv_tabix.
  endif.
....
...
   if lv_tabix &amp;lt;&amp;gt; 0.
   modify itab2 index lv_tabix.
   endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Darren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2008 08:06:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563896#M1077168</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-02T08:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563897#M1077169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shyam Prasad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use SY-TABIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because you want the index of the record that satisfies the condition in SECOND internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initially, SY-TABIX has the index from FIRST inernal table.&lt;/P&gt;&lt;P&gt;After READ in SECOND internal table, it will be changed that is the value we want to modify in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use it within IF SY-SUBRC = 0... ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R.Nagarajan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2008 08:20:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563897#M1077169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-02T08:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563898#M1077170</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;Check this code.. &lt;/P&gt;&lt;P&gt;Declare one variable..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab.
 n = n + 1.
read table itab2 with key f1 = itab-f1.
if sy-subrc = 0.
  itab2-f2 = 'XXX'.
  modify itab2 index n.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naveen.I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2008 08:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563898#M1077170</guid>
      <dc:creator>naveen_inuganti2</dc:creator>
      <dc:date>2008-10-02T08:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563899#M1077171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would do it in a modern way avoiding such discussions and with more performance:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  data:
    tab1 type standard table of t1,
    tab2 type standard table of t2.

  field-symbols:
    &amp;lt;p1&amp;gt; type t1,
    &amp;lt;p2&amp;gt; type t2.

  loop at tab1 assigning &amp;lt;p1&amp;gt;.

    read table tab2 assigning &amp;lt;p2&amp;gt; where.....
    if sy-subrc = 0.
      &amp;lt;p2&amp;gt;-field = 'ABCDE'.
    endif.
  endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No doubt with sy-tabix.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2008 08:25:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-an-internal-table/m-p/4563899#M1077171</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-10-02T08:25:43Z</dc:date>
    </item>
  </channel>
</rss>

