‎2007 May 15 10:42 AM
Hi all,
I all i want to delete files(txt) from application server is there any abap statement by which i can delete it by specifying the path of that file
Regards
Amar
‎2007 May 15 11:18 AM
hi amar
we can delete the txt file by using
DELETE DATASET <data set name> (here u can give exact path of the file where it is stored)
if sy-subrc eq 0.
write : 'file is deleted'.
else.
write : 'it is not deleted'.
endif.
‎2007 May 15 10:43 AM
‎2007 May 15 10:43 AM
Hi!
Check this out:
DELETE DATASET '/tmp/test.txt'.
IF SY-SUBRC <> 0.
WRITE: / 'Error in deleting'.
ELSE.
WRITE; / 'File deleted'.
ENDIF.
Regards
Tamá
‎2007 May 15 10:44 AM
write program in se38 using this syntax.
DELETE DATASET <dataset name> syntax.
or use FM <b>EPS_DELETE_FILE</b>
‎2007 May 15 10:45 AM
Hi,
You can delete a folder in application server by using function module <b>WBMR_DELETE_APPL_FOLDER</b>
If you want to delete the txt files, get the list of txt files in the given folder and
open the file in write mode again and close it. Then, the content in txt file will be cleared and blank files will be stored.
Regards
Sailaja.
‎2007 May 15 11:18 AM
hi amar
we can delete the txt file by using
DELETE DATASET <data set name> (here u can give exact path of the file where it is stored)
if sy-subrc eq 0.
write : 'file is deleted'.
else.
write : 'it is not deleted'.
endif.