cancel
Showing results for 
Search instead for 
Did you mean: 

MDM Import Manager XML XSD Error

Former Member
0 Kudos

Hello All,

I am facing problem while importing MVKE data for Material.

I have created varsatile XML for MVKE fields and XSD for the same. When I try to import data by XML Schema using that versatile file it works, but when i try using the actual xml from R3 containing data, it throws error

"Element Content is invalid according to DTD/schema"

The XSD and XML files i m attaching herewith.

XSD

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="AUMNG">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="EFMNG">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="IDOC">

<xs:complexType>

<xs:sequence>

<xs:element ref="MDME1MARAM" minOccurs="0"/>

</xs:sequence>

<xs:attribute name="BEGIN" type="xs:NMTOKEN" use="required"/>

</xs:complexType>

</xs:element>

<xs:element name="LFMNG">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="LVORM">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="MATNR">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="MDME1MARAM">

<xs:complexType>

<xs:sequence>

<xs:element ref="MATNR" minOccurs="0"/>

<xs:element ref="MDME1MVKEM" minOccurs="0" maxOccurs="unbounded"/>

</xs:sequence>

<xs:attribute name="SEGMENT" type="xs:NMTOKEN" use="required"/>

</xs:complexType>

</xs:element>

<xs:element name="MDME1MVKEM">

<xs:complexType>

<xs:sequence>

<xs:element ref="MSGFN" minOccurs="0"/>

<xs:element ref="VKORG" minOccurs="0"/>

<xs:element ref="VTWEG" minOccurs="0"/>

<xs:element ref="LVORM" minOccurs="0"/>

<xs:element ref="VERSG" minOccurs="0"/>

<xs:element ref="SKTOF" minOccurs="0"/>

<xs:element ref="VMSTD" minOccurs="0"/>

<xs:element ref="AUMNG" minOccurs="0"/>

<xs:element ref="LFMNG" minOccurs="0"/>

<xs:element ref="EFMNG" minOccurs="0"/>

<xs:element ref="SCMNG" minOccurs="0"/>

<xs:element ref="MTPOS" minOccurs="0"/>

</xs:sequence>

<xs:attribute name="SEGMENT" type="xs:NMTOKEN" use="required"/>

</xs:complexType>

</xs:element>

<xs:element name="MDMMATMAS_MATMAS03_MVKEM">

<xs:complexType>

<xs:sequence>

<xs:element ref="IDOC" minOccurs="0"/>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="MSGFN">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="MTPOS">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="SCMNG">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="SKTOF">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="VERSG">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="VKORG">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="VMSTD">

<xs:complexType mixed="true"/>

</xs:element>

<xs:element name="VTWEG">

<xs:complexType mixed="true"/>

</xs:element>

</xs:schema>

Versatile XML

<?xml version="1.0" encoding="UTF-8"?>

<MDMMATMAS_MATMAS03_MVKEM xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="c:\DOCUME~1\saurabh.pathak\desktop\mvke.xsd">

<IDOC BEGIN="1">

<MDME1MARAM SEGMENT="1">

<MATNR/>

<MDME1MVKEM SEGMENT="1">

<MSGFN/>

<VKORG/>

<VTWEG/>

<LVORM/>

<VERSG/>

<BONUS/>

<PROVG/>

<SKTOF/>

<VMSTA/>

<VMSTD/>

<AUMNG/>

<LFMNG/>

<EFMNG/>

<SCMNG/>

<SCHME/>

<VRKME/>

<MTPOS/>

<DWERK/>

<PRODH/>

<PMATN/>

<KONDM/>

<KTGRM/>

<MVGR1/>

<MVGR2/>

<MVGR3/>

<MVGR4/>

<MVGR5/>

<SSTUF/>

<PFLKS/>

<LSTFL/>

<LSTVZ/>

<LSTAK/>

<PRAT1/>

<PRAT2/>

<PRAT3/>

<PRAT4/>

<PRAT5/>

<PRAT6/>

<PRAT7/>

<PRAT8/>

<PRAT9/>

<PRATA/>

</MDME1MVKEM>

</MDME1MARAM>

</IDOC>

</MDMMATMAS_MATMAS03_MVKEM>

Actual XML

<?xml version="1.0" encoding="UTF-8"?>

<MDMMATMAS_MATMAS03_MVKEM><IDOC BEGIN="1"><MDME1MARAM SEGMENT="1"><MATNR>000000000050086534</MATNR><MDME1MVKEM SEGMENT="1"><MSGFN>005</MSGFN><VKORG>78DM</VKORG><VTWEG>NP</VTWEG><LVORM>X</LVORM><VERSG>A</VERSG><SKTOF>X</SKTOF><VMSTD>00000000</VMSTD><AUMNG>0.000</AUMNG><LFMNG>0.000</LFMNG><EFMNG>0.000</EFMNG><SCMNG>0.000</SCMNG><MTPOS>BANC</MTPOS></MDME1MVKEM><MDME1MVKEM SEGMENT="1"><MSGFN>005</MSGFN><VKORG>78DM</VKORG><VTWEG>OP</VTWEG><LVORM>X</LVORM><VERSG>A</VERSG><SKTOF>X</SKTOF><VMSTD>00000000</VMSTD><AUMNG>0.000</AUMNG><LFMNG>0.000</LFMNG><EFMNG>0.000</EFMNG><SCMNG>0.000</SCMNG><MTPOS>BANC</MTPOS></MDME1MVKEM><MDME1MVKEM SEGMENT="1"><MSGFN>005</MSGFN><VKORG>78IN</VKORG><VTWEG>NP</VTWEG><LVORM>X</LVORM><VERSG>A</VERSG><SKTOF>X</SKTOF><VMSTD>00000000</VMSTD><AUMNG>0.000</AUMNG><LFMNG>0.000</LFMNG><EFMNG>0.000</EFMNG><SCMNG>0.000</SCMNG><MTPOS>BANC</MTPOS></MDME1MVKEM><MDME1MVKEM SEGMENT="1"><MSGFN>005</MSGFN><VKORG>78IN</VKORG><VTWEG>OP</VTWEG><LVORM>X</LVORM><VERSG>A</VERSG><SKTOF>X</SKTOF><VMSTD>00000000</VMSTD><AUMNG>0.000</AUMNG><LFMNG>0.000</LFMNG><EFMNG>0.000</EFMNG><SCMNG>0.000</SCMNG><MTPOS>BANC</MTPOS></MDME1MVKEM></MDME1MARAM></IDOC></MDMMATMAS_MATMAS03_MVKEM>

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Poonam,

I have also faced this problem before, and I was able to solve it.

Actually I had also created a Template to cretae a map and then I tried importing an XML file ( Source file ), it went to the structural folder.

"Element Content is invalid according to DTD/schema"

This error can be because of any of the following reasons :

1. Either, your actual file does not the specified element. MVKE

2. Either the position of the MVKE is not correct in the XML file (This cant be a reason as you have taken the source file from R3 )

3. The structure of the Source file does not match with the XML schema that you are using for Import.

4. The most important reason might be, that the Mapping done in Automatic Import Map ( that you may be using) did not have the field called

MVKE. Your Versatile template also may not have it.

You can try importing the Actual File through Import Manager. It might open, but for MDIS to process it, everything should be perfect. Otherwise, it will go into Structural Exceptions.

I hope it helps.

Thanks and Regards

Nitin Jain

Former Member
0 Kudos

Hi Poonam,

I have tried the same scenario that you have stated and its working fine i.e. i had put the XSD that u have given into the console and then i have passed the XML file again that much you have given while importing.

Ok lets do one thing just copy the XSD content that you have posted and paste it in the notepad saving the file as Test.xsd

Also copy the Actual XML into another notepad document saving the file as Test.xml.And just repeat the steps that u were doing previously i.e. save the XSD in the console and then used it for importing.

Regards,

Jitesh Talreja

Former Member
0 Kudos

I want to import the XML file using MDIS, but as it is going in structural exception, I am now trying using import manager.

I have assigned the XSD to the schema in Console which i am using for import.

Now my concern is using that XML schema, I am able to open versatile XML but not the actual XML which gives the error

" Element content is invalid according to DTD/Schema"

Former Member
0 Kudos

Sorry Poonam i didnt get your query

Could you please explain in slightly better way.And at which step you are getting the error.

Regards,

Jitesh Talreja

Former Member
0 Kudos

Thanks Jitesh for the reply.

But the thing is I want to import the actual XML using XML schema only.

which is not working.

Kindly help.

-Poonam

Former Member
0 Kudos

Hi Poonam,

I tried importing all the files u have showed and all are working fine.

case 1: Actual XML

In order to import the Actual XML file Select Type=XML and select the file by browsing it.

case 2: XML Schema

Put the XSD file into the XML Schema table of your repository and then while importing select Type=XML Schema and then select the XSD from the dropdown list and then give the complete path of our XML file by browsing it.

The only difference between the above two cases is the second case validates the XML file with that of XSD specified.

If your problem persists please do ask us.

Regards,

Jitesh Talreja