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

downloading xml file

Hi there,

I hope any one can help me. I created an XML file with the CALL TRANSFORMATION statement. I want to download the created file. Does any one no a way to do this?

Thx in advance.

Greetings Maarten

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Feb 10, 2004 at 04:20 PM

    You have several options on how you want to receive the results of your call transformation. The following is from the on-line help:

    Use addition 4a to transform into the XML document rxml. For the specification of rxml, you have the following three options:

    The XML document can be stored in an ABAP variable rxml of the type STRING or XSTRING, or in an internal standard table sxml of the elementary line type C.

    For rxml, you specify an interface reference variable of the type IF_IXML_OSTREAM that points to an IXML output stream.

    For rxml, you specify an interface reference variable of the type IF_IXML_DOCUMENT that points to an IXML document.

    With the stream factory you have several options. Before you call your CALL TRANSFORMATION, you setup your stream factory for these different options.

    1. You want to write the file to the application server file system. You want to create your OSTREAM as a binary string. In this example b_xml is an empty binary string. OSTEAM will be the reference variable of tyep IF_IXML_OSTREAM.

    ostream =

    streamfactory->create_ostream_xstring( b_xml ).

    You get the output lenght with the following:

    ressize = ostream->get_num_written_raw( ).

    You can then send the entire string to the file system with the following:

    transfer b_xml to filename1 length ressize.

    2. You want to write the file to the Presentation server (Frontend). This time you will want to create a binary table. This way you can send the binary table to the frontend using GUI_DOWNLOAD or CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD.

    refresh restab.

    ostream =

    streamfactory->create_ostream_itable( table = restab ).

    RESTAB is a table of type RAW 4096 characters.

    You can then download with the call to GUI_DOWNLOAD:

    call function 'GUI_DOWNLOAD'


    bin_filesize = ressize

    filename = i_file

    filetype = 'BIN'


    data_tab = restab


    others = 1.

    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.