Skip to Content
author's profile photo Former Member
Former Member

Internal Table to XML

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2010 at 04:13 AM

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

    Hope it helps,

    Sumit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2010 at 04:18 AM

    Hi,

    Refer to below thread.

    [Convert data from internal table to XML file.;

    Thanks,

    Archana

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 11, 2010 at 04:47 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 11, 2010 at 04:51 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.