05-30-2006 7:04 AM
hi everyone,
plz help me in findind the difference between update and modify statements in open sql.
thakns
aafaq husain.
05-30-2006 7:05 AM
05-30-2006 7: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
05-30-2006 7: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..
05-30-2006 7: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
05-30-2006 7:18 AM
04-12-2007 1:25 PM