Skip to Content
avatar image
Former Member

Mapping of field with MinOccurs 0 in SAP XI 2.0 SP5

Hi,

Our Scenario is

File -> Adapter -> XI -> Idoc Adapter -> SAP

We are trying to push IDoc and the mapping tool is giving an error. I am providing the error that I am getting.

The snippet of the XSD for the IDoc is given below:

_________________________________________________________

http://www.w3.org/2001/XMLSchema">

<xsd:annotation>

<xsd:documentation>FI Document Header (BKPF)</xsd:documentation>

</xsd:annotation>

<xsd:complexType>

<xsd:sequence>

http://www.w3.org/2001/XMLSchema">

<xsd:annotation>

<xsd:documentation>Name of global company code</xsd:documentation>

</xsd:annotation>

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:maxLength value="6" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

http://www.w3.org/2001/XMLSchema">

<xsd:annotation>

<xsd:documentation>Accounting Document Number</xsd:documentation>

</xsd:annotation>

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:maxLength value="10" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

http://www.w3.org/2001/XMLSchema">

<xsd:annotation>

<xsd:documentation>Fiscal Year</xsd:documentation>

</xsd:annotation>

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:pattern value="\d+" />

<xsd:maxLength value="4" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

http://www.w3.org/2001/XMLSchema">

<xsd:annotation>

<xsd:documentation>Document type</xsd:documentation>

</xsd:annotation>

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:maxLength value="2" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

http://www.w3.org/2001/XMLSchema">

<xsd:annotation>

<xsd:documentation>Document Date in Document</xsd:documentation>

</xsd:annotation>

</xsd:element>

http://www.w3.org/2001/XMLSchema">

<xsd:annotation>

<xsd:documentation>Posting Date in the Document</xsd:documentation>

</xsd:annotation>

</xsd:element>

http://www.w3.org/2001/XMLSchema">

<xsd:annotation>

<xsd:documentation>Fiscal Period</xsd:documentation>

</xsd:annotation>

<xsd:simpleType>

<xsd:restriction base="xsd:string">

<xsd:pattern value="\d+" />

<xsd:maxLength value="2" />

</xsd:restriction>

</xsd:simpleType>

</xsd:element>

_________________________________________________

In this snippet as can be seen the minOccurs for the BUKRS field is 0. But if I do not map the field its giving me following error.

/usr/java131/bin/javac -encoding UTF8 -classpath .:./system-lib/boot.jar:./system-lib/jaas.jar -extdirs ./additional-lib:./services/deploy/work/applications/ExchangeRepository -d /tmp/9_53_35_27_7_2004 /tmp/9_53_35_27_7_2004/com/sap/xi/tf/_MsgMapGcentre2Fidcc2_.java

/tmp/9_53_35_27_7_2004/com/sap/xi/tf/_MsgMapGcentre2Fidcc2_.java:303: ';' expected

a117.gotoNextContext();tmpValAtr = a117.getValue();if (!tmpValAtr.equals(SUPPRESS)) handler.addAttribute("SEGMENT", tmpValAtr);a117.gotoNextValue();if (!__deflt)a115.gotoNextValue();No mapping for value/FIDCCP02/IDOC/E1FIKPF/BUKRS

^

/tmp/9_53_35_27_7_2004/com/sap/xi/tf/_MsgMapGcentre2Fidcc2_.java:303: cannot resolve symbol

symbol : class No

location: class com.sap.xi.tf._MsgMapGcentre2Fidcc2_

a117.gotoNextContext();tmpValAtr = a117.getValue();if (!tmpValAtr.equals(SUPPRESS)) handler.addAttribute("SEGMENT", tmpValAtr);a117.gotoNextValue();if (!__deflt)a115.gotoNextValue();No mapping for value/FIDCCP02/IDOC/E1FIKPF/BUKRS

^

2 errors

Compilation error

____________________________________________

Any one having any guesses on why this error is coming. I know this error would vanish if we map the field by an Empty Constant. But then it would start giving error for the next field until all the non mandatory fields are mapped.

If however I go ahead and map all the fields then the output structure generates all the segments the maxOccurs times. i.e. if a segment is occuring 999 times then that segment is repeated that many time in the output whereas I never needed that segment in the output.

Can any one suggest as to why this is happening. Am I doing some thing wrong or this is a problem with Mapping Editor in XI 2.0 SP5.

Ashish

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Jul 28, 2004 at 06:03 AM

    Hello Ashish,

    this is a bug in the mapping tool. You have to apply the note 730081. It says:

    Symptom

    After you import XI20 Support Package 04 or Support Package 05, you can

    no longer change and regenerate the message mapping (graphic mapping

    tools).

    The following error is displayed during activation or generation: No

    Mapping for value.......

    Other terms

    Graphic mapping tools, SAPINTSER05, no mapping vor value

    Reason and Prerequisites

    This problem is caused by a translation error.

    Solution

    The translation error has been corrected.

    As of patch level 1, the correction is provided in the SAPINTSER05_1.sca

    archive of the INTEGRATION Services 2.0 software component and, as of

    patch level 2 for Support Package 5, it is provided in the

    SAPINTBUI05_2.sca archive of the INTEGRATION BUILDER 2.0 software

    component. The archives are available on the SAP Service Marketplace at:

    http://service.sap.com/patches

    SAP EXCHANGEINFRASTRUCTURE/SAP EXCHANGEINFRASTRUCTURE 2.0

    Binary Patches/INTEGRATION SERVICES 2.0/OSINDEP and

    ..... /INTEGRATION BUILDER 2.0/OSINDEP

    Import the archives using SDM.

    The mapping must be recompiled after deployment.

    Regards Franz

    Add comment
    10|10000 characters needed characters exceeded