Modify (or) Update: this statement is normally preferble to insert or modify the D/B table, because system will check the table before insert the record, if it is exists, then it modifys that record, if not it created new record,
where as if you use Insert statement, it only try's to Insert the Record into D/B table, Even if it is already exists also, some times there is a chance to get Short Dump also....
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
1. INSERT INTO dbtab CLIENT SPECIFIED VALUES wa.
INSERT INTO (dbtabname) CLIENT SPECIFIED VALUES wa.
2. INSERT dbtab CLIENT SPECIFIED FROM TABLE itab. oder
INSERT (dbtabname) CLIENT SPECIFIED FROM TABLE itab.
3. INSERT dbtab CLIENT SPECIFIED. oder
INSERT *dbtab CLIENT SPECIFIED. oder
INSERT (dbtabname) CLIENT SPECIFIED ... .
Effect Adds new records to a database table (see relational
database). You can specify the name of the database table
either directly in the program in the form dbtab or at runtime
as the contents of the field dbtabname. In either case, the
database table must be declared in the ABAP Dictionary. You
can only insert data using a view if the view refers to a
single table and has the maintenance status "No restriction"
in the ABAP Dictionary.
By default, data is only inserted in the current client.
However, if you use the CLIENT SPECIFIED addition, you can
switch off the automatic client handling. This enables you to
enter data for any client in a cross-client table, not just in
the client in which you are logged on. In this case, the
client field is treated like a normal field to which you can
assign a value in the work area.
MODIFY - Change a database table
1. MODIFY dbtab. or
MODIFY *dbtab. or
MODIFY (dbtabname) ... ..
2. MODIFY dbtab FROM TABLE itab. or
MODIFY (dbtabname) FROM TABLE itab.
3. MODIFY dbtab VERSION vers. or
MODIFY *dbtab VERSION vers.
Effect Inserts new lines or updates existing lines in a database
table (s. relational database). If a line with the specified
primary key already exists, an UPDATE is executed. Otherwise,
an INSERT is performed. You can specify the name of the
database table either in the program itself in the form MODIFY
dbtab ... or at runtime as the contents of the field dbtabname
in the form MODIFY (dbtabname) ... . In both cases, the
database table must be defined in the ABAP Dictionary.
Normally, records are inserted or updated only in the current
client. Data can only be inserted or updated using a view, if
the view refers to a single table and was created in the ABAP
Dictionary with the maintenance status "No restriction".
MODIFY belongs to the Open SQL command set.
When the statement has been executed, the system field
SY-DBCNT contains the number of edited lines.
'Insert' will add a new record or a new row into the database table.
'Update' will modify a record in the DB table.
'Modify' it is a combination of both insert and update...
Also check these links
Bundling using Function Modules for Updates
If you call a function module using the statement CALL FUNCTION ... IN UPDATE TASK, the function module is flagged for execution using a special update work process. This means that you can write the Open SQL statements for the database changes in the function module instead of in your program, and call the function module at the point in the program where you would otherwise have included the statements. When you call a function module using the IN UPDATE TASKaddition, it and its interface parameters are stored as a log entry in a special database table called VBLOG.
The function module is executed using an update work process when the program reaches the COMMIT WORKstatement. After the COMMIT WORKstatement, the dialog work process is free to receive further user input. The update work process is responsible for the update part of the SAP LUW. The statement COMMIT WORKcloses the SAP LUW for the dialog part of the program and starts the update. The SAP LUW is complete once the update process has committed or rolled back all of the database changes. Bundling using function modules is called Update.
To modify the lines of a completed list from within the program, use the MODIFY LINE statement. There are two ways to specify the line you want to modify:
MODIFY LINE n OF CURRENT PAGE
You can refer to the line most recently read:
MODIFY CURRENT LINE modifications.
This statement modifies the line most recently read by means of line selection (F2) or read by the READ LINE statement.
Apart from the ones described above, the modificationsaddition contains several other possibilities to modify the line. For more information on this and on the individual additions of the MODIFY LINEstatement , refer to the keyword documentation.
Check out the thread