Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Table to XML

Former Member
0 Kudos

Hi,

I have a requirement of converting the data from the internal table to XML. If anyone, has already done this,

please let me know.

Thanks,

S Patel

4 REPLIES 4

Former Member
0 Kudos

After you display contents of your itab, goto "list", "save/send", "file" and "html format".

Hope it helps,

Sumit

Former Member
0 Kudos

Hi,

Refer to below thread.

[;

Thanks,

Archana

former_member190389
Active Contributor

Former Member
0 Kudos

hi,

Try the following code


type-pools: truxs.
 
data: it001 type table of t001 with header line.
data: ixml type truxs_xml_table.
data: xxml like line of ixml.
data: size type i.
 
 
select * into table it001 from t001.
 
 
call function 'SAP_CONVERT_TO_XML_FORMAT'
     importing
          pe_bin_filesize      = size
     tables
          i_tab_sap_data       = it001
     changing
          i_tab_converted_data = ixml
     exceptions
          conversion_failed    = 1
          others               = 2.
 
 
data: file_str type string.
 
file_str = 'C:test.xml'.
 
call function 'GUI_DOWNLOAD'
     exporting
          bin_filesize = size
          filename     = file_str
          filetype     = 'BIN'
     tables
          data_tab     = ixml
     exceptions
          others       = 22.

hope this helps

Regards

RItesh