11-15-2013 4:19 AM
Hello,
Could you please advise how can we download XML string to SAP application server.
I have used call transformation like below in my program .
data type of xml_result is xstring.
Appreciate your help on this
data :xml_result TYPE xstring.
CALL TRANSFORMATION zxml_wom SOURCE tl_xml_wstone = it_source RESULT XML xml_result.
Thanks in advance.
11-15-2013 6:41 AM
Hello Abhis,
Take the result parameter and
do the below code :
open dataset w_file_name for output
in binary mode.
if sy-subrc eq 0.
transfer xml_result to w_file_name
close dataset w_file_name
endif.
w_file_name should be your application server path file name.
Let me know if this works.
Thanks,
Vijay.
11-15-2013 5:01 AM
use open dataset etc to qrite contents of XML_RESULT to applciation server
11-15-2013 6:25 AM
11-15-2013 6:34 AM
Hi Abhis,
You can try yhr following t-codes.
Download file from Application server
Tcode: CG3Y
Upload files to Application Server
Tcode: CG3Z
Regards,
Ashish Kumar
11-15-2013 6:41 AM
Hello Abhis,
Take the result parameter and
do the below code :
open dataset w_file_name for output
in binary mode.
if sy-subrc eq 0.
transfer xml_result to w_file_name
close dataset w_file_name
endif.
w_file_name should be your application server path file name.
Let me know if this works.
Thanks,
Vijay.
11-15-2013 9:17 AM
11-15-2013 6:46 AM
Hi,
write below logic to download XML file into application server.
TYPES: BEGIN OF ty_xml,
xml_line TYPE txt255,
END OF ty_xml,
DATA: lv_xml TYPE char128,
it_xml type standard table of ty_xml,
st_xml type ty_xml.
*Here lv_xml is a file.
*Populate it_xml internal table with xml data
OPEN DATASET lv_xml FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
IF sy-subrc = 0.
LOOP AT it_xml INTO st_xml.
ENDLOOP.
CLOSE DATASET lv_xml.
ENDIF.
11-15-2013 9:16 AM