2006 Jun 19 2:04 PM
Hello ABAP Experts,
I have the data in the work area. I can modify / update / insert to the table.
How to write the ABAP code for this situation.
1) to delete any entries in the table
2) update this entry
so finally always there would be only one entry.
Suggestions appreciated.
Thanks,
BWer
2006 Jun 19 2:11 PM
Hi,
Delete the entries of table by this stmt.
DELETE FROM (dbtabname).
Then insert the values from workarea
INSERT INTO dbtab VALUES <work_area>.
And u can upadte the entry with values of workarea by this stmr.
UPDATE (dbtabname) FROM wa.
Dont use MODIFY. It will add a new record if its a new entry.
Rgds,
Prakash
Hello ABAP Experts,
I have the data in the work area. I can modify / update / insert to the table.
How to write the ABAP code for this situation.
1) to delete any entries in the table
2) update this entry
so finally always there would be only one entry.
Suggestions appreciated.
Thanks,
BWer
2006 Jun 19 2:07 PM
use update statement
update ztab from wa.
If there is a match with the same key fields, then the record will be updated, if not no updates wil be done.
Regards,
ravi
2006 Jun 19 2:11 PM
Hi,
Delete the entries of table by this stmt.
DELETE FROM (dbtabname).
Then insert the values from workarea
INSERT INTO dbtab VALUES <work_area>.
And u can upadte the entry with values of workarea by this stmr.
UPDATE (dbtabname) FROM wa.
Dont use MODIFY. It will add a new record if its a new entry.
Rgds,
Prakash
2006 Jun 19 2:18 PM
hi,
Delete the entries of table with
<b>DELETE FROM <dbtable>.</b>
For inserting the values from workarea Use
<b>INSERT INTO <dbtable> VALUES <wa>.</b>
For Updatimg the values from work area. Use
<b>UPDATE <dbtabname> FROM wa.</b>
Regards,
Santosh
2006 Jun 19 2:28 PM
Hi,
1) to delete any entries in the table
Delete From <database table name>
to delete specific entries
Delete From <database table name> where <condition>
2) update this entry
insert into <database table name> from <workarea>
Sameena
Message was edited by: sameena attarwala
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |