‎2007 May 14 8:04 AM
Hallow experts,
I have a vendor that I have to bring him file(abap) in xml and format, I do that in transformation ,the problem is that in the first line of the file I have to bring him with Encoding <b>utf-8</b> <b>and not</b> <?xml version="1.0" encoding="<b>iso-8859-8-i</b>" >
Because he cant use it with iso-8859-8-i ,
I find example in sdn and I follow it but it not working ,please help.
(in the exemple I have to move gt_xml to gui_download but when I do that I have <b>runtime error</b>)
Have nice day
regards
this is my program
TYPES: BEGIN OF ttab,
record(65535) TYPE c,
END OF ttab.
DATA: xml_table TYPE TABLE OF ttab,
wa_xml_table LIKE LINE OF xml_table.
DATA: gd_result TYPE string,
go_ixml TYPE REF TO if_ixml,
go_stream_factory TYPE REF TO if_ixml_stream_factory,
go_encoding TYPE REF TO if_ixml_encoding,
go_resstream TYPE REF TO if_ixml_ostream.
DATA:gt_knb1 TYPE STANDARD TABLE OF knb1,
gt_xml TYPE TABLE OF string.
<b>CONSTANTS: gc_encoding TYPE string VALUE 'UTF-8'.
go_ixml = cl_ixml=>create( ).
go_stream_factory = go_ixml->create_stream_factory( ).
go_encoding = go_ixml->create_encoding( character_set = gc_encoding
byte_order = 0 ).
go_resstream = go_stream_factory->create_ostream_cstring( gd_result ).
CALL METHOD go_resstream->set_encoding
EXPORTING
encoding = go_encoding.
CALL TRANSFORMATION ('ID')
SOURCE i_data = person_tab
RESULT XML xml_table.
APPEND gd_result TO gt_xml</b>.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = final_adress
filetype = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
codepage = 'UTF-8'
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
WRITE_EOL = ABAP_TRUE
IMPORTING
FILELENGTH =
<b>TABLES
data_tab = xml_table</b>
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2007 May 14 10:07 AM
hi antonio
i have yestrday the same problem and i cant find answer for that
in sdn
i dont now if u can change that?
sorry
‎2007 May 14 8:25 AM
hi
did any one have somthing that can help
its very importent for me
regards
‎2007 May 14 10:07 AM
hi antonio
i have yestrday the same problem and i cant find answer for that
in sdn
i dont now if u can change that?
sorry
‎2007 May 14 11:02 AM
hi sh
i see in that forum that devlopers can solve the problem
i try soltion that someone use and solve problem
but it dont work,
maybe some one expert can tell me what i doing wrong
i miss something but i dont see it
or someone tell me to change my code
but have to be answer to this problem.
regards