‎2014 Sep 17 11:04 AM
Dear all,
this is my code, generated xml file header like this " <?xml version="1.0" encoding="utf-8"?> "
and the Actual Encoding is 'ANSI as UTF-8' too, but at the end of the file, there are many 'nul', more detail in the attachment
the file cannot recognized by ie or chrome and some xml editor
if i delete the 'nul', it is exactly correct
DATA: x_xml TYPE xstring,
lt_xml TYPE solix_tab .
CALL TRANSFORMATION zst02
SOURCE root = gt_mara[]
RESULT XML x_xml.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = x_xml
TABLES
binary_tab = lt_xml.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'c:\xmlcal-3.xml'
IMPORTING
filelength = w_len
TABLES
data_tab = lt_xml.
if call method l_con->xstring_to_string translate xstring to string
then, call func 'SCMS_STRING_TO_FTEXT'
then, download the file using 'gui_download'
the xml file header like this " <?xml version="1.0" encoding="utf-8"?> "
but the actual encoding is UCS-2
‎2014 Sep 17 12:52 PM