Application Development and Automation 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: 
Read only

Problem while reading XML file from Aplication server(Al11)

Former Member
0 Likes
1,087

Hi Experts

I am facing a problem while reading XML file from Aplication server using open data set.

OPEN DATASET v_dsn IN BINARY MODE FOR INPUT.

IF sy-subrc <> 0.

EXIT.

ENDIF.

READ DATASET v_dsn INTO v_rec.

WHILE sy-subrc <> 0.

ENDWHILE.

CLOSE DATASET v_dsn.

The XML file contains the details from an IDOC number , the expected output is XML file giving all the segments details in a single page and send the user in lotus note as an attachment, But in the present output after opening the attachment i am getting a single XML file which contains most of the segments ,but in the bottom part it is giving the below error .

- <E1EDT13 SEGMENT="1">

<QUALF>001</QUALF>

<NTANF>20110803</NTANF>

<NTANZ>080000</NTANZ>

<NTEND>20110803<The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

-


Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/SHPORD_0080005842.xml'.

/SPAN></NTEND>

<NTENZ>000000</NTENZ>

for all the xml its giving the error in bottom part , but once we open the source code and if we saved in system without changing anything the file giving the xml file without any error in that .

could any one can help to solve this issue .

4 REPLIES 4
Read only

Former Member
0 Likes
712

Hello,

this may be related to unicode. Do you have unicode characters in the IDoc?

Best regards,

Oliver

Read only

Former Member
0 Likes
712

Hi Oliver

Thanx for your reply.

see the latest output

- <E1EDT13 SEGMENT="1">

<QUALF>003</QUALF>

<NTANF>20110803</NTANF>

<NTANZ>080000</NTANZ>

<NTEND>20110803</NTEND>

<NTENZ>000000</NTENZ>

<ISDD>00000000</ISDD>

<ISDZ>000000</ISDZ>

<IEDD>00000000</IEDD>

<IEDZ>000000</IEDZ>

</E1EDT13>

- <E1EDT13 SEGMENT="1">

<QUALF>001</QUALF>

<NTANF>20110803</NTANF>

<NTANZ>080000</NTANZ>

<NTEND>20110803<The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

-


Invalid at the top level of the document. Error processing resource 'file:///C:/TEMP/notesD52F4D/~1922011.xml'.

/SPAN></NTEND>

<NTENZ>000000</NTENZ>

E1EDT13 with QUALF>003 and <E1EDT13 SEGMENT="1">

with <QUALF>001 having almost same segment data . but E1EDT13 with QUALF>003 is populating all segment data

properly ,but E1EDT13 with QUALF>001 is giving in between.

Read only

Former Member
0 Likes
712

E1EDT13 with QUALF>001 is giving ERROR in between

Read only

0 Likes
712

Hi,

yes, but this does not answer my question.

Do you have special characters in your file?

Can you open it with notepad and then get the specific part to see if there are any?

Best regards,

Oliver