2008 Jun 16 4:13 PM
Hi all,
I have a XML file in the aplication server. I need to transfer this file to another path. I´m using the open dataset for this operation. The process is fine. But When I Access the XML file for internet explorer, the XML cannot open.
The code XML in both are identical. I don´t know if is right to use open data set for transfer XML file in the aplication server.
Great,
2008 Jun 16 4:36 PM
Hi,
Try something like this:
clear ta_rec[].
ta_rec-record = 'echo off'.
append ta_rec.
concatenate 'copy' '
server1\files\f1.txt' '
server1\files\f2.txt' into sal separated by space.
ta_rec-record = sal.
append ta_rec.
data retcode type i.
OPEN DATASET DIRFILE FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE.
loop at ta_rec.
TRANSFER ta_rec TO DIRFILE.
endloop.
CLOSE DATASET DIRFILE.
Open Dataset DIRFILE for input
IN TEXT MODE ENCODING NON-UNICODE
filter dirfile.
CLOSE DATASET DIRFILE.
otherwise the folder is not shared.
2008 Jun 16 4:37 PM
2008 Jun 16 4:51 PM
See my code below:
***Get the XML data in the aplication server
OPEN DATASET p_arq FOR INPUT IN BINARY MODE.
CHECK sy-subrc = 0.
DO.
READ DATASET p_arq INTO t_xml.
IF sy-subrc NE 0.
EXIT.
ENDIF.
APPEND t_xml.
CLEAR t_xml.
ENDDO.
CLOSE DATASET p_arq.
***Moving XML data for another path in the aplication server
OPEN DATASET w_filename FOR OUTPUT in BINARY MODE.
IF sy-subrc = 0.
LOOP AT t_xml.
TRANSFER t_xml TO w_filename.
ENDLOOP.
ENDIF.
CLOSE DATASET w_filename.
2009 Jul 21 3:14 PM