‎2009 May 15 6:59 AM
Hello Friends,
I have a z table with 5 fields (all the key fields) and I want to delete all the table content and load fresh content from internal table.
I tried using syntax 'delete ztable' but sy-subrc value is coming as 4, means no table content is getting deleted.
Please suggest me any alternative way to delete all the database table content.
Thanks in advance,
Shreekant
‎2009 May 15 7:04 AM
Hi Shreeekant,
You can do on thing. First take all data in to the internal table for which u want to delete.
then use command DELETE <databse tablename> FROM TABLE <itab> .
It will delete all the etries from ur desired table.
Rgds,
Sachin.
‎2009 May 15 7:01 AM
Hi,
to delete a Ztable you can use key word : ' Delete from '
delete from Ztable.
try this
safel.
‎2009 May 15 7:02 AM
‎2009 May 15 7:02 AM
Using DELETE tablename or DELETE FROM tablename
or by writing some piece of code u can delete
tables: ztable.
data: itab type table of ztable.
select * from ztable into table itab.
if sy-subrc = 0.
delete ztable from table itab.
endif.
‎2009 May 15 7:04 AM
Need to use DELETE FROM <DATABASE TABLE>. Your statment works for internal tables.
‎2009 May 15 7:04 AM
Hi Shreeekant,
You can do on thing. First take all data in to the internal table for which u want to delete.
then use command DELETE <databse tablename> FROM TABLE <itab> .
It will delete all the etries from ur desired table.
Rgds,
Sachin.
‎2009 May 15 7:05 AM
Hi,
Got Transaction Se14 and delete activate and adjust by selecting radiobutton
' Delete Data'
It will work Fine.
Warm Regards,
rajesh S.
‎2009 May 15 7:09 AM
‎2009 May 15 7:39 AM
Go into the data browser area of ur table..
select the record u want to delete ...
put /h in the command line and enter .....now debugger will be on ... and from here u can do somthing ...
.. i dont know whether i sld disclose it openly !! Its little sensitive..
‎2009 May 15 7:42 AM
Hi,
try using
delete from ztable.
This will delete all records from your ztable. After this command u can fill your ztable from itab by the following command
select *
from std table
into corresponding fields of itab.
insert ztable from table itab.
Hopefully this will solve your problem.
Regards,
Ibrar