2009 Jan 28 4:55 AM
Hi Expert,
I have the requirement to generate text file store it in FTP server and file format should be in UTF-8.
ABAP Development is completed but text file format generate in ANSI which not acceptable by client.For generating text file and store it on FTP server by using standard function module FTP_R3_TO_SERVER ,but in this function module there is no any parameter option like CODEPAGE for file format conversion. Is there any method or any function module to convert file format to UTF-8 and directly transfer or store it on FTP server.
<<removed_by_moderator>>
Thanks ,
Edited by: Vijay Babu Dudla on Jan 28, 2009 12:48 AM
Hi Expert,
I have the requirement to generate text file store it in FTP server and file format should be in UTF-8.
ABAP Development is completed but text file format generate in ANSI which not acceptable by client.For generating text file and store it on FTP server by using standard function module FTP_R3_TO_SERVER ,but in this function module there is no any parameter option like CODEPAGE for file format conversion. Is there any method or any function module to convert file format to UTF-8 and directly transfer or store it on FTP server.
<<removed_by_moderator>>
Thanks ,
Edited by: Vijay Babu Dudla on Jan 28, 2009 12:48 AM
2009 Jan 28 7:33 AM
what about function module TREX_TEXT_TO_UTF8 from function group TREX_UTIL.
2009 Jan 28 9:07 AM
Thanks Micky for reply,
When I used FM TREX_TEXT_TO_UTF8 ,it convert text file containent into UTF-8 which not readable and text file format is shows in ANSI not in UTF-8 . Is there any other method that text file format type will convert to UTF-8 .
Regards,
2009 Jun 09 10:52 AM
I have come across the same issue. Try calling the FTP_COMMAND function module to make it go into ASCII mode before your FTP the file, like this:
data: result type table of text with header line.
call function 'FTP_COMMAND'
exporting
handle = hdl
command = 'ascii'
tables
data = result
exceptions
tcpip_error = 1
command_error = 2
data_error = 3.
call function 'FTP_R3_TO_SERVER'
exporting
handle = hdl
fname = docid
character_mode = 'X'
tables
text = gt_your_table .
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |