cancel
Showing results for 
Search instead for 
Did you mean: 

syndicator not taking default value for XML element

Former Member
0 Kudos

Hi,

I have a quite an unusual problem! I need to syndicate few records into an .xml file structure. I selected "Destination Properties" , type->XML Schema File and entered the .xsd file that i have saved in my system.

My .xsd file is as shown below-


xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Countries" type="RecordType"/>
<xsd:complexType name="RecordType">
<xsd:sequence>
<xsd:element name="CountryCurrency" type="CurrencyType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CurrencyType">
<xsd:sequence>
<xsd:element name="Country" type="xsd:string" default="some country"/>
<xsd:element name="Currency" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema> 

I want the syndicated .xml to take the value "some country" for the element Country when it is not mapped with any field in the main table.

But when i view the syndicated file the element Country is empty!!!!!

If i map it with some field in the Table, element Country correctly picks up that value!

I know this sounds very weird, but i'm just wondering whether syndicator does not recognise the <i>default</i> attribute in an XML element.I also tried giving the attribute <i>fixed</i>, but no luck!!

Have anyone of you faced the same problem?

Regards

Swarna Deepika.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

We have the same problem. It looks like Sydnicator doesnt pick up default values defined in XSD.

We also tried Enumeration values in XSD which doesnt work.

We figured that Syndicator uses the XSD for just the structure of the XML and not for any of the Enumeration values, default values etc in the XSD.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vadim and Adhappan,

I found a work around for this problem, in the destination items of the item mappings tab, manually type a value in the Source field.This is taken as a fixed value.Once this field is mapped the value is automatically overridden by the mapped value.

There is no option for setting default value,I believe!

Thank you!

Regards

Swarna

Former Member
0 Kudos

Hi Swarna,

but if you map 10 values in the syndicator to your predefned schema and you create a xml file with it. Assume this file contains now only 8 tags with values since 2 mapped values did not exist on MDM side.

XI is suppose to pick the file up and perform the mapping based on the same XML schema. The file will not be taken by XI since the XML file does not contain the same number of fields that XI is expecting based on the XML schema.

Does anyone know how to handle this?

This is a very common demand for a centralization scenario where you have to syndicate data back to R/3.

How do you still keep the orginal XML schema in the XML file also without having values?

Thanks for answering.

BR

Nicolas

Former Member
0 Kudos

hi Nicolas,

Mark those two elements as "required" which means,even if their value is null, they will be present in the syndicated file.

Regards

Swarna

Former Member
0 Kudos

Hi Swarna,

that is correct. Thanks. It didn't seem to work before but now I get my needed results

BR

Nicolas

Former Member
0 Kudos

Hi, Swarna

I modelled your situation and got same results - default value is not being filled.

In <a href="http://help.sap.com/saphelp_mdm550/helpdata/en/7e/246ed2b8c94b049e3cf401dd263c54/content.htm">syndicator docs</a> it's mentioned that there are special properties in Destination Item tab of MDM Syndicator - 'Static Text' and 'Default Text' which seem to carry the same functionality as XSD's 'default' and 'fixed' attributes. But I couldn't find these in my SP04 Patch3 5.5.35.16 version of MDM Syndicator.

Regards,

Vadim