on 06-05-2008 11:48 PM
Hi All,
I am importing a source xml file using import manager.But the Number of root nodes changes in the source file changes when i import a xml file with only 1 record and multiple record.So I am unable to maintain a same map for the same xml file with different records.I guess something is wrong in my xml structure.
This is my source xml file:
>><?xml version="1.0" encoding="utf-8" ?>
>><ns1:MT_MDM_003_Shipping xmlns:ns1="urn:HaworthInc-com:Customer_Master">
>><Record>
>><Sales_Organization>1001</Sales_Organization>
>><Distribution_Channel>00</Distribution_Channel>
>></Record>
>><Record>
>><Sales_Organization>1001</Sales_Organization>
>><Distribution_Channel>00</Distribution_Channel>
>></Record>
>></ns1:MT_MDM_003_Shipping>
If i use the above file in the import manager I am seeing the Source dropdown (Source Hierarchy) where we select the source file as
>>None
>>ns1:MT_MDM_003_Shipping
>>Records
If i use the same import file with just 1 record as follows
>><?xml version="1.0" encoding="utf-8" ?>
>><ns1:MT_MDM_003_Shipping xmlns:ns1="urn:HaworthInc-com:Customer_Master">
>><Record>
>><Sales_Organization>1001</Sales_Organization>
>><Distribution_Channel>00</Distribution_Channel>
>></Record>
>></ns1:MT_MDM_003_Shipping>
If i use the above file in the import manager Now I am seeing the Source dropdown (Source Hierarchy) where we select the source file as only.Records is missing
>>None
>>ns1:MT_MDM_003_Shipping
>>Records (This is missing now)
Since I am missing the Records I have to create the different map for the same file.
Is there anything missing in the XML???Or the XML structure is wrong????
Any Help greatly appreciated.
Hi,
this is a common behavior of MDM if you import XMLs without using an XML schema. Doing this, the Import Manager is only able to create a map according to the loaded XML. How should the IM know, that the record element is repeatable, if there is only one element available in the XML source?
To get rid of this issue, please create an XML Schema that describes your XML file and use the import option with XML Schema instead of XML only.
BR Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Aravind,
The problem you put up is a property of Import Manager.When we import XML files without using an XML schema ,Import manager will create a map for the XML we uploaded as ther is no option to make the root repeatable or not,if only sinle record is uploaded.To overcome this define a XML schema in the Console and while importing the XML file use the option XML Schema rather than XML File.
Rgds
Ankit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply,
I am running into this error now,when I use schema gainst the xml file...
Logon Error: Cannot load xml file
Error:
COM error 80004005 Unspecified error
source = msxml4.dll Description = file:///c:/.........
The "namespace provided differs from the schema's 'urn:Test-com:Customer_Master' targetNamespace
XML File:
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:Import_File_Format_008_Correspondence xmlns:ns0="urn:Test-com:Customer_Master">
<Record>
<Customer_Nr>ZTEST001</Customer_Nr>
<Company_Code>1001</Company_Code>
<Acctg_clerk>03</Acctg_clerk>
<Bank_statement>1</Bank_statement>
<Acct_at_cust>ZZZZ1234</Acct_at_cust>
<Decentralized_processing>x</Decentralized_processing>
<Coll_Invoice_variant>z</Coll_Invoice_variant>
<Customer_user>ZCUST USER</Customer_user>
<Actclk_telno>CLERK TEL NR</Actclk_telno>
<Clerks_fax>12345678</Clerks_fax>
<Clerks_internet>clerk internet</Clerks_internet>
<Account_memo>account memo</Account_memo>
<Dunn_Procedure>1000</Dunn_Procedure>
<Dunning_block>A</Dunning_block>
<Dunnrecipient>CP3016</Dunnrecipient>
<Legdunnproc>04/22/2008</Legdunnproc>
<Last_dunned>04/21/2008</Last_dunned>
<Dunning_level />
<Dunning_clerk>06</Dunning_clerk>
</Record>
</ns0:Import_File_Format_008_Correspondence>
XSD File:
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="urn:Test-com:Customer_Master" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Test-com:Customer_Master">
<xsd:element name="MT_MDM_008_Correspondence" type="DT_MDM_008_Correspondence" />
<xsd:complexType name="DT_MDM_008_Correspondence">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">51f4f670330e11ddabec00112539c3ab</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Record" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb01c4111ddabe302004c4f4f50</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Customer_Nr" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb11c4111ddccfa02004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Company_Code" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb21c4111dd818902004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Acctg_clerk" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb31c4111dda34102004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Bank_statement" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb41c4111dda01702004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Acct_at_cust" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb51c4111dd817202004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Decentralized_processing" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb61c4111ddb52602004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Coll_Invoice_variant" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb71c4111ddca1902004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Customer_user" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb81c4111ddb7a302004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Actclk_telno" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb91c4111ddca3502004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Clerks_fax" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bba1c4111ddaad102004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Clerks_internet" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bbb1c4111dd956902004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Account_memo" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bbc1c4111ddb20902004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Dunn_Procedure" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bbd1c4111dd87e302004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Dunning_block" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bbe1c4111dd9aaa02004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Dunnrecipient" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bbf1c4111dda84302004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Legdunnproc" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bc01c4111ddae5402004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Last_dunned" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bc11c4111dd82e802004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Dunning_level" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bc21c4111ddc26a02004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Dunning_clerk" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bc31c4111ddce7f02004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Hi,
did you mention the namespace in the URN field in MDM Console?
In addition, did you validate your XML against the XSD using an XML tool like Altova XML Spy? The reason I'm asking is because the XSD you've copied in your reply does not contain the definition of the root tag you're using in copied the XML.
Best regards
Michael
I have mentioned the uri in the console and also added reference to the schema in the xml file and i was able to load the xml file in the import manager.
But my first problem has come again...I am not seeing the <Record> node from the source hierarchy of import server,eventhough the tag <Record> is 0...unbounded in the schema.
XML File
<?xml version="1.0" encoding="utf-8" ?>
- <ns1:MT_MDM_008_Correspondence xmlns:ns1="urn:Test-com:Customer_Master" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:Test-com:Customer_Master J:\Data\MDM\CUSTOM1\IMPORT2\MT_MDM_008_Correspondence.xsd">
- <Record>
<Customer_Nr>00114</Customer_Nr>
<Company_Code>1001</Company_Code>
<Acctg_clerk />
<Bank_statement />
<Acct_at_cust />
<Decentralized_processing />
<Coll_Invoice_variant />
<Customer_user />
<Actclk_telno />
<Clerks_fax />
<Clerks_internet />
<Account_memo />
<Dunn_Procedure />
<Dunning_block />
<Dunnrecipient />
<Legdunnproc />
<Last_dunned />
<Dunning_level />
<Dunning_clerk>11</Dunning_clerk>
</Record>
</ns1:MT_MDM_008_Correspondence>
XSD File:
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="urn:Test-com:Customer_Master" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Test-com:Customer_Master">
<xsd:element name="MT_MDM_008_Correspondence" type="DT_MDM_008_Correspondence" />
<xsd:complexType name="DT_MDM_008_Correspondence">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">51f4f670330e11ddabec00112539c3ab</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Record" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb01c4111ddabe302004c4f4f50</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Customer_Nr" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb11c4111ddccfa02004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Company_Code" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb21c4111dd818902004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Acctg_clerk" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb31c4111dda34102004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Bank_statement" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb41c4111dda01702004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Acct_at_cust" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb51c4111dd817202004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Decentralized_processing" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb61c4111ddb52602004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Coll_Invoice_variant" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb71c4111ddca1902004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Customer_user" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb81c4111ddb7a302004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Actclk_telno" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bb91c4111ddca3502004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Clerks_fax" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bba1c4111ddaad102004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Clerks_internet" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bbb1c4111dd956902004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Account_memo" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bbc1c4111ddb20902004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Dunn_Procedure" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bbd1c4111dd87e302004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Dunning_block" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bbe1c4111dd9aaa02004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Dunnrecipient" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bbf1c4111dda84302004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Legdunnproc" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bc01c4111ddae5402004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Last_dunned" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bc11c4111dd82e802004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Dunning_level" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bc21c4111ddc26a02004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Dunning_clerk" type="xsd:string" minOccurs="0">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">bcb36bc31c4111ddce7f02004c4f4f50</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
I am able to load the file .But I am not able to see the RECORD tag in the source hierarchy of the import manager when the xml has got only One Record.
I am seeing only..
>>None
>>ns1:MT_MDM_003_Shipping
where as I need to see
>>None
>>ns1:MT_MDM_003_Shipping
>>Record (This is missing in the dropdown where we select the source table)
I am seeing the Record tag when there is more than one Record in the source xml file.
I am trying to achieve a unique map whether the xml has 1 Record or multiple records.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.