12-10-2015 9:57 PM
Hi,
We have some files in AL11 Directory, which i want to delete?
Can any one share some steps to delete these files.
Other Post on SCN could not solve my problem
12-10-2015 10:05 PM
Why not give a list of the files to Basis They can take care of it quickly without an ABAP solution.
Rob
12-10-2015 10:36 PM
Hello Nachiket,
A simple ABAP Code with the logic as below will help to delete files in AL11. (Sorry, I am not an ABAPer and my ABAP is not so good. You will have to tweak the code below a bit to make it work).
Create a Program in SE38 and define a screen to input the path where file in AL11 is stored.
Selection-screen begin of block b1 with frame title text -001.
(Define text element as "Enter File Path")
parameters: p_del type rlgrap-filename
Selection-screen end of block b1.
at selection-screen output.
perform f_delete_file.
form f_delete_file.
if (p_del is initial).
message 'Enter File Path, It cannot be blank' type I.
exit.
endif.
delete dataset p_del.
if sy-subrc = 0.
message 'File deleted Successfully' type I.
elseif sy-subrc <> 0.
message 'File not deleted' type I.
endif.
endform.
Cheers
Shiva
12-11-2015 11:00 AM
well you should at an absolute minimum use a logical path and add an authority check to avoid unauthorised deletion of files
12-11-2015 12:32 AM
12-11-2015 3:14 AM
12-11-2015 11:02 AM
CL_GUI_FRONTEND_SERVICES will probabyl not work here, as he wants to access files on the application server and not on the presentation server
12-11-2015 4:31 AM
Use Transaction N2UX
if not possible use SE93 and start the report for N2UX directly from SE38 or SA38.
Regards
felix