cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Issue ::(

Former Member
0 Kudos

Hi Folks,

I have two structures Source and Target :

Source Structures contains Header Line as well as Multiple Line Items..

In target structure i want to push all the Line Item data with Header Line data source structure into one record of target structure so. for n line items i want to generate n Records for Target structure..

It seems simple....but i don't know where i am missing..

I have made occurence of target structure node as 1...many

Simlarly Source Structure node is also one to many but not headerline..

*********************************************************************

Source Stucture

<Data>

<F1>H</F1>

<F2>H</F2>

<LineItem>

<L1>1</L1>

<L2>2</L2>

</LineItem>

<LineItem>

<L3>3</L3>

<L4>4</L4>

</LineItem>

</Data>

*****************************

Expecting this output after message mapping..

<Data>

<F1>H</F1>

<F2>H</F2>

<L1>1</L1>

<L2>2</L2>

</Data>

<Data>

<F1>H</F1>

<F2>H</F2>

<L3>3</L3>

<L4>4</L4>

</Data>

Let me know if some other informations are required..

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

you want to repeat node Data at target no of times LineItem comes in source so

LineItem ---> Data

F1,F2 you want to repeat no of times Data occuring at target.. tht means no of times LineItem occurring in source.. you need to use useOneAsMany here

1st input -- F1 (context to root)

2nd --> L1(from LineItem context to root) or LineItem itself.. check this out

3rd parameter --> L1 (cotext to data)

Refer this for useOneAsMany

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

L1,L2,L3.L4 map directly.. take contexts into consideration

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanx folks,

For sharing the knowledge with me..but the situation gets complex when pushing the data into a table as you know the context chnages very often in Receiver structure..

As in my case for every line item i want to insert 1 record into table ( record means header data with Line Item ).

so for this i have mapped line item in source side( 1...unbounded ) with STATEMENT tag in target structure..

now the catch here is the data(fields) should go to access node under STATEMENT node..as we use STATEMENT tag only for executing the action attribute.

Hope i am clear..

<b>Help required urgent..!!!( If anybody can share his experience of pushing multiple line items in a table it would be great..)</b>

Regards,

nikhil_bose
Active Contributor
0 Kudos

hi santhosh,

assign the header with respect to the occurance of Lines in the source. assing the header node as it is. use createif to do the rest.

refer:

/people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

regards,

nikhil bos

GabrielSagaya
Active Contributor
0 Kudos

You can use <b>UseOneAsMany</b> Node function in order to replicate the header as many no of line items.

You should use 3 param for input.

Former Member
0 Kudos

Karthikeyan,

That i know i have to use node functions but how to do....can you give an idea.....there is no logic simple data exchange....

Regards,

Former Member
0 Kudos

Hi

you need to use four or five different node funstions to achieve the same like remove context , splitbyvalue,....

cheers!