2008 Apr 24 10:35 AM
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
2008 Apr 24 10:36 AM
2008 Apr 24 10:37 AM
2008 Apr 24 10:38 AM
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
2008 Apr 24 10:55 AM
Hi Frds
Thanks for ur information .
But i want to completly clear the ztable after writing data's from ztable.
Its urgent ,
By
Pari
2008 Apr 24 10:59 AM
And you can do it with clear ztable[]
This clears the whole table with all entries.
2008 Apr 24 10:44 AM
use the statement.
delete from z_tab [where condition].
Warm Regards
Kulvendra kumar