cancel
Showing results for 
Search instead for 
Did you mean: 

Idoc occurrence error

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

RaghuVamseedhar
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Check this thread:

Thanks,