<?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: Modify Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278860#M495982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;   Modify statement,as it name indicates it modifies the internal table to the changes made.for the example you mentioned,&lt;/P&gt;&lt;P&gt;modify statement fetches the required record from lfa1 and append it into the name 1 field of it_rbkp.&lt;/P&gt;&lt;P&gt;so when you open the it_rbkp again it will be modified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IT PLEASE...!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 May 2007 07:00:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-14T07:00:34Z</dc:date>
    <item>
      <title>Modify Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278857#M495979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,ALL :&lt;/P&gt;&lt;P&gt;  LOOP AT it_rbkp.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE name1 INTO it_rbkp-name1&lt;/P&gt;&lt;P&gt;           FROM lfa1&lt;/P&gt;&lt;P&gt;           WHERE lifnr = it_rbkp-lifnr.&lt;/P&gt;&lt;P&gt;    MODIFY IT_RBKP.&lt;/P&gt;&lt;P&gt;    CLEAR IT_RBKP.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;why can use "MODIFY IT_RBKP" without "index sy-tabix"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 06:42:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278857#M495979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T06:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278858#M495980</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;it will compare the key fields in the work area and will modify the correponding record in in itab with the same key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so index is not needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or us can  use the below procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : ind type sy-tabix.

LOOP AT it_rbkp.

ind = sy-tabix.

SELECT SINGLE name1 INTO it_rbkp-name1
FROM lfa1
WHERE lifnr = it_rbkp-lifnr.

MODIFY IT_RBKP index ind..
CLEAR IT_RBKP.

ENDLOOP&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Reshma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 06:46:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278858#M495980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T06:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278859#M495981</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;MODIFY IT_RBKP. statement is inside loop...endloop&lt;/P&gt;&lt;P&gt;so it refers to the pqarticular loop pass.&lt;/P&gt;&lt;P&gt;Present record in the internal table headerline is modified in the internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 06:49:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278859#M495981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T06:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278860#M495982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;   Modify statement,as it name indicates it modifies the internal table to the changes made.for the example you mentioned,&lt;/P&gt;&lt;P&gt;modify statement fetches the required record from lfa1 and append it into the name 1 field of it_rbkp.&lt;/P&gt;&lt;P&gt;so when you open the it_rbkp again it will be modified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REWARD IT PLEASE...!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 07:00:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278860#M495982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T07:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278861#M495983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reshma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Logic yaar.&lt;/P&gt;&lt;P&gt;I leant one thing don't high always,think of bacics also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 12:21:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278861#M495983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T12:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278862#M495984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;You r writing the MODIFY Statement inside the LOOP ENDLOOP statement.&lt;/P&gt;&lt;P&gt;The Processor executes This Statement just after processing SELECT SINGLE statement.&lt;/P&gt;&lt;P&gt;Unless the execution reaches the ENDLOOP statement the  sy-tabix holds its value so there is no need for INDEX option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will Help.&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;Sumit Agarwal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2008 13:51:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278862#M495984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-27T13:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278863#M495985</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;After Fetching Records From Database table into Internal table You Are modyfying the Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here The Index is Index of current loop pass i.e sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So No Need to mention Index explicitly.&lt;/P&gt;&lt;P&gt;internal table is modified for Every loop pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If You want then you can also mention it explicitly but effcet is same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To change a line using its index, use the following statement: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;itab&amp;gt; FROM &amp;lt;wa&amp;gt; [INDEX &amp;lt;idx&amp;gt;] [TRANSPORTING &amp;lt;f1&amp;gt; &amp;lt;f 2&amp;gt; ... ].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here The TRANSPORTING addition allows you to specify the fields that you want to change explicitly in a list. See also Changing Table Entries. If you change a sorted table, you may only specify non-key fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again You can change lines of standard tables using the following statement: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE &amp;lt;f&amp;gt; TO &amp;lt;itab&amp;gt; INDEX &amp;lt;idx&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sujit Pal on Jun 28, 2008 6:49 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jun 2008 04:49:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table/m-p/2278863#M495985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-28T04:49:20Z</dc:date>
    </item>
  </channel>
</rss>

