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

Function module to download XML file to local file

Hello Friends,

I have an XML string,is there a function module,which helps me in

downloading this XML string as an XML file ,to local disk.

regards

kaushik

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 22, 2008 at 12:08 PM

    Hello Kaushik

    Define an itab of TYPE string, append your single XML string and download the itab using method GUI_DOWNLOAD of class CL_GUI_FRONTEND_SERVICES.

    DATA:
      lt_xml  TYPE TABLE OF string.
    
      APPEND ld_xml TO lt_xml.
    
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
        ...
    

    Regards,

    Uwe

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 22, 2008 at 12:15 PM

    Try this way

    DATA: BEGIN OF it_dados OCCURS 0,

    data(256) TYPE x,

    END OF it_dados.

    OPEN DATASET l_sfile FOR INPUT MESSAGE msg IN BINARY MODE.

    IF sy-subrc NE 0.

    WRITE: / msg.

    STOP.

    ENDIF.

    REFRESH it_dados. CLEAR it_dados.

    DO.

    READ DATASET l_sfile INTO it_dados. "<<<<

    APPEND it_dados. "<<<<

    ENDDO.

    close dataset l_sfile. "<<<<

    Regards.

    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.