11-16-2007 4:48 PM
Hi All,
I searched all the SDN , yet I couldn't find the answer to this question. I need a way to delete local files. Can something like this be achieved in version 4.6C ?
Thanks in advance.
11-16-2007 4:51 PM
You mean Unix server file then you can use DELETE Dataset filename.
Thanks
Seshu
11-16-2007 4:51 PM
You mean Unix server file then you can use DELETE Dataset filename.
Thanks
Seshu
11-16-2007 4:53 PM
11-16-2007 4:54 PM
11-16-2007 4:56 PM
Hi,
I am not in front of system..but check in SE37 using GUIdelete* you may find something.
Regards,
Atish
Message was edited by:
Atish Sarda
11-16-2007 4:56 PM
Then you can use FM WS_FILE_DELETE or Satish mentioned logic
Thanks
Seshu
11-16-2007 4:53 PM
Hi,
Use below code to delete the local file.
CALL METHOD cl_gui_frontend_services=>file_delete
EXPORTING
filename = 'C:TEST.TXT'
CHANGING
rc = rc
EXCEPTIONS
file_delete_failed = 1
cntl_error = 2
error_no_gui = 3
file_not_found = 4
access_denied = 5
unknown_error = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Reward if this helps,
Satish