<?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: how to modify a table? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283939#M1022011</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ami,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below thread gives you information on how to use the Modify Keyword in ABAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Have A Nice Day&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chaitanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jul 2008 11:37:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-30T11:37:58Z</dc:date>
    <item>
      <title>how to modify a table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283936#M1022008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;i want to modify a table &lt;/P&gt;&lt;P&gt;how do i write the command if i want to modify it according to the table's keys ????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:35:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283936#M1022008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T11:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify a table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283937#M1022009</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 this link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb36a1358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb36a1358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:37:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283937#M1022009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T11:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify a table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283938#M1022010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to modify an internal table then use follwoing code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF sy-subrc EQ 0.
    LOOP AT i_output INTO wa_output.
      READ TABLE i_mard INTO wa_mard WITH KEY matnr = wa_output-matnr.
      wa_output-lgort = wa_mard-lgort.
      MODIFY i_output FROM wa_output.
      CLEAR wa_output.
    ENDLOOP.                           " LOOP AT i_output
  ENDIF.                               " IF sy-subrc EQ 0&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and if you want to update ztable then you need to use UPDATE of MODIFY query for that table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;twinkal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:37:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283938#M1022010</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T11:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify a table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283939#M1022011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ami,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below thread gives you information on how to use the Modify Keyword in ABAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35eb358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Have A Nice Day&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chaitanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283939#M1022011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T11:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify a table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283940#M1022012</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;&lt;STRONG&gt;To change a single line, use the following statement:&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODIFY TABLE &amp;lt;itab&amp;gt; FROM &amp;lt;wa&amp;gt; [TRANSPORTING &amp;lt;f1&amp;gt; &amp;lt;f 2&amp;gt; ...].&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The work area &amp;lt;wa&amp;gt;, which must be compatible with the line type of the internal table, plays a double role in this statement. Not only it is used to find the line that you want to change, but it also contains the new contents. The system searches the internal table for the line whose table key corresponds to the key fields in &amp;lt;wa&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system searches for the relevant lines as follows: &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Standard tables&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Linear search, where the runtime is in linear relation to the number of table entries. The first entry found is changed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sorted tables&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;Binary search, where the runtime is in logarithmic relation to the number of table entries. The first entry found is changed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hashed tables&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The entry is found using the hash algorithm of the internal table. The runtime is independent of the number of table entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To change one or more lines using a condition, use the following statement:&lt;/STRONG&gt; &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;f 2&amp;gt; ... WHERE &amp;lt;cond&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This processes all of the lines that meet the logical condition &amp;lt;cond&amp;gt;. The logical condition can consist of more than one comparison. In each comparison, the first operand must be a component of the line structure. If the table lines are not structured, the first operand can also be the expression TABLE LINE. The comparison then applies to the entire line. &lt;/P&gt;&lt;P&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;Swapna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:38:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283940#M1022012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T11:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify a table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283941#M1022013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ami,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;take a help of MODIFY by pressing F1 in se38.&lt;/P&gt;&lt;P&gt;because SAP help is most accurate help they desnt miss but we may &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:41:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283941#M1022013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T11:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify a table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283942#M1022014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;report .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of ttab ,&lt;/P&gt;&lt;P&gt;      vbeln(10) type c ,&lt;/P&gt;&lt;P&gt;      vkorg(4)  type c,&lt;/P&gt;&lt;P&gt;      dele(4)   type c,&lt;/P&gt;&lt;P&gt;      end of ttab ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    begin of ttab1 ,&lt;/P&gt;&lt;P&gt;     vbeln(10) type c,&lt;/P&gt;&lt;P&gt;     dele(4)   type c,&lt;/P&gt;&lt;P&gt;     end of ttab1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: itab type table of ttab  with header line,&lt;/P&gt;&lt;P&gt;      itab1 type table of ttab1  with header line,&lt;/P&gt;&lt;P&gt;wa like line of itab ,&lt;/P&gt;&lt;P&gt;wa1 like line of itab1 .&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;itab-vbeln = '0000000001'.&lt;/P&gt;&lt;P&gt;itab-vkorg = '1000'.&lt;/P&gt;&lt;P&gt;itab-dele  = 'DEL'.&lt;/P&gt;&lt;P&gt;append itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-vbeln = '0000000002'.&lt;/P&gt;&lt;P&gt;itab-vkorg = '1000'.&lt;/P&gt;&lt;P&gt;itab-dele  = 'DEL'.&lt;/P&gt;&lt;P&gt;append itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-vbeln = '0000000003'.&lt;/P&gt;&lt;P&gt;itab-vkorg = '1000'.&lt;/P&gt;&lt;P&gt;itab-dele  = 'DEL'.&lt;/P&gt;&lt;P&gt;append itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1-vbeln = '0000000001'.&lt;/P&gt;&lt;P&gt;itab1-dele  = 'TST'.&lt;/P&gt;&lt;P&gt;append itab1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1-vbeln = '0000000002'.&lt;/P&gt;&lt;P&gt;itab1-dele  = 'GRE'.&lt;/P&gt;&lt;P&gt;append itab1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by  vbeln.&lt;/P&gt;&lt;P&gt;sort itab1 by vbeln.&lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;data:v_index type sy-index .&lt;/P&gt;&lt;P&gt;v_index = sy-tabix.&lt;/P&gt;&lt;P&gt;read table itab1  into wa1 with key vbeln = wa+0(10).&lt;/P&gt;&lt;P&gt;wa&lt;EM&gt;14(4) = wa1&lt;/EM&gt;10(4).&lt;/P&gt;&lt;P&gt;modify  itab index v_index from wa   .&lt;/P&gt;&lt;P&gt;&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;write:/ itab-vbeln,itab-vkorg,itab-dele .&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:42:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283942#M1022014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T11:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify a table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283943#M1022015</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;I guess no just check the syntax through f1 ..&lt;/P&gt;&lt;P&gt; If you see the definition you will come to know on the key basis its not possible,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;agree to a point that the structure of the internal table (in case if modifying ) through it has to be same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;:" Inserts new lines or updates existing lines in a database table (s. relational database). If a line with the specified primary key already exists, an UPDATE is executed. Otherwise, an INSERT is performed."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mohinder&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:45:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283943#M1022015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T11:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to modify a table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283944#M1022016</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;To update the data in the DB tables you can use either UPDATE statement or MODIFY statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg. UPDATE &amp;lt;table_name&amp;gt; SET &amp;lt;field1&amp;gt;=&amp;lt;value1&amp;gt; &amp;lt;field2&amp;gt;= &amp;lt;value2&amp;gt; .....&lt;/P&gt;&lt;P&gt;      WHERE &amp;lt;key_field&amp;gt; = &amp;lt;value&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(or) MODIFY &amp;lt;table_name&amp;gt; from TABLE &amp;lt;ITAB&amp;gt;.&lt;/P&gt;&lt;P&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;Murthy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:52:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-modify-a-table/m-p/4283944#M1022016</guid>
      <dc:creator>former_member787646</dc:creator>
      <dc:date>2008-07-30T11:52:56Z</dc:date>
    </item>
  </channel>
</rss>

