<?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 TABLE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183391#M464604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi venkat ..&lt;/P&gt;&lt;P&gt;modify statement also modify the existing record related to P Key..so returns 0..so it ll return 0 in both cases..unless until fields in modify staement do not match ztzble...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if record not found it append &lt;/P&gt;&lt;P&gt;else &lt;/P&gt;&lt;P&gt;it modify,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this is clear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Madan Gopal Sharma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Apr 2007 12:03:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-30T12:03:36Z</dc:date>
    <item>
      <title>MODIFY TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183390#M464603</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 am modifying a ztable, if it is sucess it is returning 0 as sy-subrc, but if fails it should return sy-subrc as other than 0, but in my case even if i give the data already available in ztable with same primary key and secondary key value it returns 0, can any one please helps in this case&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2007 12:01:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183390#M464603</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-30T12:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183391#M464604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi venkat ..&lt;/P&gt;&lt;P&gt;modify statement also modify the existing record related to P Key..so returns 0..so it ll return 0 in both cases..unless until fields in modify staement do not match ztzble...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if record not found it append &lt;/P&gt;&lt;P&gt;else &lt;/P&gt;&lt;P&gt;it modify,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this is clear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Madan Gopal Sharma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2007 12:03:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183391#M464604</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-30T12:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183392#M464605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To insert or change a single line in a database table, use the following: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;target&amp;gt; FROM &amp;lt;wa&amp;gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The contents of the work area &amp;lt;wa&amp;gt; are written to the database table &amp;lt;dbtab&amp;gt;. The work area &amp;lt;wa&amp;gt; must be a data object with at least the same length and alignment as the line structure of the database table. The data is placed in the database table according to the line structure of the table, and regardless of the structure of the work area. It is a good idea to define the work area with reference to the structure of the database table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the database table does not already contain a line with the same primary key as specified in the work area, a new line is inserted. If the database table does already contain a line with the same primary key as specified in the work area, the existing line is overwritten. SY-SUBRC is always set to 0. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A shortened form of the above statement is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;dbtab&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, the contents of the table work area &amp;lt;dbtab&amp;gt; are inserted into the database table with the same name. You must declare this table work area using the TABLES statement. In this case, it is not possible to specify the name of the database table dynamically. Table work areas with the same name as the database table (necessary before Release 4.0) should no longer be used for the sake of clarity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Modify will insert a new record if there is no record with that primary key , if it has a record then Modify will update the record if you need to only insert then use INSERT statement,or if you want to only update then use UPDATE statement &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards  Rk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2007 12:04:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183392#M464605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-30T12:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183393#M464606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use UPDATE command ..to get the expected sy-subrc instead MODIFY&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2007 12:05:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183393#M464606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-30T12:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183394#M464607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; To insert lines into a database table regardless of whether there is already a line in the table with the same primary key, use the following: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY &amp;lt;target&amp;gt; &amp;lt;lines&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the database table contains no line with the same primary key as the line to be inserted, MODIFY works like INSERT, that is, the line is added.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the database already contains a line with the same primary key as the line to be inserted, MODIFY works like UPDATE, that is, the line is changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For performance reasons, you should use MODIFY only if you cannot distinguish between these two options in your ABAP program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can add or change one or more lines &amp;lt;lines&amp;gt; in a database table &amp;lt;target&amp;gt;. You can only insert or change lines in an ABAP Dictionary view if it only contains fields from one table, and its maintenance status is defined as Read and change. You may specify the database table &amp;lt;target&amp;gt; either statically or dynamically.&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;veeresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2007 12:06:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183394#M464607</guid>
      <dc:creator>former_member673464</dc:creator>
      <dc:date>2007-04-30T12:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183395#M464608</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 does modifications to the tables when it finds the key data..&lt;/P&gt;&lt;P&gt;It does not mind whether the data is already present ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better option is check whether the data is already available before modifying it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not available then modify// Else you can use UPDATE command&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;regards,&lt;/P&gt;&lt;P&gt;nazeer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        nazeer shaik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2007 12:06:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183395#M464608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-30T12:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183396#M464609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the way you are using modify is that ..if you do have primary and secondary key in your ztable then also if the data corresponding to that key is different then it will modify the table ... so please if you have got new primary key or secondary key please append the record i the table or else in other case use modify statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ragards &lt;/P&gt;&lt;P&gt;Jayant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2007 12:07:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183396#M464609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-30T12:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183397#M464610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check out with your select stament and the sy-dbcnt value in the debugging mode and if necessary change the code accordingly.&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;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2007 12:10:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183397#M464610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-30T12:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: MODIFY TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183398#M464611</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;/P&gt;&lt;P&gt;Try to update the data then if its not present it can append  it into the body...just check ur select statement also...even it might be giveb wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if useful reward with points,&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;madhuri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 04:06:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-table/m-p/2183398#M464611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T04:06:57Z</dc:date>
    </item>
  </channel>
</rss>

