cancel
Showing results for 
Search instead for 
Did you mean: 

Creating multiple cardinality target elements in mappings

Former Member
0 Kudos

I need to create multiple cardinality element where the child elements have different mapping each time.

For example -

For First time, I need to map it from one structure and next time I need to map constant values to same elements and third time from some another source structure.

The target is IDOC where few elemnts have 0 to 15 cardinality.

We can use Message Type to solve this issue. But can we use directly IDOC in message Mapping and how? We can use XSLT but it is really slow.

Can we use UDF to do this? How we can create new Node and then add subelements to it?

Thanks for all your help in advance.

Sandeep

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

As mentioned by Mark, you can right click on node in mapping and say 'Duplicate subtree'.

It will create the same substructure, like that you create the as many number of substructures as you want.

Then depending upon the requirement you can map them with the required conditions.

-Supriya.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Mark, Supriya,

I was able to get it through by using Duplicate Subtree.

When I tried before, I have not mapped a constant to main node and was doing only chid mappings. After I assigned a constant the main node which I am triying to duplicate, it solved the issue.

Thanks for all your help.

Regards,

Sandeep

Former Member
0 Kudos

Thanks Mark and Supriya. I already tried doing Duplicate Subtree. But when I try to save the mappings, it gives be below error -

The source structure, target structure, or a function library has been changed or could not be found in the Enterprise Services Repository. The mapping definition contains elements or attributes that do not exist in the changed structure, or functions that were changed in a function library. The relevant entries will be deleted.

Node with path /ORDERS01/IDOC/E1EDK14 not found in source structure Target structure has no such path: /ORDERS01/IDOC/E1EDK14[1]/@SEGMENT. Skipping mapping

Are there any settings that need to be followed to use Duplicate Subtree that I am missing here?

Thanks

Sandeep

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Sasndeep,

In your message mapping, right-click on the target node and then click duplicate subtree. This should solve your problem.

Hope this helps,

Mark