Gurus,
I am trying to E-mail an XML file, to do so I am converting ABAP Internal Table to XML using Syntax
CALL TRANSFORMATION ZXMLF
SOURCE dataset = gt_final
RESULT XML xml_out.
Here xml_out is of type string.
So I am converting xml_out to xstring using FM SCMS_STRING_TO_XSTRING and thereafter
converting the Xstring data to binary using SCMS_XSTRING_TO_BINARY.
And from there I am dispatching the data via E-mail.
The problem is when I recieve the E-mail and open the file it gives error as shown in the screenshot.
and when I edit the file and change the encoding
encoding="utf-16" to encoding="utf-8" it works fine. Now I do realize that if I use the xml_out type as xstring I will get encoding 8 by default.. but that doesn't work either though the attached file contains encoding 8.. It gives the same error as above screenshot.. Please guide me how to fix this