cancel
Showing results for 
Search instead for 
Did you mean: 

change node cardinality in message mapping

maartenf
Participant
0 Kudos

Hello,

I have a question regarding graphical message mapping from iDoc to cXML. It's the first time I do a (fairly) complex mapping so any help is greatly appreciated!

I'm supposed to map a value from the iDoc with 0...10 occurences to a value in the cXML with just 1 instance. This doesn't seem to work because (I think) it tries to map it multiple times and that's not permitted. When testing the error "Cannot create target element /cXML/..." occurs.

Example:

Source node:

<node>

  <value1>012</value1>

  <value2>20120703</value2>

</node>

           

<node>

  <value1>011</value1>

  <value2>20120810</value2>

</node>

I should map value2 to the external message when value1 = 011. How can I say it should ignore the other node (with value1 = 012) Is this possible in a graphical mapping?

Thanks in advance!

Kind regards,

Maarten

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Maarten,

This should be doable using the ifWithoutElse function e.g

value1 --> equalsS --> ifWithoutElse -> removeContext -> Target

Constant: 011 -> /   value2 -> /

Hope this helps,Mark

former_member184681
Active Contributor
0 Kudos

Seconds ahead

maartenf
Participant
0 Kudos

Hi Mark,

Thank you, this is the solution. I was really close, just didn't have the removeContexts. I'm not sure yet what it actually does, I'm going to look it up now.

Kind regards,

Maarten

markangelo_dihiansan
Active Contributor
0 Kudos

Only sometimes Most of the time, you have already posted first haha

iaki_vila
Active Contributor
0 Kudos

This seems the far west, only the fasters survive

Regards.

Answers (1)

Answers (1)

former_member184681
Active Contributor
0 Kudos

Hi Maarten,

Use the mapping like this one:

value1 -> equalsS(011) -> ifWithoutElse(value2) -> target

This should get the job done for you.

Also, have a look at my blog , I believe you might find it helpful to consolidate your knowledge about the basic principles of graphical mapping.

Regards,

Greg