Hi,
I have some HR data to be send in XML format to the application server.
Please find below part the code:
The final DATA retrieved from HR tables is in lt_alvoutfile.
END-OF-SELECTION.
DATA:
gd_dsn TYPE string,
gd_xml TYPE string,
gdo_data TYPE REF TO data,
gd_rc TYPE sysubrc,
go_doc TYPE REF TO cl_xml_document.
gd_dsn = 'output.xml'.
CALL TRANSFORMATION id
SOURCE itab = lt_alvoutfile
RESULT XML gd_xml.
CREATE OBJECT go_doc.
gd_rc = go_doc->parse_string( gd_xml ).
go_doc->display( ).
OPEN DATASET gd_dsn FOR OUTPUT IN BINARY MODE.
TRANSFER gd_xml TO gd_dsn.
CLOSE DATASET gd_dsn.
END-OF-SELECTION.
When I do this and check the application server through AL11 I see as Error log
Directory: ./
Name: X:\usr\sap\trans\temp\output.xml
###<#?#x#m#l# #v#e#r#s#i#o#n#=#"#1#.#0#"# #e#n#c#o#d#i#n#g#=#"#u#t#f#-#1#6#"#?#>#
#<#a#s#x#:#a#b#a#p# #x#m#l#n#s#:#a#s#x#=#"#h#t#t#p#:#/#/#w#w#w#.#s#a#p#.#c#o#m#/#a#b#a#p#x#m#l#"# #v#e#r#s#i#o#n#=#"#1#.#0#"#>#<#a#s#x#:#v#a#l#u#e#s#>#<#I#T#A#B#/#>#<#/#a#s#x#:#v
Please suggest how we can rectify this and make it display as an normal XML file with tags.