cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Problem.

Former Member
0 Kudos

Hi Experts,

My sender XML Structure is like :

CNR

field1

field 2

-


> LIR

field_1

field_2

-


> ISR

field_1

field_2

ATR

field1

field2

TTR

field1

field2

Receiver Structure is like :

CNR

field1

field 2

LIR

field_1

field_2

ISR

field_1

field_2

ATR

field1

field2

TTR

field1

field2

In receiver side LIR and ISR are not inside the loop of segment CNR.

when I am mapping the segments, result is like :

CNR1

CNR2

LIR1

LIR2

ISR1

ISR2

ATR1

ATR2

TTR1

TTR2

It is wrong for my requirement :

I need result

CNR1

LIR1

ISR1

ATR1

TTR1

CNR2

LIR2

ISR2

ATR2

TTR2

How I can do it ?

Please help,

Regards,

Study SAP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Chk with the Context while mapping

Answers (4)

Answers (4)

ranjit_deshmukh
Active Participant
0 Kudos

Hi,

Basically you need to understand some essentials here:

sender XML Structure is like :

CNR

field1

field 2

-


> LIR

field_1

field_2

-


> ISR

field_1

field_2

ATR

field1

field2

TTR

field1

field2

Receiver Structure is like :

CNR

field1

field 2

LIR

field_1

field_2

ISR

field_1

field_2

ATR

field1

field2

TTR

field1

field2

As per the description above it seems that in the target structure the parent nodes CNR,LIR,ISR,ATR&TTR do not have a higher parent; which you will need to create in order to create a distinct group of fields.

If you do not do so- even if there are 2 instances of CNR they will be grouped together because they carry the same name.

In short please change your target structure as:

<grp1> (0...unb)

<CNR/>

<LIR/>

<ISR/>

<ATR/>

<TTR/>

</grp1>

In this way you can get your desired output.

Ranjit

hemant_chahal
Contributor
0 Kudos

Yes Ranjit is right. You have to set the occurrence of top most node as 0 - 2.

Former Member
0 Kudos

Thanks to all,

Yes, The Solution given by Ranjit is working absolutely fine,

Regards,

Study SAP

Former Member
0 Kudos

Hi...

You can use remove contexts and collapse contexts.

Go through the below link. i Think this may help u.

http://help.sap.com/saphelp_nw04/helpdata/en/1f/ea0fb12403844bbb6c4cbc8a00cda9/frameset.htm

shivhare
Active Contributor
0 Kudos

Hi

usecontext message mapping

Former Member
0 Kudos

can any one have idea ?

Please help,

Regards,

Study SAP