cancel
Showing results for 
Search instead for 
Did you mean: 

1:N Multimapping

Former Member
0 Kudos

I am already follwoing this weblog for my requirement

I am following weblog which is what i exactly need:

/people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi

but i am getting stuck up in my mapping, probably i am understanding it wrong or doing it wrong,

here is my source

<Request>

<Header>

<sapOrderNo>

<customerNo>

<adress>

<city>

<lineitemlist> 0..unbounded

<line item> 1...unbounded

<DeviceId1>

<Status1>

<model>

<date>

The line item will occur multiple times with different device ids and status. Lets assume that in the source 1st line item has status -A,2nd-statusB,3rd-Status-C..

my target should have

<Request>

<header>

<sapOrderNo>

<customerNo>

<adress>

<city>

<lineitemlist>

<line item>

<DeviceId1>

<Status1>

<model>

<date>

<Request>

<header>

<sapOrderNo>

<customerNo>

<adress>

<city>

<lineitemlist>

<line item>

<DeviceId2>

<Status2>

<model>

<date>

<Request>

<header>

<sapOrderNo>

<customerNo>

<adress>

<city>

<lineitemlist>

<line item>

<DeviceId3>

<Status3>

<model>

<date>

I am following you mapping but the target does not result as is expected.

I used the node fn useoneAsmany, mapped lineitemlist to 1st input,lineitem to 2nd input and status to 3rd input

I am right?Please advice

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Piyush,

This is how i did the mapping

my source is my target is

<Header> <header>

<OrderRequest>----


<OrderRequest>

<sapOrderNo>----


<sapOrderNo>

<customerNo>----


<customerNo>

<adress>----


<adress>

<city>----


<city>

<lineitemlist>----


<lineitemlist>

<line item>----


<line item>

<DeviceId1>----


<DeviceId1>

<Status1>----


<Status1>

<Model>----


<Model>

<date>----


<date>

Starting from field<orderRequest> i mapped <oderRequest>with headercontext, lineitem field with <header>context and line item with <lineitemList>context these 3 fields to useoneasmany node fn & put split by value between this node fn and target.Till the header element<city> i this mapping. after which i did a one-one mapping for the rest of the elements.

I tested the mapping with replicating line elements, well in the atrget my line items replicate but one one header appears,

i cannot retrive header for all the line elemnts,

Please advice

Former Member
0 Kudos

Hi Chaithra,

Can u please elaborate on the structure of your sender data type with all the occurences and correct hierarchy.

Also do mention the receiver structure with correct hierarchy.

I believe then i'll be able to suggest some solution for your issue.

Thanks & Regards,

Varun Joshi

Former Member
0 Kudos

Hi chaithra,

Remember, for mapping lineitemwith lineitemlist context to target_mt.

I hope you will get the desired structure.

If not just mail me screen shot of display queue and Source structure and coming target structure.

And desired output strcture.

My mail id is

piyushkailaschand.gangwal@cognizant.com

and

gangwal.piyush@gmail.com

Regards

Piyush

Former Member
0 Kudos

HI

inputs for UseAsMany are as follows:

take a case that you have to replicate sap order no as many times line item occur.

1. sap order no (Context c1)

2. line item(context c1)

3. line item(context c2)

So just apply proper inputs at UseAsMany function and you will see sap order no is replicated in target Strcture.

Note: use split by value between target and output of UseAsMany.

I hope you will get desired output.

Confirm.

Regards

Piyush

Former Member
0 Kudos

Hi chaitra..

I hope this should work with header mapping. Have u mapped ur Source header with Target header.

This should work for ur problem.

regards,

datta.