2008 Jul 30 5:03 PM
Hi Guys,
How to delete all entries from a table?
is a customer table, and i dont want to delete doing a loop.
because is a huge table.
any ideas?
PS: ..CUSTOMER TABLE...
2008 Jul 30 5:11 PM
Quick way is to use native SQL (ie EXEC SQL ENDEXEC) and the TRUNCATE commaned.
Alternatively use ABAP command DELETE:
DELETE from <tab> client-specified where mandt = '001'.
2008 Jul 30 5:05 PM
hi,
Write a custom program and write the below code ..
delete <ztable>.
Regards,
Santosh
2008 Jul 30 5:10 PM
DELETE Does not work like that.
you need at least one from with a where condition.
I tried
DELETE FROM ztable
client especified
where mandt = sy-mandt.
but is not working.
2008 Jul 30 5:06 PM
2008 Jul 30 5:08 PM
2008 Jul 30 5:09 PM
From SE14.
give table name than edit select redio button delete data .
2008 Jul 30 5:11 PM
Quick way is to use native SQL (ie EXEC SQL ENDEXEC) and the TRUNCATE commaned.
Alternatively use ABAP command DELETE:
DELETE from <tab> client-specified where mandt = '001'.
2008 Jul 30 5:55 PM
Does not work
I solved the problem, but the performance is not as good as i wanted.
SELECT *
INTO CORRESPONDING FIELDS OF ti_ztable
FROM ztable.
DELETE FROM ztable
WHERE key = ti_zce1pisa-key.
ENDSELECT.
2008 Jul 30 6:25 PM
Javier,
have you tried this?
From SE14.
give table name than edit select redio button delete data .
2008 Jul 30 9:47 PM
Of course that is an option,
but i need that in ABAP code. (call transaction for only a delete is 2 much)
tks anyway.
2008 Jul 30 10:06 PM
if you need a condition...you can use a dummy one...
DELETE FROM ztable
where 1 = 1.
2008 Jul 30 10:11 PM
2008 Jul 30 5:16 PM
hi,
Create a table maintainence generator and then goto SM30 and delete the entries from here ...
Regards,
Santosh