cancel
Showing results for 
Search instead for 
Did you mean: 

Handling Comment Tag in Mapping

Former Member
0 Kudos

Hi Experts,

I have a File-RFC scenario. My incoming XML file has got a comment as follows.

<!DOCTYPE MACHINE SYSTEM "PS_AU_HC_DTD_XML.dtd">

The parser is not able to comprehend this line, and I can see the error in SXI_MONITOR as follows.

The system cannot locate the resource specified. Error processing resource 'PS_AU_HC_DTD_XML.dtd'. Error processing resource

<!DOCTYPE MACHINE SYSTEM "PS_AU_HC_DTD_XML.dtd">

Can some one please suggest a solution?

Regards,

Subhendu

Accepted Solutions (1)

Accepted Solutions (1)

sunilchandra007
Active Contributor
0 Kudos

Hi Subhendu,

This is due to non availability of DTD while processing of xml. You can go for Java or xslt mapping to load the xsd and remove the doctype definition from xml. For sample code, please refer to sap note - 812966.

Regards,

Sunil Chandra

Former Member
0 Kudos

Hi Sunil,

Is there a way to do it in standard graphical mapping? This is an existing development , and due to some change in source side, this additional line is appended.

Regards,

Subhendu

sunilchandra007
Active Contributor
0 Kudos

> Is there a way to do it in standard graphical mapping?

No, It can't be done independently with graphical mapping. Java/XSLT/ABAP mapping must be used before that.

If you don't want to go in complexity, you can use Java mapping just before Graphical mapping in interface mapping.

Java mapping would do these steps -

a) Convert the incoming xml into string.

b) Remove the Doctype statment with some string function.

c) Convert the string back to xml.

Regards,

Sunil Chandra

Answers (0)