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

deleting ztable

Former Member
0 Likes
977

Hi frd

After writing output from ztable ,i wants to delete all values in ztable.

Can anyone give me coding for these .

Thanks

By

Pari

Hi frd

After writing output from ztable ,i wants to delete all values in ztable.

Can anyone give me coding for these .

Thanks

By

Pari

6 REPLIES 6
Read only

Former Member
0 Likes
963

Hi,

Just write as DELETE ZTABLE.

Regards,

Satish

Read only

Former Member
0 Likes
963

Hi,

clear ztable[].

regards

Nicole

Read only

Former Member
0 Likes
963

Using DELETE statement

Below is the syntax:

DELETE dbtab

Syntax

DELETE { {FROM target WHERE sql_cond}

| {target FROM source} }.

Effect

The statement DELETE deletes one or more rows from the database table specified in target. The rows that are to be deleted are specified either in a WHERE condition sql_cond or with data objects in source.

System Fields

The statement DELETE sets the values of the system fields sy-subrc and sy-dbcnt.

sy-subrc Meaning

0 A least one row was deleted.

4 At least one row could not be deleted, since it was not found in the database table.

The statement DELETE sets sy-dbcnt to the number of deleted rows.

DELETE dbtab - cond

Syntax

... WHERE sql_cond.

Effect

The WHERE addition uses a logical expression sql_cond to specify which rows in the database table are deleted. The same applies to the logical expression sql_cond as for the WHERE condition of the SELECT statement, with the exception that no subqueries can be executed on the database table to be changed. If there is no row in the database that satisfies the WHERE condition, no row is deleted and sy-subrc is set to 4. If no WHERE condition is specified, all rows are deleted.

I hope it helps.

Thanks,

Vibha

Please mark all the useful answers

Read only

0 Likes
963

Hi Frds

Thanks for ur information .

But i want to completly clear the ztable after writing data's from ztable.

Its urgent ,

By

Pari

Read only

0 Likes
963

And you can do it with clear ztable[]

This clears the whole table with all entries.

Read only

Former Member
0 Likes
963

use the statement.

delete from z_tab [where condition].

Warm Regards

Kulvendra kumar