cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue

Former Member
0 Kudos

Hi all,

This is the source xml structure:

<E1KNVVM>

<E1KNVPM>

<PARVW>AG</PARVW>

<KUNN2>0000300622</KUNN2>

</E1KNVPM>

<E1KNVPM>

<PARVW>RE</PARVW>

<KUNN2>0000500569</KUNN2>

</E1KNVPM>

<E1KNVPM>

<PARVW>RG</PARVW>

<KUNN2>0000500569</KUNN2>

</E1KNVPM>

<E1KNVPM>

<PARVW>WE</PARVW>

<KUNN2>0000300622</KUNN2>

</E1KNVPM>

</E1KNVVM>

Where PARVW containing AG=a, RE=b, RG=c, WE=d is mapped to the target field ADDR_TYPE with (0..4) as the occurance and KUNN2 is mapped to the target field EXT_ADDR_ID with (0..4)

I want something in this way,

a,0000300622,b,0000500569,c,0000500569,d,0000300622

Any suggestions how to do this, I'm only getting one a,0000300622 even when I used UseOneAsMany and SplitByValue node functions.

Thanks,

Srinivas

Accepted Solutions (0)

Answers (2)

Answers (2)

GabrielSagaya
Active Contributor
0 Kudos

No need to use RemoveContext

You can use Explicit Context change

PARVW(change context to E1KNVVM)-------> ADDR_TYPE

KUNN2(change context to E1KNVVM)-------> EXT_ADDR_ID

/people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping

Former Member
0 Kudos

Hi,

guess you will need the removeContext-function.

But how does your target structure exactly look like?

Regards

Patrick

Edited by: Patrick Koehnen on Jun 30, 2008 5:30 PM

Former Member
0 Kudos

Patrick,

This is my target structure:

MT

DT (0..unbounded)

'

'

'

ADDR_TYPE (0..4)

EXT_ADDR_ID (0..4)

--

Srinivas

agasthuri_doss
Active Contributor
0 Kudos

Hi Srini,

As Patrick suggested can you try ( removeContext-function. )

Regards

Agasthuri Doss

Former Member
0 Kudos

I did its not working

Former Member
0 Kudos

Hi all,

This is the source xml structure:

<E1KNVVM>

<E1KNVPM>

<PARVW>AG</PARVW>

<KUNN2>0000300622</KUNN2>

</E1KNVPM>

<E1KNVPM>

<PARVW>RE</PARVW>

<KUNN2>0000500569</KUNN2>

</E1KNVPM>

<E1KNVPM>

<PARVW>RG</PARVW>

<KUNN2>0000500569</KUNN2>

</E1KNVPM>

<E1KNVPM>

<PARVW>WE</PARVW>

<KUNN2>0000300622</KUNN2>

</E1KNVPM>

</E1KNVVM>

Where PARVW containing AG=a, RE=b, RG=c, WE=d is mapped to the target field ADDR_TYPE with (0..4) as the occurance and KUNN2 is mapped to the target field EXT_ADDR_ID with (0..4)

I want something in this way,

a,b,c,d

Former Member
0 Kudos

Hi,

is your target structure like:

1)

MT

DT (0..unbounded)

ADDR_TYPE (0..4)

EXT_ADDR_ID (0..4)

/MT

or 2)

MT

DT (0..unbounded)

ADDR_TYPE (0..4)

EXT_ADDR_ID (0..4)

/DT

/MT

In first case it should work with removeContext or with the solution mentioned by Gabriel.

Regards

Patrick

former_member194786
Active Contributor
0 Kudos

Hi Srinivas,

You can duplicate your target side structure DT for 4 times and map it to a condition (createIf PARVW=AG/RE/RG/WE). And for each DT map the ADDR_TYPE to AG/RE/RG/WE and EXT_ADDR_ID to the corresponding value.

Regards,

Sanjeev.

Former Member
0 Kudos

Hi srinivas,

You change the context of PARVW, KUNN2 to higher level, ie. E1KNVVM and use the copy value function during mapping like;

PARVW --> CopyValue --> ADDR_TYP

KUNN2 --> CopyValue --> EXT_ADDR_ID

Please check this.

Regards,

Murugavel.