cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue with repeating segment

venkatagiri_gongadi
Participant
0 Kudos

Hi

How to populate segments and fields at target side for below scenario,

source:

seg1

fld1

fld2

fld3

seg2:

fld1

fld2

fld3

fld3

fld2

fld2

fld1

expected output will be, need to compare seg1 and seg2,if fld values are equel the then populate segasand  flds at target side as below:

Target:

seg1:

fld1

seg2:

   fld1

   fld1

seg1:

fld2

seg2:

   fld2

   fld2

seg1:

fld3

seg2:

   fld3

   fld3.

i tried with mapping funtions to handle segments ocuurence at target and i am not able to do it,can you please provide solutions.

Thanks in  Advance,

Venkatagiri

Accepted Solutions (0)

Answers (3)

Answers (3)

venkatagiri_gongadi
Participant
0 Kudos

Thanks All,

it was resolved by UDF.

Regards,

Venkatagiri

former_member201264
Active Contributor
0 Kudos

Hi Gongadi,

Could you please share your UDF.

Regards,

Sreeni.

venkatagiri_gongadi
Participant
0 Kudos

Hi,

please find UDF below,

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

{

for(int j = 0; j < b.length; j++)

{

//if(a[i].compareTo(b[j]) > 0 )

if(a[i].equals(b[j]))

{

result.addValue(b[j]);

}

}

}

Regards,

Girii

Former Member
0 Kudos

HI Venkat,

Your requirement is not clear.I believe you haven't received any valid response from others due to this.

Paste the xsd structure of i/p and o/p say field name ,occurrence and hierarchy(at least piece of logic that you are feeling tough)

Try to show with an example how the i/p and o/p xml structure is ?

Regards

Venkat

Former Member
0 Kudos

I guess you need to write a UDF...