2008 Feb 25 9:53 AM
HI
WHAT IS THE DIFFERENCE BETWEEN MODIFY AND UPDATE
2008 Feb 25 9:56 AM
Hi,
Modify means it going to modify the record if it exists. If record is not there it going to add that record. Update means it is only modify the record.
Thanks
Sarada
2008 Feb 29 11:22 AM
2008 Feb 25 10:30 AM
Hi,
UPDATE Is used to modify a existing record,
where as modify fulfills both the requierment.
it modifys the record if it is already present.
or creates a new record if it is not present already.
reward points if its helpfull
regards
Chandrra
2008 Feb 25 10:30 AM
Hi,
MODIFY for Lists
Changes a list line.
Syntax
MODIFY LINE <n> [INDEX <idx>] [OF CURRENT PAGE|OF PAGE <p>]
|CURRENT LINE
LINE FORMAT <option1> <option2>...
FIELD VALUE <f1> [FROM <g1>] <f2> [FROM <g2>]...
FIELD FORMAT <f1> <options1> <f2> <options2>.
Changes either line <n> on the current or specified list (or page), or the last line to be chosen. The exact nature of the change is specified in the additions
MODIFY SCREEN
Changes the SCREEN table.
Syntax
MODIFY SCREEN...
Like changing an internal table. The system table SCREEN contains the names and attributes of all of the fields on the current screen.
UPDATE
Changes entries in database tables.
Syntax
UPDATE <dbtab> SET <si> = <f>
|<si> = <s i> + <f>
|<si> = <s i> - <f> [WHERE <cond>].
The value in the column <si> is set to the value <f>, increases it by <f>, or decreases it by <f> for all lines selected. The WHERE clause specifies the lines that are changed. If you omit the WHERE clause, all lines are changed.
Syntax
UPDATE <dbtab> FROM <wa>.
UPDATE <dbtab> FROM TABLE <itab>.
This deletes the line that has the same primary key as the work area <wa>, or deletes all the lines in the database that have the same primary key as a line in the internal table <itab>. The work area <wa> or the lines of the internal table <itab> must have at least the same length and alignment as the lines of the database table.
Hope it will be useful.
Regards,
Priya.
2008 Feb 25 10:39 AM
2008 Feb 25 11:04 AM
Lastly to modify the contents of the list, the modify command can be used. There are two approaches to this.
modify line <n> [index <idx>|of current page|of page <p>] [<modifications>].
This command is used to specify the list number, page and line that needs to be modified with the new values.
Modify current line [modifications].
This modifies the line last selected.
Tip : To avoid having to specify the modifications, make the changes to the variable SY-LISEL. These changes will be reflected in the list.
The format of a line can also be changed using the MODIFY..FORMAT command.
Eg:
Modify current line format color = 6.
update
if the record is already existing then the record is updated otherwise the record is added.
2008 Feb 26 4:35 AM
with modify option we can do the modifications to the already existing one.
with update we can do the update to the already existing one.if that is not there at that time it creates new one.
modify is onle modify the record if exists.
update is update the record.if not creates new one.
2008 Feb 26 4:43 AM
HI
UPDATE updates the existing record
MODIFY updates the existing record if record not found it creates new record
Edited by: Jyothsna M on Feb 26, 2008 5:43 AM
2008 Feb 29 11:32 AM
hi,
refer to the thread
With Modify Option, If the current record is already available in the
database, it will update the
Changes. If it not available it will insert as a new record.
INSERT - Add a new record into the database table.
MODIFY - If record is available it modifies otherwise it wont modify.
UPDATE - If record is available its update the record otherwise it creates a new record.
insert-used to insert the records modify-used for alter the table field names update-used for modify the data
insert:Insert a set of new datas into database table., update:Chance the existing data field in data base table., modify:If the record is present then you how to Update the datas otherwise,Insert the new data.,
Regards,
sreelakshmi
2008 Feb 29 2:08 PM
Hi Jyotsna,
The syntax for modify database table
MODIFY target FROM source.
The MODIFY statement inserts one or several lines specified in source in the database table specified in target, or overwrites existing lines.
UPDATE target source
The statement UPDATE changes the content of one or more lines of the database table specified in target. The entries in source determine which columns of which lines are changed, and how they are changed.
Thanks,
Meghana
2008 Mar 01 5:31 AM
MODIFY AND UPDATE hae different meainings in terms of database tables nd internal tables.
In the case of database tables modify will update and record if it is already existing.if the record does not exixt then modify will insert the record in the database table.
In the case of internal tables modify will change the record only if it exists and update will also change the record of an internal table.
2008 Mar 01 6:41 AM
hi,
These UPDATE is used only in database table... MODIFY is used in both DB and internal tables.
Modify:The MODIFY statement inserts one or several lines specified in source in the database table specified in target, or overwrites existing lines
Update:The statement UPDATE changes the content of one or more lines of the database table.
Thanks
Arunprasad.P
2008 Mar 01 9:03 AM
MODIFY - Change a database table
Variants
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 . If a line with the specified primary key already exists, an INSERT is executed. Otherwise, an UPDATE 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/4 Dictionary.
UPDATE
Variants
1. UPDATE dbtab SET s1 ... sn.
2. UPDATE dbtab. or
UPDATE *dbtab. or
UPDATE (dbtabname) ... .
3. UPDATE dbtab FROM TABLE itab. or
UPDATE (dbtabname) FROM TABLE itab.
Effect
Updates values in a database table (see Relational database ). You can specify the name of the database table either directly in the form dbtab or at runtime as contents of the field dbtabname . In both cases, the table must be known to the ABAP/4 Dictionary . If you specify the name of the database table directly, the program must also contain an appropriate TABLES statement. Normally, lines are updated only in the current client. Data can only be updated using a view if the view refers to a single table and was created in the ABAP/4 Dictionary with the maintenance status "No restriction".
UPDATE belongs to the Open SQL command set.
Hope this helps.
Thanks,
Balaji
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |