‎2006 Oct 26 3:42 PM
Hi people!
I need to take like eight files from the directory 'out' in the R/3 server. I need to create a program for this.
Exist a function that take me this eight files that beginning like example with 'Filetest*' ?
Thanks for the help.
‎2006 Oct 26 3:52 PM
Yes, I know that I can use a FTP to do that but the company don't want use a FTP or FTPS connection to do that. This is the reason because I check if exist other way like a function to do that.
Thanks!
‎2006 Oct 26 3:46 PM
‎2006 Oct 26 3:52 PM
Yes, I know that I can use a FTP to do that but the company don't want use a FTP or FTPS connection to do that. This is the reason because I check if exist other way like a function to do that.
Thanks!
‎2006 Oct 26 4:02 PM
Hi Carlos, please check the following progam. It will delete any file that starts with "TEST" in the OUT directory of your application server. Of course you can modify for you needs.
report zrich_0001 .
data: localfile type localfile.
data: filepathname type string.
data: ifile type table of salfldir with header line.
parameters: p_path type salfile-longname
default '/usr/sap/out/'.
select-options: s_file for localfile no intervals no-extension.
initialization.
s_file-sign = 'I'.
s_file-option = 'CP'.
s_file-low = 'TEST*'.
append s_file.
start-of-selection.
call function 'RZL_READ_DIR_LOCAL'
exporting
name = p_path
tables
file_tbl = ifile
exceptions
argument_error = 1
not_found = 2
others = 3.
loop at ifile where name in s_file.
concatenate p_path ifile-name into filepathname.
delete dataset filepathname.
endloop.
Regards,
Rich Heilman