Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

Re: how to download/uplaod a xml file in abap

$
0
0

Hi,

 

About download:

 

This is a code fragment from Creating Excel the Java way

see program Y_R_EITAN_TEST_40_02 there.

 

Asuming you use cl_ixml and at some point you have:

DATA: ob_ixml             TYPE REF TO if_ixml .
DATA: ob_ixml_document    TYPE REF TO if_ixml_document .

* Writing to file .

DATA: ob_ixml_stream_factory TYPE REF TO if_ixml_stream_factory.
DATA: ob_ostream  TYPE REF TO if_ixml_ostream .
DATA: xstring TYPE xstring.

  ob_ixml_stream_factory = ob_ixml->create_stream_factory( ).
  ob_ostream = ob_ixml_stream_factory->create_ostream_xstring( xstring ).
  ob_ixml_document->render( ostream = ob_ostream ) .
 
DATA: mess TYPE string .

  OPEN DATASET file_name FOR OUTPUT IN BINARY MODE MESSAGE mess .

  IF sy-subrc NE 0.

    MESSAGE e306(f7) WITH file_name .

    RETURN .

  ENDIF.

  TRANSFER xstring TO file_name .

  CLOSE DATASET file_name . 
 
 
Regards.


Viewing all articles
Browse latest Browse all 9164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>