10-19-2006 6:09 AM
Hi all,
I have to write to a file on the application server. I had been given the logical name, logical path name and physical name. Suggest how to use these parameters and get the path where to store the file.
Thanks & Regards,
Kasinath.
10-19-2006 6:14 AM
Open Dataset
catch system-exceptions DATASET_CANT_OPEN = 8.
open dataset UNIX_FILE for output in text mode encoding default.
endcatch.
Write to Dataset
loop at IT_STR into IS_STR.
catch system-exceptions DATASET_NOT_OPEN = 0 .
transfer IS_STR-STR to UNIX_FILE.
endcatch.
endloop.
if SY-SUBRC eq 0.
message S138(ZSM) with 'Data Downloaded to Unix File'.
endif.
Close Dataset
close dataset UNIX_FILE.
Regards
- Gopi