2007 Sep 28 7:39 AM
Hi,
how can we upload data to unix server and download it to pc file later?
Regards,
Subbu
2007 Sep 28 7:40 AM
2007 Sep 28 7:44 AM
Hi,
Use the key words;
Use the FM "FILE_GET_NAME" to get the file name and path....
1.OPEN DATASET FOR INPUT / FOR OUTPUT
2.TRANSFER
3.CLOSE DATASET
If the hint is useful Say thanks by reward .
Regards,
Prabhu Rajesh
2007 Sep 28 7:49 AM
Hi,
follow the code
Retrieve data file from presentation server(Upload from PC)
DATA: i_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.
DATA: begin of it_datatab occurs 0,
row(500) type c,
end of it_datatab.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = i_file
filetype = 'ASC'
TABLES
data_tab = it_datatab "ITBL_IN_RECORD[]
EXCEPTIONS
file_open_error = 1
OTHERS = 2.
Retrieve Data file from Application server(Upload from Unix)
DATA: i_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.
OPEN DATASET i_file FOR INPUT IN TEXT MODE.
IF sy-subrc NE 0.
MESSAGE e999(za) WITH 'Error opening file' i_file.
ENDIF.
DO.
Reads each line of file individually
READ DATASET i_file INTO wa_datatab.
Perform processing here
.....
ENDDO.
please reward if of any use.
vivekanand