cancel
Showing results for 
Search instead for 
Did you mean: 

problem with multi-mapping

Former Member
0 Kudos

Hello everybody,

we got a problem with multi-mapping.

Source and target message-type are the same:

<xsd:element name="MY_MESSAGE_TYPE">

_<xsd:element name="BUSTRANS">

__<xsd:element name="CHILD_1" maxOccurs="unbounded">

___<xsd:element name="SUB_CHILD_1" maxOccurs="unbounded">

____<xsd:element name="SUB_CHILD_1_NAME" type="xsd:string">

__<xsd:element name="CHILD_2" maxOccurs="unbounded">

___<xsd:element name="SUB_CHILD_2" maxOccurs="unbounded">

____<xsd:element name="SUB_CHILD_2_NAME" type="xsd:string">

The requirements are:

<xsd:element name="MY_MESSAGE_TYPE"> should be created as often as <xsd:element name="CHILD_2"..> occurs

a) so we mapped

CHILD_2 -> MY_MESSAGE_TYPE

BUSTRANS -> CopyValue -> BUSTRANS

CHILD_1 -> CopyValue -> CHILD_1

SUB_CHILD_1 -> CopyValue -> SUB_CHILD_1

SUB_CHILD_1_NAME -> CopyValue -> SUB_CHILD_1_NAME

CHILD_2 -> splitByValue(eachValue) -> CHILD_2

The problem is:

If we duplicated

a) SUB_CHILD_1

b) subtree CHILD_2 (so 2 messages will be generated)

for testing, SUB_CHILD_1 only occurs 1 time! But we need it in every target message as often as it occurs in the source message.

For your testing, here is the datatype:

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://enbw.com/XI/SAPCRMB2B/javamappings_test" targetNamespace="http://mynamespace.com/XI/SAPCRMB2B/javamappings_test">

<xsd:complexType name="MultipleBookingOrderRequest">

<xsd:sequence>

<xsd:element name="BUSTRANS">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="CHILD_1" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="SUB_CHILD_1" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="SUB_CHILD_1_NAME" type="xsd:string">

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="CHILD_2" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="SUB_CHILD_2" maxOccurs="unbounded">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="SUB_CHILD_2_NAME" type="xsd:string">

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:schema>

Regards

Dominic

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member192798
Active Contributor
0 Kudos

Hi Dominic,

You need to change the occurrence. For testing purpose, you can right click and create one more.

I hope this helps.

Regards.

Praveen

Former Member
0 Kudos

Hi Praveen,

that's not possible because it's an IDoc...

Dominic

Former Member
0 Kudos

hi,

Multi mapping for idoc is not possible. You need to do it in bpm. Multi mapping can be done only for adapters on J2EE engine.

regards,

wojtek

Former Member
0 Kudos

Hi wojtek,

multimapping (split IDOC into several IDocs) is possible with IDocs. We did it!

But that does'nt solve Dominic's problemt

Regards Mario

bhavesh_kantilal
Active Contributor
0 Kudos

Mario,

<i>multimapping (split IDOC into several IDocs) is possible with IDocs. We did it!</i>

Did you use IDOC packaging for this?

AFAIK,when you use multimapping that involves different adapters including one J2EE adapter and a IDOC adapter in the inbound side, multi mapping does not work.

Regards,

Bhavesh