Resuelto la mayor parte.
data: gs_edocumentfile type edocumentfile,
lo_xml type ref to cl_xml_document,
lo_error type ref to if_ixml_parse_error,
lv_xml_error type string,
lv_error_txt type string,
iv_xml_string type xstring.
parameter gv_key(32) type c.
select single *
from edocumentfile
into gs_edocumentfile
where edoc_guid = gv_key and
file_type = 'RESPONSE' .
iv_xml_string = gs_edocumentfile-file_raw.
check not iv_xml_string is initial.
create object lo_xml.
if lo_xml is bound.
try.
clear lv_xml_error.
lo_xml->parse_xstring( exporting stream = iv_xml_string ).
lo_error = lo_xml->get_last_parse_error( ).
if lo_error is bound.
lv_xml_error = lo_error->get_reason( ).
endif.
if lv_xml_error is initial.
******************************************
lo_xml->display( ).
lo_xml->export_to_file( 'C:\Users\fernandt\Documents\SAP\TEM.xml' ).
******************************************
else.
message e071(edocument) into lv_error_txt.
cl_edocument=>raise_edoc_exception( ).
endif.
catch cx_root.
message e071(edocument) into lv_error_txt.
cl_edocument=>raise_edoc_exception( ).
endtry.
endif.
lo que me falla es esto
catch cx_root.
message e071(edocument) into lv_error_txt.
cl_edocument=>raise_edoc_exception( ).
me tira damn y me cierra todo.