Application Development and Automation 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: 
Read only

update modify

naveen_inuganti2
Active Contributor
0 Likes
1,135

Q: Modify and Update and insert.... any body send me the basic deffence among them? and if possible take one case and explain clearly? ( iam expecting more than F1 help )

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,115

Hi,

Modify is used to modify the existing entry in the internal table if the entry is not found it created the new entry

insert is to create the new entry in database table

update is to update the existing entry if the entry is not found statement fails

10 REPLIES 10
Read only

Former Member
0 Likes
1,115

Insert to add a new record

update to update an existing record

modify to update an existing record or add it if it doesn't exist.

Read only

Former Member
0 Likes
1,116

Hi,

Modify is used to modify the existing entry in the internal table if the entry is not found it created the new entry

insert is to create the new entry in database table

update is to update the existing entry if the entry is not found statement fails

Read only

Former Member
0 Likes
1,115

Hi,

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.

INSERT - Inserting Data in Database Tables

Reward if useful.

Regards,

Swetha.

Read only

Former Member
0 Likes
1,115

Modify table from wa.

if the record is there then it will update/modifies the record, if not it create the new entry.

and Update

update the record information

if the record is not there it will fail.

and insert.

Insert will create a new entry, if the key already there it will fail.

Read only

Former Member
0 Likes
1,115

Hi,

Insert --> is for inserting the new records or values

Update --> is for it will searches for the existing records if it exists it will updates that records and if it not available that records it will inserts that records

Modify--> is for Modifies existing records if that records is not available it won't do anything.

Regards

Ganesh

Read only

prasanth_kasturi
Active Contributor
0 Likes
1,115

hi,

insert statement inserts a new record based on the primary key.

it will not insert duplicate records,

update. we can change a record already present in the table

modify works both like insert and update. if record is not there it inserts and if record is already there it updates

regards

prasanth

Read only

Former Member
0 Likes
1,115

INSERT: using this if record already exist it cannot insert ..if record does not exist then insert a new record in the table.

MODIFY: using this statement if record already existed then it modify the content of the record..if record does not exist it try to insert that record as new record in the table.

UPDATE: using this if record already exist then it modify the content of the record..if record does not exist no effect on table.

So generally we use MODIFY statement mostly...

Reward if it useful.

Dara.

Read only

Former Member
0 Likes
1,115

hi check this..

all these are for the data base tables..

for insert check this..

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/insert.htm

for update check this..

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/update.htm

for modify check this..

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/modify.htm

these links had the test data also..

regards,

venkat

Read only

Former Member
0 Likes
1,115

UPDATE target source.

The statement UPDATE changes the content of one or more lines of the database table specified

Ie if we want to update a database table from an internal table or work area we use this syntax.

MODIFY target FROM source.

The MODIFY statement inserts one or several lines specified in source in the database table specified in target, or overwrites existing lines

ie if u want to insert new records as well as to update existing records of a database table from a internal table or work area we use MODIFY

INSERT

insers records into the database table from an internal table or work area

thyanks and regards

sarath p

Read only

Former Member
0 Likes
1,115

hi

Insert to add a new record

update to update an existing record

modify to update an existing record or add it if it doesn't exist.

Reward if Helpfull,

Naresh.