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: 

Update or delete

Former Member
0 Kudos

Hi,

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

Thanks & Regards,

Abhishek Sarkar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

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

former_member588853
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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