The difference between INSERT, UPDATE, and MODIFY

Here's a very common syntactic question: What's the difference between INSERT, UPDATE, and MODIFY?
The answer is plain and simple:

INSERT - inserts a new record. INSERT expects that a record with the required key does NOT exist in the table. Therefore, if a record with the same key already exists, a runtime error occurs. For more details on INSERT, visit here.

UPDATE - update an existing record. UPDATE expects that a record with required key exists in the table. If a record with the required key does not exist, it issue an error (sy-subrc is 4). For more details on UPDATE, visit here.

MODIFY - acts like a combination of INSERT and UPDATE. If a record with the specified key does not exist, it adds it to the table. If a record with the specified key does exist, it modifies it. So MODIFY actually acts like "Insert or change record". To read more about MODIFY, visit here.

To summarize:
INSERT - adds a new record to the table. If the row (key) exists, issues an error.
UPDATE - updates an existing record to the table. If the row (key) does not exist, issues an error.
MODIFY - If the key exists, modifies the record. If the key does not exist, adds the record to the table.

12 comments:

Tibco Online Training April 22, 2014 at 11:44 AM  

It was so nice article.I was really satisfied by seeing this article and we are
also giving tibco online training.ItTibco

online training
is one of the best
online training center

21st Century Software Solutions June 5, 2014 at 3:21 AM  

SAP ABAP Online Training -
Click Here For Enquiry - http://www.21cssindia.com/courses/sap-abap-online-training-207.html
Introduction to SAP and different modules of SAP - Introduction to R/3 Architecture and ABAP - Data dictionary - Domains - Data elements - Search helps - Tables - Lock objects - Different data types - String operations - Selection screen - Modularization techniques - Subroutines - Function modules -

Anonymous,  June 27, 2014 at 11:51 PM  

I will recommend you site for freshers and starters, they will get brief information on abap. I am an sap hana professional and we give SAP ABAP ONLINE TRAINING .there is plenty more that is covered by a sap training module.
ABAP syntax is almost similar to COBOL language. It was the first language that includes the concept of Logical Databases.
All ABAP programs stored inside the SAP databases and executed under the control of the run-time system, which is part of the SAP kernel.

SAP ABAP ONLINE TRAINING

Anonymous,  June 27, 2014 at 11:51 PM  

I will recommend you site for freshers and starters, they will get brief information on abap. I am an sap hana professional and we give SAP ABAP ONLINE TRAINING .there is plenty more that is covered by a sap training module.
ABAP syntax is almost similar to COBOL language. It was the first language that includes the concept of Logical Databases.
All ABAP programs stored inside the SAP databases and executed under the control of the run-time system, which is part of the SAP kernel.

SAP ABAP ONLINE TRAINING

Unknown August 4, 2014 at 10:48 PM  

Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!

SAP ABAP Training in Chennai

sam November 8, 2014 at 12:47 AM  

Want a blossoming future? Want to work for several companies at the same time earning your share from each one of them? Want to travel the world and work mostly in North America? Then SAP training at shivansh.co.in is the right choice. Join a SAP certified partner and education centre today and expose yourself to a diverse global career.

Unknown January 26, 2015 at 10:10 AM  

After reading this post I got an idea about on this note.Really something grate in this article ,Thanks for sharing this. We are providing SAP courses training online. After reading this slightly am changed my way of introduction about my training to people. To know more Visit Us SAP PM Online Training Course

kbs training institute July 1, 2015 at 3:42 AM  

I have gathered info in the different areas in this blog and the nice approach is visible in this blog. This is really very happy for the nice technology in this blog and the amazing services in this blog. servicenow training in hyderabad|servicenow administration training|servicenow intergration online trainng

peterjohn September 10, 2015 at 7:24 AM  

Pretty good post. I just came across your site and wanted to say that I’ve really enjoyed reading your posts. In any case I’ll be subscribing to your feed and I hope you will keep a good work!Cheer!

sap online training
software online training
sap sd online training
hadoop online training
sap-crm-online-training

peterjohn September 10, 2015 at 7:25 AM  

This is one awesome blog article. Much thanks again.
I really enjoy the blog.Much thanks again. Really Great.


oracle online training
sap fico online training
dotnet online training
qa-qtp-software-testing-training-tutorial

Unknown October 12, 2015 at 8:23 AM  

Thank you for the course content On Servicenow Administration Online Training it will be Most usefull for Beginners

About This Blog

This blog contains tips, tricks, tutorial, and some of my personal experiences with the SAP ABAP language.

FEEDJIT Live Traffic Feed

  © Blogger templates The Professional Template by Ourblogtemplates.com 2008

Back to TOP