09-03-2009 1:02 PM
Hi ,
I'm using method create_text in interface IF_IXML_DOCUMENT to convert the SAP data for sales orders into a XML file.
The problem i'm facing is when there are special characters in these texts like & ,<,>,lt etc... it is not converting into correct format.
For eg, if Material type is MAT&1 this method is returning MAT& .
similarly for other charaters .
any idea how to resolve it, would be very help full.
any OSS notes that needs to be applied .
Thanks
Raghavendra
09-08-2009 8:13 AM
Hello Raghavendra,
Use identical transformation if your need is to simply transform data to xml as follows:
DATA itab TYPE TABLE OF ....
DATA xml_string TYPE string.
* Select data into ITAB....
CALL TRANSFORMATION ID
SOURCE ITAB = ITAB[]
RESULT XML xml_string.
Hope this helps!
Thanks,
Augustin.
09-09-2009 8:10 AM
You could use CL_HTTP_UTILITY method ESCAPE_URL and UNESCAPE_URL.
Peter
09-09-2009 8:43 AM
Hi,
In XML the value & gets converted to & amp ; < to & lt ; and > to & gt ; which is correct.
Why do you want it to be &?
When you view the file using Internet Explorer it will correctly show up as & and not & amp ;
Edited by: Progirl Progirl on Sep 9, 2009 1:13 PM