10-11-2006 3:46 PM
I am using the FM WS_FILENAME_GET to have the user supply the path and filename. I am using RSFTP002 to get the file from the app server and put it in the user specified path. I need to able to split out the filename from the path so that I can build the command to change to the directory supplied by the user.
I am looking at the split command and figured that I would have to split based on the \ character. I would then have to loop thru each field to find the empty field and the file name would be in the previous field. I would then concatenate fields up to the field that contains the file name to get the path.
Is there and easier way to handle this?
is the way that I described the only way to do this?
thanks in advance for your help
10-11-2006 3:51 PM
Hello Timothy
Try function module PC_SPLIT_COMPLETE_FILENAME
There are other FMs that may work as well.
Try using se37 and looking for FMs name filename*
Greg Kern
10-11-2006 3:51 PM
Hello Timothy
Try function module PC_SPLIT_COMPLETE_FILENAME
There are other FMs that may work as well.
Try using se37 and looking for FMs name filename*
Greg Kern
10-11-2006 3:53 PM
10-11-2006 3:55 PM
10-11-2006 3:55 PM
10-11-2006 3:58 PM
10-11-2006 4:04 PM
10-11-2006 4:26 PM
hi,
Use <b>SPLIT </b>statement with <b>INTO TABLE</b> addition.
Here is a sample code
data: v_path type string value 'opt/bin/file.dat',
itab type table of string with header line,
v_rec type i.
split v_path at '/' into table itab.
describe table itab lines v_rec.
read table itab index v_rec.
write 😕 'File name:', itab.
Regards,
Sailaja.