2010 Feb 09 9:34 AM
Hi All,
I am facing a problem in file creation on FTP.
The problem is .xls file is getting created but the data inside the file is not in the excel format its in text lines. ..means in a a single column all the sata is coming.
Iam Using FM
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
handle = hdl
fname = w_remfile
character_mode = 'X'
blob_length = blob_length
TABLES
text = itab
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
IF sy-subrc = 0.
ENDIF.
PlZ Help
Hi All,
I am facing a problem in file creation on FTP.
The problem is .xls file is getting created but the data inside the file is not in the excel format its in text lines. ..means in a a single column all the sata is coming.
Iam Using FM
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
handle = hdl
fname = w_remfile
character_mode = 'X'
blob_length = blob_length
TABLES
text = itab
EXCEPTIONS
tcpip_error = 1
command_error = 2
data_error = 3
OTHERS = 4.
IF sy-subrc = 0.
ENDIF.
PlZ Help
2010 Feb 09 10:06 AM
2010 Feb 09 10:16 AM
hi, please tell me if im getting it wrong.
Is your requirement only to download the file on a system on the network ?
If that is so, you can just pass the FTP address in FM--
Also give the field separator 'X' so that the records are shown in different columns in excel..
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = '\\10.105.2.20\Data\SAPHCM\sumit.xls' " FTP path
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = 'X'
* IMPORTING
* FILELENGTH =
tables
data_tab = IT_ekko.
* FIELDNAMES =
WRITE 'hi'.Hope it helps
Regards,
Sumit
2010 Feb 09 11:02 AM
no i don't have to download the file.i have to create an excel file on FTP server.
Excel file is getting created but data is not in the columns ,data of all the columns are combined togather.
PLZ help to resolve the issue.
2010 Feb 09 3:00 PM
2010 Feb 10 4:12 AM
2010 Feb 10 12:43 PM
your internal table sent via ftp must be of type character or string and the lines must exactly cover whqt you want to write. the ftp function module is not able to convert a structured internal table into a csv stringbased table internally like the gui_download function module. You must do this for your own.
2010 Feb 10 10:39 AM
As you are using excel files try sending in binary mode instead of text mode with function module parameter character_mode = space and by using parameter blob instead of text.
Regards Jack
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |