‎2007 Oct 16 4:38 AM
How to delete a file from presentation server afeter use in BDC
‎2007 Oct 16 8:29 AM
hi
it is very easy.
Afte processin the BDC write this code
delete dataset p_file
if sy-subrc eq 0.
message s000(8i) with text-004 P_FILE text-005.
else.
message s000(8i) with text-004 P_FILE text-006.
endif.
Regards
Shiva
‎2007 Oct 16 4:41 AM
Hi Sourav,
Use method CL_GUI_FRONTEND_SERVICES->FILE_DELETE
Regards,
Atish
‎2007 Oct 16 8:22 AM
Hi
Use the static method CL_GUI_FRONTEND_SERVICES->FILE_DELETE
or
You can use function "GUI_DELETE_FILE".
Reward if usefull
‎2007 Oct 16 8:29 AM
hi
it is very easy.
Afte processin the BDC write this code
delete dataset p_file
if sy-subrc eq 0.
message s000(8i) with text-004 P_FILE text-005.
else.
message s000(8i) with text-004 P_FILE text-006.
endif.
Regards
Shiva
‎2007 Oct 16 8:59 AM
Hi,
use the class method FILE_DELETE in the class CL_GUI_FRONTEND_SERVICES to delete a file from the presentation server..
DATA: rc TYPE i.
CALL METHOD cl_gui_frontend_services=>file_delete
EXPORTING
filename = 'C:\TEST_FILE.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.
WRITE: / sy-subrc.
‎2007 Oct 16 9:25 AM
Hi ,
For presentation server use the function GUI_DELETE_FILE
&
for application server use delete dataset file_name.
Thanks
Lalit
‎2020 Jun 03 9:16 PM
Try to use Long Path Tool, it really can help you with that. It will really help you to solve your problem.