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 or delete

Former Member
0 Likes
729

Hi,

I want to know the basic difference between modify database table and update database table.

Thanks & Regards,

Abhishek Sarkar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
706

Hi,

Modify will update the existing record if record is present.

If record is not present it will insert a new record.

Update will update the existing record if record is present.

Reward if helpful.

6 REPLIES 6
Read only

Former Member
0 Likes
707

Hi,

Modify will update the existing record if record is present.

If record is not present it will insert a new record.

Update will update the existing record if record is present.

Reward if helpful.

Read only

0 Likes
706

Update will update the existing record else it will fail if the record is nt there.

and Modify will create a new records if the record is not present with the key combnation, else it will modify the record.

Regards

Vijay

Read only

Former Member
0 Likes
706

Hi Abhishek,

Modify will create a new record if the record which it needs to modify is not there in DB.

Update can nly update the records, if the record is not there then it will not do anything and sy-subrc will be 4.

Reward points if useful.

Regards,

Atish

Read only

Former Member
0 Likes
706

Hi,

Update will update the existing recorrds else it will not work if records not present

Modify will make changes to existing recors present in DB table,

If no records then it will create a new record in DB table..

regards,

nazeer

Read only

Former Member
0 Likes
706

Hi Abhishek,

The difference is that <b>update</b> only changes existing lines in the database table. <b>Modify</b> does the same, but also inserts lines if they don't exist in the database.

The syntax for update is:

UPDATE target source.

For modify:

MODIFY target FROM source

Greets,

Ivo

Read only

Former Member
0 Likes
706

hi abhishek,

there is a minute difference between Modify & Update.

<b>Modify</b> tries to make the prescribed change for a record. If it fails to find such a record, it inserts a new record with the prescribed values.

<b>Update</b> instead updates the table with the change and will not try to insert a new record no matter what.

<b>Award points if this is helpful</b>

Kiran