<?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 using where clause in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726847#M1299191</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'll suggest u to use F1 help for such queries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jun 2009 06:26:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-03T06:26:08Z</dc:date>
    <item>
      <title>Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726841#M1299185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;              Can anyone pls. give me the syntax of modify statement of internal table using where clause.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sohail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 06:06:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726841#M1299185</guid>
      <dc:creator>muhammad_sohail</dc:creator>
      <dc:date>2009-06-03T06:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726842#M1299186</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;here is an example of modify statement...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: idx type sy-tabix.

loop at it_final INTO wa_final.
  idx = sy-tabix.
  CLEAR wa_afru.
  IF sy-subrc is INITIAL.
  READ TABLE it_afru INTO wa_afru with key aufnr = wa_final-aufnr.
  SORT it_afru DESCENDING.
  wa_final-budat = wa_afru-budat.
  *modify it_final from wa_final index idx TRANSPORTING budat.*
  ENDIF.
clear: wa_final, idx.
ENDLOOP&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 06:10:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726842#M1299186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T06:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726843#M1299187</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;From SAP Help:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: BEGIN OF TAB OCCURS 500, 
        FLAG     TYPE C, 
        COMP(20) TYPE C, 
      END OF TAB. 

CLEAR TAB-FLAG. 
MODIFY TAB TRANSPORTING FLAG WHERE FLAG = 'X'. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 06:10:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726843#M1299187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T06:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726844#M1299188</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;Refer to the following index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;itab&amp;gt; FROM &amp;lt;wa&amp;gt; WHERE&amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 06:15:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726844#M1299188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T06:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726845#M1299189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sohail,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not delete the records of internal table inside the Loop u2013 End loop.&lt;/P&gt;&lt;P&gt;Do not use: LOOP AT ITAB WHERE EQUNR = u201800001011u2019.&lt;/P&gt;&lt;P&gt;DELETE ITAB.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Use:&lt;/STRONG&gt; DELETE ITAB WHERE EQUNR = u201800001011u2019. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the MODIFY ITAB ... TRANSPORTING f1 f2 ... for single line, and MODIFY ITAB ... TRANSPORTING f1 f2 ... WHERE condition for a set of line, to accelerate the updating of internal table&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;If possible, Update/Insert statement is used instead of Modify.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check these code :  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOOP AT TAB.              &lt;/P&gt;&lt;P&gt;  IF TAB-FLAG IS INITIAL. &lt;/P&gt;&lt;P&gt;    TAB-FLAG = 'X'.       &lt;/P&gt;&lt;P&gt;  ENDIF.                  &lt;/P&gt;&lt;P&gt;  MODIFY TAB.             &lt;/P&gt;&lt;P&gt;ENDLOOP.                  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TAB-FLAG = 'X'.                   &lt;/P&gt;&lt;P&gt;MODIFY TAB TRANSPORTING FLAG      &lt;/P&gt;&lt;P&gt;           WHERE FLAG IS INITIAL. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reg,&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 06:16:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726845#M1299189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T06:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726846#M1299190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, plz search sap help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Taken from sap library.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MODIFY itab [FROM wa] TRANSPORTING f1 ... fn WHERE cond.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Changes several entries in the internal table itab. You can use this variant for any table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use " FROM wa" and "TRANSPORTING f1 ... fn" as in variant 1. If the table has the type SORTED TABLE or HASHED TABLE, the TRANSPORTING list may not contain key fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In comparisons within the logical expression cond, the first operand must always be a subfield of the line structure of itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Return Code is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;At least one entry was changed. &lt;/P&gt;&lt;P&gt;SY-SUBRC = 4: &lt;/P&gt;&lt;P&gt;None of the entries was changed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;When you use the WHERE condition with a STANDARD or HASHED table, a full table scan is always required. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are working with a SORTED TABLE, the partial sequential processing can be optimized so that only the entries that actually satisfy the WHERE condition are processed. This optimization requires that each sub-condition is linked with AND; that no parentheses are used; that at least one sub-condition is in the form k = v; and that the conditions in the form k1 = v1 ... kn = vn cover at least the first part of the table key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The starting point for the loop is specified using a binary search with the sub-conditions that cover the table key (partially or completely). This optimization is similar to the optimization in the READ statement. The loop is only processed from the starting point to the point where these sub-conditions are still met. (See also Optimized Key Operations in Internal Tables). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can replace any operand in the WHERE condition with a functional method - unless it is a subfield in a line structure of the relevant internal table. Functional methods are methods in ABAP Objects that can have any number of IMPORTING parameters, but have only one RETURNING parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the line type of the internal table is - or contains - object reference variables, the attributes of the object (to which the reference of the line points) can be used as comparison values in the WHERE condition. (See Object Attributes as Keys in Internal Tables). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Reset a status flag universally &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF TAB OCCURS 500, 
        FLAG     TYPE C, 
        COMP(20) TYPE C, 
      END OF TAB. 

CLEAR TAB-FLAG. 
MODIFY TAB TRANSPORTING FLAG WHERE FLAG = 'X'.&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;Sakthi Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 06:16:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726846#M1299190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T06:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726847#M1299191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'll suggest u to use F1 help for such queries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 06:26:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726847#M1299191</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T06:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726848#M1299192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sohail,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ues this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab into wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify itab from wa transporting f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 06:31:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726848#M1299192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T06:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726849#M1299193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try using code like the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify itab where condition&lt;/P&gt;&lt;P&gt; or use update&lt;/P&gt;&lt;P&gt;update table set field = fieldname&lt;/P&gt;&lt;P&gt;where condition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ibrar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 07:25:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726849#M1299193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T07:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726850#M1299194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well.. to inform you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify and is a statement which acts like &lt;/P&gt;&lt;P&gt;INSERT  and &lt;/P&gt;&lt;P&gt;UPDATE&lt;/P&gt;&lt;P&gt;i.e:-&lt;/P&gt;&lt;P&gt;--- If no record exists with the given key, than it will insert a new ROW.&lt;/P&gt;&lt;P&gt;---and if a record already exits with the given key, that it will EDIT it or update it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 07:30:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726850#M1299194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T07:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726851#M1299195</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;go to tcode-se38 i.e abap editor give ur pgm name save it n when u get the editor screen type the key word 'MODIFY' then place d cursor on modify n press F1 u wl get all the syntax for modify statement of internal table using where clause&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but for ur convenience i m giving u an example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;syntax:-&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;itab&amp;gt; FROM &amp;lt;wa&amp;gt; TRANSPORTING &amp;lt;f1&amp;gt; &amp;lt;f2&amp;gt; ... WHERE &amp;lt;cond&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF LINE,&lt;/P&gt;&lt;P&gt;COL1 TYPE I,&lt;/P&gt;&lt;P&gt;COL2 TYPE I,&lt;/P&gt;&lt;P&gt;END OF LINE.&lt;/P&gt;&lt;P&gt;DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.&lt;/P&gt;&lt;P&gt;DO 4 TIMES.&lt;/P&gt;&lt;P&gt;LINE-COL1 = SY-INDEX.&lt;/P&gt;&lt;P&gt;LINE-COL2 = SY-INDEX ** 2.&lt;/P&gt;&lt;P&gt;INSERT LINE INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;LINE-COL2 = 100.&lt;/P&gt;&lt;P&gt;MODIFY ITAB FROM LINE TRANSPORTING COL2&lt;/P&gt;&lt;P&gt;WHERE ( COL2 &amp;gt; 1 ) AND ( COL1 &amp;lt; 4 ).&lt;/P&gt;&lt;P&gt;LOOP AT ITAB INTO LINE.&lt;/P&gt;&lt;P&gt;WRITE: / LINE-COL1, LINE-COL2.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps u&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;shivraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 07:36:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726851#M1299195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T07:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726852#M1299196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sohail,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before modifying the records in the internal table, just set the value for that field first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;       year(4) TYPE n,&lt;/P&gt;&lt;P&gt;       count TYPE i,&lt;/P&gt;&lt;P&gt;      END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: wa LIKE itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-year = '2003'.&lt;/P&gt;&lt;P&gt;itab-count = 20.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-year = '2004'.&lt;/P&gt;&lt;P&gt;itab-count = 30.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-year = '2007'.&lt;/P&gt;&lt;P&gt;itab-count = 50.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-year = '2008'.&lt;/P&gt;&lt;P&gt;itab-count = 60.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa-year = '2009'.&lt;/P&gt;&lt;P&gt;MODIFY itab FROM wa TRANSPORTING year WHERE year LT '2005'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;  WRITE:/5 itab-year, 25 itab-count.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kumar Bandanadham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 07:37:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726852#M1299196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T07:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726853#M1299197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The question is for internal tables. MODIFY works with internal tables and database tables, but INSERT and UPDATE are only for database tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 07:40:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726853#M1299197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T07:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726854#M1299198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how do  you say INSERT cannot be used in an internal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       wa_final-matnr    = 'MATNR'&lt;/P&gt;&lt;P&gt;          wa_final-menge4   = '10'.&lt;/P&gt;&lt;P&gt;          wa_final-budat    = sy-datum&lt;/P&gt;&lt;P&gt;          wa_final-check    = c_x.&lt;/P&gt;&lt;P&gt;          INSERT wa_final INTO it_final INDEX lv_index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cant you use INSERT this way in an internal table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 08:56:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726854#M1299198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T08:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726855#M1299199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right, INSERT works also for internal tables. I checked documentation for UPDATE only. So my remark is only for UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I learned ABAP in 1994 (release 2.1), we learned only APPEND and COLLECT commands for inserting in internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your remark. I will now study the differences between APPEND and INSERT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 09:44:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726855#M1299199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T09:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726856#M1299200</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 &amp;lt;jtab&amp;gt; FROM &amp;lt;wa&amp;gt; WHERE&amp;lt;condition&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just follow above syntax it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;munibabu.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 09:54:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726856#M1299200</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-03T09:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726857#M1299201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In below statement WD_THIS&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;MT_PTRV_SREC is internal table attribute in webdynpro, LW_PTRV_SREC is work area and these are field ZZTAX_REG&amp;nbsp;&amp;nbsp;&amp;nbsp; ZZBILLNO&amp;nbsp;&amp;nbsp;&amp;nbsp; ZZCHEQUE_NO. you should use TRANSPORTING and WHERE addition if you are not writing MODIFYstatement in loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;MODIFY WD_THIS&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;MT_PTRV_SREC &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;LW_PTRV_SREC &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;TRANSPORTING &lt;/SPAN&gt;ZZTAX_REG ZZBILLNO ZZCHEQUE_NO&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WHERE &lt;/SPAN&gt;MANDT &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;LW_PTRV_SREC&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;MANDT&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;AND &lt;/SPAN&gt;PERNR &lt;SPAN class="L0S55"&gt;=&amp;nbsp; &lt;/SPAN&gt;LW_PTRV_SREC&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;PERNR&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;AND &lt;/SPAN&gt;REINR &lt;SPAN class="L0S55"&gt;=&amp;nbsp; &lt;/SPAN&gt;LW_PTRV_SREC&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;REINR&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;AND &lt;/SPAN&gt;PERIO &lt;SPAN class="L0S55"&gt;=&amp;nbsp; &lt;/SPAN&gt;LW_PTRV_SREC&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;PERIO.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 11:27:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726857#M1299201</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-18T11:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Modify internal table using where clause</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726858#M1299202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its works nice solution&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Oct 2015 03:50:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-internal-table-using-where-clause/m-p/5726858#M1299202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-10-14T03:50:59Z</dc:date>
    </item>
  </channel>
</rss>

