‎2007 May 14 1:34 PM
Hi all,
can any body provide a sample program to update/delete/modify ztable
thanks in advance
‎2007 May 14 1:40 PM
hi Siva,
Write update or modify or delete in your ABAP editor and place the cursor
on this key word, press F1, you will get the ABAP documentation along
with the syntax and sample code.
Hope this helps,
Sajan Joseph.
‎2007 May 14 1:49 PM
Hi Siva,
target means dbtable
INSERT INTO <target> VALUES <wa> .
INSERT <target> FROM <wa >.
UPDATE <target> FROM <wa> .
DELETE [FROM] <dbtab>
MODIFY TABLE <itab> FROM <wa> [TRANSPORTING <f1> <f 2> ...].
plz reward points if helpful
Thanks,
Suma.
‎2007 May 14 1:55 PM
Hi,
<b>UPDATE:-</b>
The Open SQL statement for changing data in a database table is:
UPDATE <target> <lines>.
It allows you to change one or more lines in the database table <target>. You can only change lines in an ABAP Dictionary view if it only contains fields from one table, and its maintenance status is defined as Read and change. You may specify the database table <target> either statically or dynamically.
<b>MODIFY:-</b>
To insert lines into a database table regardless of whether there is already a line in the table with the same primary key, use the following:
MODIFY <target> <lines>.
If the database table contains no line with the same primary key as the line to be inserted, MODIFY works like INSERT, that is, the line is added.
To insert or change several lines in a database table, use the following:
MODIFY <target> FROM TABLE <itab> .
<b>DELETE:-</b>
The Open SQL statement for deleting lines from a database table is:
DELETE [FROM] <target> <lines>.
It allows you to delete one or more lines from the database table <target>. You can only delete lines from an ABAP Dictionary view if it only contains fields from one table, and its maintenance status is defined as Read and change. You may specify the database table <target> either statically or dynamically.
Regards
Sudheer