Skip to Content
0
Former Member
Aug 21, 2011 at 10:19 AM

Idoc occurrence error

117 Views

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"?>

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 :

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