<?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 modify and update commands in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499844#M231673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;    Plz tell me the differences between MODIFY  and UPDATE Statements.IS IT NECESSARY TO USE UPDATE Statement AFTER MODIFY Statemant. Thanx in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Aug 2006 04:22:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-08-28T04:22:15Z</dc:date>
    <item>
      <title>modify and update commands</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499844#M231673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;    Plz tell me the differences between MODIFY  and UPDATE Statements.IS IT NECESSARY TO USE UPDATE Statement AFTER MODIFY Statemant. Thanx in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 04:22:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499844#M231673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-28T04:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: modify and update commands</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499845#M231674</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 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;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;SImha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Please mark all the helpful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 04:27:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499845#M231674</guid>
      <dc:creator>Simha_</dc:creator>
      <dc:date>2006-08-28T04:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: modify and update commands</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499846#M231675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'Insert' will add a new record or a new row into the database table. &lt;/P&gt;&lt;P&gt;'Update' will modify a record in the DB table. &lt;/P&gt;&lt;P&gt;'Modify' it is a combination of both insert and update... &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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 04:27:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499846#M231675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-28T04:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: modify and update commands</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499847#M231676</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;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 04:30:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499847#M231676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-28T04:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: modify and update commands</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499848#M231677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update Statement will modify the existing record .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify statement will modify the existing record if the record exists .. else creates a new record..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 04:32:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499848#M231677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-28T04:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: modify and update commands</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499849#M231678</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;UPDATE-&amp;gt;&lt;/P&gt;&lt;P&gt;Bundling using Function Modules for Updates&lt;/P&gt;&lt;P&gt;If you call a function module using the statement CALL FUNCTION ... IN UPDATE TASK, the function module is flagged for execution using a special update work process. This means that you can write the Open SQL statements for the database changes in the function module instead of in your program, and call the function module at the point in the program where you would otherwise have included the statements. When you call a function module using the IN UPDATE TASKaddition, it and its interface parameters are stored as a log entry in a special database table called VBLOG. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module is executed using an update work process when the program reaches the COMMIT WORKstatement. After the COMMIT WORKstatement, the dialog work process is free to receive further user input. The update work process is responsible for the update part of the SAP LUW. The statement COMMIT WORKcloses the SAP LUW for the dialog part of the program and starts the update. The SAP LUW is complete once the update process has committed or rolled back all of the database changes. Bundling using function modules is called Update. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY-&amp;gt;&lt;/P&gt;&lt;P&gt;To modify the lines of a completed list from within the program, use the MODIFY LINE statement. There are two ways to specify the line you want to modify:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·              Explicitly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY LINE n &lt;A href="OF CURRENT PAGE"&gt;INDEX idx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;              &lt;A href="https://community.sap.com/modifications"&gt;&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can refer to the line most recently read:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY CURRENT LINE &lt;A href="https://community.sap.com/modifications"&gt;&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement modifies the line most recently read by means of line selection (F2) or read by the READ LINE statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from the ones described above, the modificationsaddition contains several other possibilities to modify the line. For more information on this and on the individual additions of the MODIFY LINEstatement , refer to the keyword documentation.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba4b235c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba4b235c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2ND Q-&amp;gt;&lt;/P&gt;&lt;P&gt;IT IS NOT NECESSARY.&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;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 04:37:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499849#M231678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-28T04:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: modify and update commands</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499850#M231679</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 have the following statement in my program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MODIFY ZDBTABLE FROM INTERNAL_TABLE&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ZDBTABLE&lt;/STRONG&gt; has two records.  There are two records in &lt;STRONG&gt;INTERNAL_TABLE&lt;/STRONG&gt; as well.  I expect the MODIFY statement to change last field of all records in database table.  It only changes one record - the last record only.  Why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Feb 2011 18:39:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499850#M231679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-27T18:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: modify and update commands</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499851#M231680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your statement below,&lt;/P&gt;&lt;P&gt;MODIFY ZDBTABLE FROM INTERNAL_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here do INTERNAL_TABLE delcared with header line? If yes it is considering the header line data.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To consider the whole table, try like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODIFY ZDBTABLE FROM TABLE&lt;/P&gt;&lt;P&gt;                                         INTERNAL_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the effect of this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an internal table is specified, the system processes all lines in the internal table according to the rules for the work area. The line type of the internal table has to meet the requirements for use in Open SQL statements. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the change to a line in the internal table would lead to a double entry in a unique secondary index, the corresponding line is not inserted and sy-subrc is set to 4. If the internal table is empty, sy-subrc is set to 0. The sy-dbcnt system field is always set to the number of lines that were actually processed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Feb 2011 12:03:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modify-and-update-commands/m-p/1499851#M231680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-28T12:03:40Z</dc:date>
    </item>
  </channel>
</rss>

