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

how to delete the database table

Nawanandana
Active Contributor
0 Likes
904

hi all

i want to delete the data from the custrmize table so if u can heilp me to do that....not the internal table ..i write the code but that using that code i can delete only one raw.. but i want to delete all raw in my table..

ZLAB_SUBMIT-SHADE = '1'.

ZLAB_SUBMIT-SUBMIT = '1'.

ZLAB_SUBMIT-RM = 'RINGS'.

ZLAB_SUBMIT-REMARKS = 'Approved'.

ZLAB_SUBMIT-AP = ''.

ZLAB_SUBMIT-USNAM = 'INDIKAF'.

ZLAB_SUBMIT-CPUDT = '05.10.2006'.

ZLAB_SUBMIT-CDATE = '05.10.2006'.

ZLAB_SUBMIT-CPUTM = '21:29:19'.

DELETE ZLAB_SUBMIT.

regard

nawa

this is my code....

to delete all entries from the table you need to supply a where clause which will be true for all records. If your table is client dependent you can say:

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

Otherwise pick something you know will NEVER be true and use <> that:

delete from zlab_submit where shade <> '?'.

7 REPLIES 7
Read only

former_member188770
Active Participant
0 Likes
880

Hi,

U will have to use the below statement

Delete from ZLAB_SUBMIT where (Condition).

Thanks,

Poonam

Read only

0 Likes
880

A where clause is mandatory while you delete from a table. Specifying the client is the most efficient way.

Delete from ZLAB_SUBMIT client specified where mandt = sy-mandt.

Read only

former_member186741
Active Contributor
0 Likes
880

to delete all entries from the table you need to supply a where clause which will be true for all records. If your table is client dependent you can say:

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

Otherwise pick something you know will NEVER be true and use <> that:

delete from zlab_submit where shade <> '?'.

Read only

Former Member
0 Likes
880

hi,

use Delete from <table> where <conditon>

Read only

0 Likes
880

If you just want to delete all the rows from a program

use DELETE from <ZTABLE> where <CONDITION>.

or else if u have created a table maintenance generator, goto SM31, select all entries and delete them.

Regards

- Gopi

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
880

Hi,

data itab type standard table of zlab_submit.

select * from zlab_summit into table itab.

delete zlab_summit from table itab.

Kindly reward points by clicking the star on the left of reply,if it helps.

Read only

0 Likes
880

Hi,

U can use the delete statement

delete from <tablename> where <condition>.