Skip to Content
avatar image
Former Member

diff between update and modify

hi everyone,

plz help me in findind the difference between update and modify statements in open sql.

thakns

aafaq husain.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    May 30, 2006 at 06:05 AM

    go through this link...

    update-and-modify

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 30, 2006 at 06:09 AM

    MODIFY - Will update the table, if the data already exists, if NOT inserts new rows.

    UPDATE - Will update the table, errors out if the data is not found.

    In case of MODIFY the sy-subrc is always 0 so you would't know whether the data is actually updated or not.

    Regards,

    Ravi

    Note : Please mark the helpful answers

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 30, 2006 at 06:09 AM

    hi,

    modify means if record is not present it'll creat a new one.if record is present it'll modify it...

    but update if record is present then only it modifies..

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 30, 2006 at 06:10 AM

    Hi Husain!

    Upadte: If the key record is existing in the DBtable the key record will update success fully then sy-subrc will eq 0 or else update fails and sy-subrc will non-zero.

    Modify: if the key record is existing in the DBtable then the the record will update/modify else if the key record is not existing then it will insert the new record

    in dbtable.

    simply to say:

    modify play two roles upadate and insert depends on record existing or not.

    cheers

    ganesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 30, 2006 at 06:18 AM

    HI Hussain,

    'Insert' will add a new record or a new row into the database table.

    'Update' will modify a record in the DB table.

    'Modify' it is a combination of both insert and update...

    Also check these links

    diff-between-update-and-modify

    update-and-modify

    Regards,

    Susmitha

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 12, 2007 at 12:25 PM

    thanks

    Add comment
    10|10000 characters needed characters exceeded