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: 

Function module to download XML file to local file

Former Member
0 Kudos

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

2 REPLIES 2

uwe_schieferstein
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.