cancel
Showing results for 
Search instead for 
Did you mean: 

N:1 mapping question

Former Member
0 Kudos

Hello, can any1 please help me achieve the following mapping,

Input Msg Types:

-


Header (0..1)

FieldH_A (0..1)

FieldH_B (0..1)

LineItemType1 (0..n)

FieldLN1_a (0..1)

FieldLN1_b (0..1)

LineItemType2 (0..n)

FieldLN2_a (0..1)

FieldLN2_b (0..1)

Output Msg Type:

-


OutMsg (0.1)

FieldOut_A (0..1)

FieldOut_B (0..1)

LineItems (0..n)

FieldLN_out_a (0..1)

FieldLN_out_b (0..1)

Mapping rules should be as following;

-


Header (0..1) -


> OutMsg (0.1)

FieldH_A (0..1) -


> FieldOut_A (0..1)

FieldH_B (0..1) -


> FieldOut_B (0..1)

LineItemType1 (0..n) -


> LineItems (0..n)

FieldLN1_a (0..1) -


> FieldLN_out_a (0..1)

FieldLN1_b (0..1) -


> FieldLN_out_b (0..1)

LineItemType2 (0..n) -


> LineItems (0..n)

FieldLN2_a (0..1) -


> FieldLN_out_a (0..1)

FieldLN2_b (0..1) -


> FieldLN_out_b (0..1)

Any help greatly appreciated.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Satish and Raj, thank you very much for your responses,

its difficult to explain really,

i have one header yes but 2 different types of lineitem segments,

so its 3 different data in input (1 header with 2 different type of segments), and 1 msg as output (1 for header and 1 for lineitems segments).

For each header there should be 1 output, but the 2 different lineitem types should be put into 1 type of segment in output type.

justin_santhanam
Active Contributor
0 Kudos

Okan,

Try this and lemme know the results.

Map LineItemType1 (0..n) <b>to</b> LineItems (0..n)

FieldLN1_a (0..1) <b>to</b> FieldLN_out_a (0..1)

FieldLN1_b (0..1) <b>to</b> FieldLN_out_b (0..1)

LineItemType2 (0..n) to LineItems (0..n)

FieldLN2_a (0..1) <b>to</b> FieldLN_out_a (0..1)

FieldLN2_b (0..1) <b>to</b> FieldLN_out_b (0..1)

Best regards,

raj.

Former Member
0 Kudos

Hi Raj,

i have corrected the image for mapping shown above; (corrected the output msgtype LineItems place) ..

how can i map the 2 different input segment to 1 segment in output type?

thanks!

justin_santhanam
Active Contributor
0 Kudos

Okan,

I'm sorry, I misunderstood, lemme figure it out and reply asap.

Best regards,

raj.

Former Member
0 Kudos

Hi Raj,

tried your approach, but can't directly map 2 different segments from input msgtype to 1 segment in output msgtype.

any other ideas?

Thanks

Former Member
0 Kudos

thank you very much, i appreciate your help!

justin_santhanam
Active Contributor
0 Kudos

Okan,

Got it, hope it helps you.

In target node LineItems (0..n) right click on that and click duplicate subtree. Now map directly, I mean first lineitem to the the original LineItems(0..n) and the second lineitem to Duplicated LineItems(0..n).

Please let me know the results.

Best regards,

raj.

Former Member
0 Kudos

thank you very much, that solved it.

points awarded, many thanks!

justin_santhanam
Active Contributor
0 Kudos

Okan,

I've to be thankful, bcoz each and every question in this forum makes me to anlayze and learn better. Thanks once again.

Cheers!!

Raj.

Answers (2)

Answers (2)

justin_santhanam
Active Contributor
0 Kudos

Okan,

Is it possible for you to show the sample input and output payload as you needed. It will be more helpful to give best soln.

Best Regards,

raj.

Former Member
0 Kudos

Hi,

Raj, i've tried to explain better by the following artwork 😛

so i need to map 2 different type of segments from input type into 1 type of segments on output type.

<br><br>

<img src="http://img14.imgspot.com/u/07/155/21/mappingissue3.JPG">

<br>

Satish, you are right, its not N:1, i just didn't know how to describe it best

Message was edited by:

Okan Yarligan

Message was edited by:

Okan Yarligan

Former Member
0 Kudos

Okan,

I dont see anything here N:1 mapping. What I understand you want to map header to a header structure and all the lineitems to the lineitems. If you have 3 lineitems in source then in target you have to have 3 linitems.

If this is what you are trying to then map the header to header and detail to detail and do one to one mapping. This is very stragiht forward. Hope this is what you are looking for?

---Satish