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: 

hi guru's what is yhe difference bitween modify and update

Former Member
0 Kudos
313

hi guru's what is yhe difference bitween modify and update

1 ACCEPTED SOLUTION
8 REPLIES 8

sreeramkumar_madisetty
Active Contributor
0 Kudos
226

Hi sri

Modify : if record exists , it will modify

Update: if record exists , it will modify otherwise it will create the record.

Regards,

Sree

Former Member
0 Kudos
226

Simply press F1 on both.

Rob

Former Member
0 Kudos
226

Update- Updates the database table. Can use a WHERE condition also

Modify- If the record is present in the database table it performs the update

function. If there is no record then it inserts a new record.

Modify can be used for an internal table. In internal tables, only one field of a particular record can be modified using TRANSPORTING statement

But there is no Update statement for an internal table.

Former Member
0 Kudos
226

Modify will modify and Update will modify if it exists or will create the record

Modify can be done on both internal tables and database tables but Update is not possible on internal table

Prince

Former Member
0 Kudos
226

Hi,

MODIFY will insert record if the row is not there in the table.

UPDATE will not insert record if the row is not there in the table. It will return sy-subrc to 4.

In UPDATE you can update specific fields using SET addition.

Reward if helpful.

Regards,

Harini.S

Former Member
0 Kudos
226

Hi Sri,

1) Update will only update the record in teh database table ,depending upon the condition u specified in the update command.

it will fail if the record does not exists in the table..mean to say it wil return Sy-subrc as zero then.

2) Modify - will do an update if record exists otherwise it wil create a new record in db table if record does not exists.

Press F1 in ur code on Update or MOdify ,u will find more on that

Reward points, if useful..

Regards,

Nitin

Former Member
0 Kudos
226

<a href="http://www.sapinfo.quotaless.com/lesson_49.htm">MODIFY</a>

<a href="http://www.sapinfo.quotaless.com/lesson_57.htm">UPDATE</a>