‎2009 Feb 23 1:53 PM
Hi,
is there a function which I can use to create a XML from an internal table where I furthermore can use nodes and so on?
I knwo the transformation but I only want to know if there is a function which exist?
‎2009 Feb 23 3:10 PM
‎2009 Feb 23 4:17 PM
Depends on what you really want to do. Try, e.g, SAP_CONVERT_TO_XML_FORMAT
Shahram
‎2009 Feb 23 4:21 PM
I use for testing the function :
CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
EXPORTING
i_field_seperator = l_fieldseperator
i_xml_doc_name = l_docname
IMPORTING
pe_bin_filesize = l_filesize
TABLES
i_tab_sap_data = t_itab
CHANGING
i_tab_converted_data = t_convtab
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
which creates my XML, but when I donwload the file with
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
bin_filesize = l_filesize
filename = lf_docname
filetype = 'BIN'
TABLES
data_tab = t_convtab
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
I furthermore have data with length and so on for the fields.
And the other question is where do I have to set which field is in which node in the xml?
‎2009 Feb 26 3:17 PM