2007 Feb 19 3:03 PM
Hi,
I want to delete the contents of my table. I have the following requirements:
(*) i want to specify the table name dynamically
(*) i dont want to provide any where/from condition in the delete statement
(*) i want to delete all the contents of the database.
<b>I am working on 4.0B version.</b>
Is this possible ?
thanks
2007 Feb 19 3:13 PM
Hi Navneeth,
PARAMETERS:
pa_dbnam TYPE tabname.
DELETE FROM (pa_dbnam)
WHERE mandt = syst-mandt.
Ofcourse this is a VERY dangerous progam!
Regards,
John.
Hi Navneeth,
PARAMETERS:
pa_dbnam TYPE tabname.
DELETE FROM (pa_dbnam)
WHERE mandt = syst-mandt.
Ofcourse this is a VERY dangerous progam!
Regards,
John.
2007 Feb 19 3:13 PM
Hi Navneeth,
PARAMETERS:
pa_dbnam TYPE tabname.
DELETE FROM (pa_dbnam)
WHERE mandt = syst-mandt.
Ofcourse this is a VERY dangerous progam!
Regards,
John.
2007 Feb 19 3:15 PM
hi,
i dont want to specify any where condition. and i dont have any mandt field , i want to delete a custom table
2007 Feb 19 3:16 PM
Personally, I wouldn't do this, but this should meet your requirements:
REPORT ztest MESSAGE-ID 00.
DATA: tab(10) VALUE 'ZTAB'.
DELETE FROM (tab).Rob
2007 Feb 19 3:21 PM
HI,
Its now working in 4.0B its giving a error
"DELETE FROM dbtab" must be followed by "WHERE".
2007 Feb 19 4:47 PM
Then you will have to go to the data dictionary for the table, find a key field and add that to a dynamic WHERE.
Rob
2007 Feb 19 3:27 PM
Hi,
Do you have this standard program RADCVBTC in 4.0B?
If you do then you can use to delete all contents of your custom program.
Also you can use database utility (SE14) to delete as well (if exits in 4.0B).
Regards,
Ferry Lianto
2007 Feb 19 3:50 PM
Hi,
Make use of this:
Delete Dbtab(D/b table) from itab.
this will delete all the contents of the d/b table ,
urs,
seshu
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |