Получить XML представление IDOC-a
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
PARAMETERS: p_idoc TYPE edi_docnum. START-OF-SELECTION. TRY. DATA(o_idoc_xml) = NEW cl_idoc_xml1( docnum = p_idoc ). DATA: lv_xml TYPE string. o_idoc_xml->get_xmldata_as_string( IMPORTING data_string = lv_xml ). DATA(it_xml) = VALUE stringtab( ( |{ lv_xml }| ) ). DATA: lv_temp_dir TYPE string. cl_gui_frontend_services=>get_desktop_directory( CHANGING desktop_directory = lv_temp_dir ). cl_gui_cfw=>flush( ). DATA(lv_filename) = |{ lv_temp_dir }\\my_xml.xml|. cl_gui_frontend_services=>gui_download( EXPORTING filename = lv_filename filetype = 'ASC' CHANGING data_tab = it_xml ). WRITE: / lv_filename. CATCH cx_root INTO DATA(e_txt). WRITE: / e_txt->get_text( ). ENDTRY. |