Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

update/modify/delete ztable

Former Member
0 Likes
513

Hi all,

can any body provide a sample program to update/delete/modify ztable

thanks in advance

3 REPLIES 3
Read only

Former Member
0 Likes
481

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.

Read only

Former Member
0 Likes
481

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.

Read only

Former Member
0 Likes
481

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