2011 Aug 03 4:11 PM
Hi
am using the FTP_SERVER_TO_R3 to read xls file from FTP server to internal table
but the data i get in LT_TEXT is special characters.
CALL FUNCTION 'FTP_SERVER_TO_R3'
EXPORTING
handle = hdl
fname = f_name "ProdDataFromCRM.xls.
* CHARACTER_MODE = 'X'
* IMPORTING
* BLOB_LENGTH =
TABLES
BLOB = lt_text
* TEXT = lt_text
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4
can any one help me out to get the exact data..
Really appreciate your quick response..
Thank You
2011 Aug 03 4:21 PM
Hi venkatesh v,
thank you for the amount of details given. I'm convinced it works perfect. You get the data exactly as they are stored on the ftp server in exactly the format you gave here.
Regards,
Clemens
2011 Aug 03 8:31 PM
Hi Venkatesh,
may be try setting ASCII mode before , like :
call function 'FTP_COMMAND'
exporting
handle = hdl
command = 'ascii'
tables
data = result
exceptions
others = 1.
Or may be because 'character_mode' parameter is commented in your code. Otherwise it looks fine.
Regards,
Pawan
2011 Aug 03 9:25 PM
Hi Pawan,
have mercy with venkatesh
fname = f_name "ProdDataFromCRM.xls.
looks like he wants to handle an excel file. For this you'd rather go binary. I think it works as designed.
Regards
Clemens
2011 Aug 03 10:38 PM
Yeah I should have noticed its a office document. Internal table lt_text led to the confusion.
Many thanks for the document reference on Desktop office integration , I am yet to learn this.
2011 Aug 03 9:35 PM
Hi, if you really retrieve an excel file, you can not see the data in ABAP. You may see them in Excel. For this you may use
CALL METHOD document->open_document_from_table
of the interface i_oi_document_proxy for OLE objects. You can access the data with reference to the interface i_oi_spreadsheet.
Please check [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf] for details.
But, who knows, perhaps you want "And Now For Something Completely Different".
Regards
Clemens