‎2009 Jul 17 9:02 AM
Hi experts,
i have transparent table and i would like to use faster delete
i don't want to use
DELETE FROM table CLIENT SPECIFIED WHERE mandt = sy-mandt, it takes much time for mil. rows.
Does ABAP know something similar as DROP TABLE
Thanks
Martin
‎2009 Jul 17 9:05 AM
erm. you are aware that drop table wont delete your records but the whole table?
remove your client specified addition, maybe this speeds him up a bit, since you are thinking of dropping the table, there are probabaly no records you wish to keep.
‎2009 Jul 17 9:07 AM
‎2009 Jul 17 9:09 AM
The FM 'DB_TRUNCATE_TABLE'.
There are a bunch of FM about DB management.
You can go to SE37 and search 'DB*' FM
There is also the DB_DROP_TABLE FM..
Edited by: Simone Milesi on Jul 17, 2009 10:09 AM
‎2009 Jul 17 9:07 AM
Hello,
If allowed in your project or in program you can also you DROP TABLE using native SQL.
Sudo Syntax is:
EXEC SQL.
DROP TABLE <table_name>.
ENDEXEC.
Note: Native SQL's are avoided due to the performance overhead and are limited to support of specific database used at backend.
Thanks,
Augustin.
‎2014 Jun 09 1:21 PM
Hi
It is possible delete table using ABAP variable?
like this (but give a error)
DATA: tabName TYPE string.
tabName = 'tab01'.
EXEC SQL.
DROP TABLE :tabName
ENDEXEC.
Thank you