cancel
Showing results for 
Search instead for 
Did you mean: 

Complex mapping

Former Member
0 Kudos

Hi Experts,

Could you tell me, how to do the below message mapping

Case 1:

If any of the 0 to unbounded segment has only one source segment with NAME="WEL" and PNum=100

then I have to map it to only one target field in Target1 segment.

Case 2:

If any of the 0 to unbounded segment has only one source segment with NAME="WEL" and PNum != 100

then I have to map it to only one target field in Target2 segment.

Case 3:

If any of the 0 to unbounded segment has

(1) 2(any number) source segment with NAME="WEL" and PNum = 100 then I have to map it to two target1 segment's field values.

(2) 2(any number) source segment with NAME="WEL" and PNum != 100 then I have to map it to two target2 segment's field values.

Case 4:

If any of the 0 to unbounded segment has

(1) 2( greater than one ) source segment with NAME="WEL" and PNum = 100 &

(2) 2(greater than one) source segment with NAME="WEL" and PNum != 100 &

(3) 1 source segment with NAME="CRD"

then I have to map to one target field in Target2 segment

Regards

Sara

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi sara

write down simple java UDf for each case condition and assign the target according to that

in the If part keep ur current condition and in the else part keep ur another case.

hope this may help u

\

thanks

sandeep sharma

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sara,

What is the relationship between the source and target?

The source is 0:unbounded. Is this from an Idoc?

What is the occurance of target1 and target2? 1, 0, N?

Former Member
0 Kudos

Yes, this IDOC to File scenario.

Target field also 0 to unbounded.

Regards

Sara

Former Member
0 Kudos

Hi Sara,

If your mapping has more complex logic, I recommend You use "Java Mapping", so inside this You can Take the Control of all you input and ouput files then you can develop the logic easier.

I leave You a useful link:

I hope It helps You.

Ivan