‎2009 May 13 1:15 PM
Hi,
After converting a SAP file to XML with function SAP_CONVERT_TO_XML_FORMAT, I get the following error or message when trying to open the generetaed XML file:
The XML page cannot be displayed.
A name was started with an invalid character. Error processing resource 'file://sapdev/sapmnt/Daily/SAQ/Output/OUTBOUND2009...
<?xml version="1.0"?><OUTBOUND><%_T00004S00000000O0000002096/><%_T00004S00000000O0000002096><NAME...
Here is the code:
concatenate sy-datum '_' sy-uzeit '.xml' into filename.
concatenate '\\sapdev\sapmnt\Daily\SAQ\Output\OUTBOUND' filename into infile.
filename = infile.
data doc_name(30) value 'OUTBOUND'.
clear: xml_table[], totalSize.
CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
EXPORTING
I_FILENAME = infile
I_XML_DOC_NAME = doc_name
IMPORTING
PE_BIN_FILESIZE = totalSize
TABLES
I_TAB_SAP_DATA = xml_file_list
CHANGING
I_TAB_CONVERTED_DATA = xml_table
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2.
check not xml_table[] is initial.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = filename
FILETYPE = 'BIN'
IMPORTING
FILELENGTH = totalSize
TABLES
DATA_TAB = xml_table
EXCEPTIONS
OTHERS = 22.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks in advance.
‎2009 May 13 1:20 PM
Hi Issac,
i seen you are trying to download the file using using GUI_DOWNlOAD using the Application server path..
GUI_DOWNlOAD is used for presentation server...
Regards,
Prabhudas
Edited by: Prabhu Das on May 13, 2009 5:51 PM
‎2009 May 19 3:00 PM
Hi,
I have change the path to my presentation server and added the XML tag as follows:
"C:\Documents and Settings\APolo\My Documents\outbound.xml" , but still the same result.
How does it suppose to be formatted the internal table I_TAB_SAP_DATA ?
Thanks.