Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

diff between update and modify

Former Member
0 Kudos

hi everyone,

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

thakns

aafaq husain.

6 REPLIES 6

Former Member
0 Kudos

go through this link...

Former Member
0 Kudos

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

Former Member
0 Kudos

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..

Former Member
0 Kudos

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

former_member184569
Active Contributor
0 Kudos

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

Regards,

Susmitha

Former Member
0 Kudos

thanks