on 08-21-2011 11:19 AM
Hi experts,
I have an requirement to generated Unbounded IDoc's , so i changed the occurrence as below:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="FIDCCP02">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="IDOC" type="FIDCC2.FIDCCP02" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="FIDCCP02.E1FISEC">
<xsd:annotation>.........................................
It works well.However I have to create element FIDCCP02 if & only if C_ERROR flag = pass. The graphical mapping works well only if C_ERROR = pass.In C_ERROR = fail, error pops up
'Cannot create target element FIDCCP02. Values missing in queue context. Target XS~'
Because of FIDCCP02 has occurrence 1.1.
I changed the XSD file to :
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="FIDCCP02" minOccurs="0" maxOccurs="1" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="IDOC" type="FIDCC2.FIDCCP02" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="FIDCCP02.E1FISE2">...................
It gives an error:
Cause: Loaded document contains incorrect XSD definition
Attribute "minOccurs" with the value "0" is not permitted in the "/schema/element("FIDCCP02")" element
Attribute "maxOccurs" with the value "1" is not permitted in the "/schema/element("FIDCCP02")" element
Please provide inputs.
Edited by: kevindass on Aug 21, 2011 12:20 PM
Hi Kevindass,
FIDCCP02 is root element of XML. In a well formed XML, root element occurrence is always one.
Well formed XML
<?xml version="1.0" encoding="utf-8"?>
<root>
<records>
<record1 />
<record2 />
</records>
</root>
Not Well formed XML u2013 Graphical mapping or External definition or DT of ESR will not allow
<?xml version="1.0" encoding="utf-8"?>
<root>
<records>
<record1 />
<record2 />
</records>
</root>
<root>
<records>
<record3 />
<record4 />
</records>
</root>
If you want to create FIDCCP02, if C_ERROR flag = pass, put this condition in Receiver determination and select suppress when no receiver is found.
Regards,
Raghu_Vamsee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Try..
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="FIDCCP02">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="IDOC" type="FIDCC2.FIDCCP02" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="FIDCCP02.E1FISEC">
<xsd:annotation>.........................................
Regards
Monica
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.