<?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: update in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update/m-p/3010828#M711504</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;MODIFY - Will update the table, if the data already exists, if NOT inserts new rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE - Will update the table, errors out if the data is not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of MODIFY the sy-subrc is always 0 so you would't know whether the data is actually updated or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT - Inserting Data in Database Tables &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variants: &lt;/P&gt;&lt;P&gt;1. INSERT INTO dbtab [CLIENT SPECIFIED] VALUES wa. &lt;/P&gt;&lt;P&gt;INSERT INTO (dbtabname) [CLIENT SPECIFIED] VALUES wa. &lt;/P&gt;&lt;P&gt;2. INSERT dbtab [CLIENT SPECIFIED] FROM TABLE itab. oder &lt;/P&gt;&lt;P&gt;INSERT (dbtabname) [CLIENT SPECIFIED] FROM TABLE itab. &lt;/P&gt;&lt;P&gt;3. INSERT dbtab [CLIENT SPECIFIED]. oder &lt;/P&gt;&lt;P&gt;INSERT *dbtab [CLIENT SPECIFIED]. oder &lt;/P&gt;&lt;P&gt;INSERT (dbtabname) [CLIENT SPECIFIED] ... . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect Adds new records to a database table (see relational &lt;/P&gt;&lt;P&gt;database). You can specify the name of the database table &lt;/P&gt;&lt;P&gt;either directly in the program in the form dbtab or at runtime &lt;/P&gt;&lt;P&gt;as the contents of the field dbtabname. In either case, the &lt;/P&gt;&lt;P&gt;database table must be declared in the ABAP Dictionary. You &lt;/P&gt;&lt;P&gt;can only insert data using a view if the view refers to a &lt;/P&gt;&lt;P&gt;single table and has the maintenance status "No restriction" &lt;/P&gt;&lt;P&gt;in the ABAP Dictionary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default, data is only inserted in the current client. &lt;/P&gt;&lt;P&gt;However, if you use the CLIENT SPECIFIED addition, you can &lt;/P&gt;&lt;P&gt;switch off the automatic client handling. This enables you to &lt;/P&gt;&lt;P&gt;enter data for any client in a cross-client table, not just in &lt;/P&gt;&lt;P&gt;the client in which you are logged on. In this case, the &lt;/P&gt;&lt;P&gt;client field is treated like a normal field to which you can &lt;/P&gt;&lt;P&gt;assign a value in the work area. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY - Change a database table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variants: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. MODIFY dbtab. or &lt;/P&gt;&lt;P&gt;MODIFY *dbtab. or &lt;/P&gt;&lt;P&gt;MODIFY (dbtabname) ... .. &lt;/P&gt;&lt;P&gt;2. MODIFY dbtab FROM TABLE itab. or &lt;/P&gt;&lt;P&gt;MODIFY (dbtabname) FROM TABLE itab. &lt;/P&gt;&lt;P&gt;3. MODIFY dbtab VERSION vers. or &lt;/P&gt;&lt;P&gt;MODIFY *dbtab VERSION vers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect Inserts new lines or updates existing lines in a database &lt;/P&gt;&lt;P&gt;table (s. relational database). If a line with the specified &lt;/P&gt;&lt;P&gt;primary key already exists, an UPDATE is executed. Otherwise, &lt;/P&gt;&lt;P&gt;an INSERT is performed. You can specify the name of the &lt;/P&gt;&lt;P&gt;database table either in the program itself in the form MODIFY &lt;/P&gt;&lt;P&gt;dbtab ... or at runtime as the contents of the field dbtabname &lt;/P&gt;&lt;P&gt;in the form MODIFY (dbtabname) ... . In both cases, the &lt;/P&gt;&lt;P&gt;database table must be defined in the ABAP Dictionary. &lt;/P&gt;&lt;P&gt;Normally, records are inserted or updated only in the current &lt;/P&gt;&lt;P&gt;client. Data can only be inserted or updated using a view, if &lt;/P&gt;&lt;P&gt;the view refers to a single table and was created in the ABAP &lt;/P&gt;&lt;P&gt;Dictionary with the maintenance status "No restriction". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY belongs to the Open SQL command set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the statement has been executed, the system field &lt;/P&gt;&lt;P&gt;SY-DBCNT contains the number of edited lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward point if helpful.&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>Wed, 07 Nov 2007 10:58:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-07T10:58:56Z</dc:date>
    <item>
      <title>update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update/m-p/3010827#M711503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the difference between update and modify.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2007 10:54:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update/m-p/3010827#M711503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-07T10:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update/m-p/3010828#M711504</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;MODIFY - Will update the table, if the data already exists, if NOT inserts new rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE - Will update the table, errors out if the data is not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of MODIFY the sy-subrc is always 0 so you would't know whether the data is actually updated or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT - Inserting Data in Database Tables &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variants: &lt;/P&gt;&lt;P&gt;1. INSERT INTO dbtab [CLIENT SPECIFIED] VALUES wa. &lt;/P&gt;&lt;P&gt;INSERT INTO (dbtabname) [CLIENT SPECIFIED] VALUES wa. &lt;/P&gt;&lt;P&gt;2. INSERT dbtab [CLIENT SPECIFIED] FROM TABLE itab. oder &lt;/P&gt;&lt;P&gt;INSERT (dbtabname) [CLIENT SPECIFIED] FROM TABLE itab. &lt;/P&gt;&lt;P&gt;3. INSERT dbtab [CLIENT SPECIFIED]. oder &lt;/P&gt;&lt;P&gt;INSERT *dbtab [CLIENT SPECIFIED]. oder &lt;/P&gt;&lt;P&gt;INSERT (dbtabname) [CLIENT SPECIFIED] ... . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect Adds new records to a database table (see relational &lt;/P&gt;&lt;P&gt;database). You can specify the name of the database table &lt;/P&gt;&lt;P&gt;either directly in the program in the form dbtab or at runtime &lt;/P&gt;&lt;P&gt;as the contents of the field dbtabname. In either case, the &lt;/P&gt;&lt;P&gt;database table must be declared in the ABAP Dictionary. You &lt;/P&gt;&lt;P&gt;can only insert data using a view if the view refers to a &lt;/P&gt;&lt;P&gt;single table and has the maintenance status "No restriction" &lt;/P&gt;&lt;P&gt;in the ABAP Dictionary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default, data is only inserted in the current client. &lt;/P&gt;&lt;P&gt;However, if you use the CLIENT SPECIFIED addition, you can &lt;/P&gt;&lt;P&gt;switch off the automatic client handling. This enables you to &lt;/P&gt;&lt;P&gt;enter data for any client in a cross-client table, not just in &lt;/P&gt;&lt;P&gt;the client in which you are logged on. In this case, the &lt;/P&gt;&lt;P&gt;client field is treated like a normal field to which you can &lt;/P&gt;&lt;P&gt;assign a value in the work area. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY - Change a database table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variants: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. MODIFY dbtab. or &lt;/P&gt;&lt;P&gt;MODIFY *dbtab. or &lt;/P&gt;&lt;P&gt;MODIFY (dbtabname) ... .. &lt;/P&gt;&lt;P&gt;2. MODIFY dbtab FROM TABLE itab. or &lt;/P&gt;&lt;P&gt;MODIFY (dbtabname) FROM TABLE itab. &lt;/P&gt;&lt;P&gt;3. MODIFY dbtab VERSION vers. or &lt;/P&gt;&lt;P&gt;MODIFY *dbtab VERSION vers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect Inserts new lines or updates existing lines in a database &lt;/P&gt;&lt;P&gt;table (s. relational database). If a line with the specified &lt;/P&gt;&lt;P&gt;primary key already exists, an UPDATE is executed. Otherwise, &lt;/P&gt;&lt;P&gt;an INSERT is performed. You can specify the name of the &lt;/P&gt;&lt;P&gt;database table either in the program itself in the form MODIFY &lt;/P&gt;&lt;P&gt;dbtab ... or at runtime as the contents of the field dbtabname &lt;/P&gt;&lt;P&gt;in the form MODIFY (dbtabname) ... . In both cases, the &lt;/P&gt;&lt;P&gt;database table must be defined in the ABAP Dictionary. &lt;/P&gt;&lt;P&gt;Normally, records are inserted or updated only in the current &lt;/P&gt;&lt;P&gt;client. Data can only be inserted or updated using a view, if &lt;/P&gt;&lt;P&gt;the view refers to a single table and was created in the ABAP &lt;/P&gt;&lt;P&gt;Dictionary with the maintenance status "No restriction". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY belongs to the Open SQL command set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the statement has been executed, the system field &lt;/P&gt;&lt;P&gt;SY-DBCNT contains the number of edited lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward point if helpful.&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>Wed, 07 Nov 2007 10:58:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update/m-p/3010828#M711504</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-07T10:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update/m-p/3010829#M711505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the help in the ABAP editor. &lt;/P&gt;&lt;P&gt;Use the search on this forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update - record has to be on table.&lt;/P&gt;&lt;P&gt;Modify - if record is not there it will be inserted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2007 10:59:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update/m-p/3010829#M711505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-07T10:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update/m-p/3010830#M711506</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 will insert record if the row is not there in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE will not insert record if the row is not there in the table. It will return sy-subrc to 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In UPDATE you can update specific fields using SET addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No it is not necessary to use UPDATE after MODIFY statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check these links&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1729566"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1280539"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1280580"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2007 11:01:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update/m-p/3010830#M711506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-07T11:01:23Z</dc:date>
    </item>
  </channel>
</rss>

