cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Problem

Former Member
0 Kudos

Hi all,

I have a Source structure,

MT_Message 0---->Unbounded

Article Number

Article Description

MT_SubStructure 0--->Unbounded

Additional Article Number

and i have to map this to target structure.

MT_Target_Message 0---->Unbounded

Article Number

Article Description

Additional Article Number

So thare may exist more than one Additional Article Number for a single article,and each of the target record should contain :"Article Number Article Description Additional Article Number"

For example:

source has

========

1016 Test Article

31 (Additional article number)

21

13

then........

Target should be.

1016 Test Article 31

1016 Test Article 21

1016 Test Article 13

Could anybody tell me how can i do this....do i need to use context..handlers....?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

<b><i>"The value in 1st input will be repeating as many times the no. of values in 2nd input and context change will be inserted in the output queues depends on the context changes in the 3rd input"</i></b>

Hi so could you tell me what would be the three inputs for this Case, I am a bit confised here... thanks for your reply.

Former Member
0 Kudos

Hi

The first input is Article number.

second input is Additional Article number with context as MT_Message.

The third input will be Additional article number with context as MT_SubStructure.

Similarly you have to use this for Article Description too.

Hope this helps you out.

Thanks and Regards,

Vineetha

Answers (4)

Answers (4)

former_member181955
Contributor
0 Kudos

Hi Anjan

You can achieve this by using node functions removecontex ( ) and SplitByValue() and check the following UDF.

for(int i=0;i<a.length;i++)

{

result.addValue(b[0]);

}

pass two parameters:1 Additional Ariticale Number ( that many times loop get repeated)

2.Ariticle Number( value to be repeated)

in the mapping use splitbyvalue node function to insert context change.

thanks

Prasad Babu Nemalikanti

91-9960226467/ 91-9849065377

Former Member
0 Kudos

Hey thanks a lot i am sure this would work, thanks again.

Former Member
0 Kudos

Hi

Yes,In Mapping editor Right click on Additional Article Number

and change the context of it Mt_Message.

Thanks,

Tuhin

Former Member
0 Kudos

Hi

This is the typical scenario where we have to make use of useOneAsMany standard Node function.

This function has three inputs:

1st input: value to be repeated

2nd input: must have same no. of context change has first queue

3rd input: must have same no. of values as in 2nd input.

The value in 1st input will be repeating as many times the no. of values in 2nd input and context change will be inserted in the output queues depends on the context changes in the 3rd input

In case of any doubt feel free to revert back the same.

Thanks and Regards,

Vineetha