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

delete all content in a database table

Former Member
0 Likes
520

i want to initialize a database table just before my specific program terminate.

can i use the


delete databasetable

Edited by: Matt on Nov 7, 2008 8:04 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
496

Hi try,

delete from dbtab client specified where mandt = sy-mandt.

Darren

3 REPLIES 3
Read only

Former Member
0 Likes
497

Hi try,

delete from dbtab client specified where mandt = sy-mandt.

Darren

Read only

Former Member
0 Likes
496

Yes, if it is a custom table which you are using just for your program purpose. Please check the dependency before you write your code for that.

Thanks,

Jayant

Read only

Former Member
0 Likes
496

Hi,

If you want to delete all the contents of database table, use the following code:

data itab type standard table of dbtab.

select * from dbtab into table itab.

delete dbtab from table itab.

Hope this will help.

Regards,

Nitin.