2008 Feb 14 8:22 PM
Hi Experts,
i need to delete a txt file after reading it. Im using this function module
GUI_DELETE_FILE
It deletes the file. but it rerurns FAILED exception, if any one has used that function module before could you advice me rearding this.
I would really appreciate if anyone can help to solve this issue.
Thanks in advance,
Lahiru.
Edited by: Lahiru Jayasundara on Feb 14, 2008 9:22 PM
2008 Feb 14 8:33 PM
Hi Experts,
i need to delete a txt file after reading it. Im using this function module
GUI_DELETE_FILE
It deletes the file. but it rerurns FAILED exception, if any one has used that function module before could you advice me rearding this.
I would really appreciate if anyone can help to solve this issue.
Thanks in advance,
Lahiru.
Edited by: Lahiru Jayasundara on Feb 14, 2008 9:22 PM
2008 Feb 14 8:33 PM
2008 Feb 15 5:14 AM
Hi SL,
yes. i tried that. GUI_FILE_DELETE is replacement of WS_DELETE. SAP doesnt recommand WS_ function module.
Thanks a lot for your reply.
Lahiru.
2008 Feb 15 3:45 PM
Hi again,
I know what GUI_UPLOAD requires a *.dat file
Have you tried using GUI_DELETE_FILE and deleting a .dat ?? Does this return the same error?
Good luck!
SL
2008 Feb 15 4:05 PM
Hello,
Do like this.
GUI_DELETE_FILE usually fails at first call >> try up to 3 times*
ld_localfile = id_fname.
DO 3 TIMES.
" GUI_DELETE_FILE usually fails at first call >> try up to 3 times
CALL FUNCTION 'GUI_DELETE_FILE'
EXPORTING
file_name = ld_localfile
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
EXIT.
ENDIF.
ENDDO.
IF sy-subrc <> 0.
MESSAGE e154(g00) WITH id_fname.
ENDIF.
Hope this will solve ur issue.
Cheers,
Vasanth
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |