cancel
Showing results for 
Search instead for 
Did you mean: 

XI mapping - Add record to destination structure

Former Member
0 Kudos

Hi,

We have the following mapping scenario...

Source structure

-


<Record 1> - Value 100

<Record 2> - Value 100

<Record 3> - Value -150

<Record 1>

<Record 2>

<Record 3>

<Record 4>

Destination structure

-


<Record 1> - Value 100

<Record 2> - Value 100

<Record 3> - Value -150

<New Record 4> - Value -50

<Record 1>

<Record 2>

<Record 3>

<Record 4>

All records have the same field structure. Is there a way to create this new record using the XI graphical mapping tool???

Regards,

Pete

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pete,

You can have a <New Record 4> field in target message type and than map it to some constant value or any source message type field etc.

From where value 50 is coming? Is it a constant value.

Regards,

Satish

stefan_grube
Active Contributor
0 Kudos

> From where value 50 is coming? Is it a constant

> value.

Maybe the sum of the other values?

That can done with the statistic function <i>sum</i>.

Stefan

Former Member
0 Kudos

This is for a finance document posting. We are provided with records, but need to add an additional tax record to the destination which is the difference of the previous lines to balance the document. There can be a variable number of documents in the entire message.

<record 1> value 100

<record 2> value 100

<record 3> value -150

This has a resultant value of -50, so we need to create the new record 4 in the destination with this value. Essentially...

Source = 3 records

Destination = 4 records

How do we create this additional record?

Thanks,

Pete

Message was edited by: Peter White

Former Member
0 Kudos

This is for a finance document posting. We are provided with records, but need to add an additional tax record to the destination which is the difference of the previous lines to balance the document. There can be a variable number of documents in the entire message.

<record 1> value 100

<record 2> value 100

<record 3> value -150

This has a resultant value of -50, so we need to create the new record 4 in the destination with this value. Essentially...

Source = 3 records

Destination = 4 records

How do we create this additional record?

Thanks,

Pete

Former Member
0 Kudos

As i said cant you create a target message type in integration repository with the field name record 4 and populate in message mapping with as stefan suggested (using statistics standard function).

Your will have 2 message type one for source structure 3 records and other for target structure with 4 fields.

Hope i am clear.

Regards,

Satish

stefan_grube
Active Contributor
0 Kudos

Should the 4th record have the same tag name as the previous? In that case, you can right click on the target node and choose <i>duplicate subtree</i>. You will now have two appearancies of the node and can assign the function <i>sum</i> to the second.

Regards

Stefan

Former Member
0 Kudos

Thanks Stefan,

Got it now by duplicating the row in the target structure and using a

<Row Id> --> sort --> removeContexts --> SplitbyValue --> collapseContexts --> <row root node>

Thanks again for your help...