cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Message Mapping

suman_sourabh
Participant
0 Kudos

Hi Experts,

I am stuck in Message Mapping and do not know how to start, Please help me out to this situation:

Input structure (It may contain multiple Idoc ) all the below names are <Segments> the related fields are also coming in each <Segment>

Idoc1

Header1

      Charge1

            ChDoc11

      Charge2

            ChDoc21

           ChDoc22

     Charge3

Idoc2

Header2

     ChargeA

           ChDocA1

     ChargeB

     ChargeC

           ChDocC1

           ChDocC2

           ChDocC3

and Output requirment is a file with structure

<Header1 fields> <Charge1 fields> <ChDoc11 fields>

<Header1 fields> <Charge2 fields> <ChDoc21 fields>

<Header1 fields> <Charge2 fields> <ChDoc22 fields>

<Header1 fields> <Charge3 fields>

<Header2 fields> <ChargeA fields> <ChDocA1 fields>

<Header2 fields> <ChargeB fields>

<Header2 fields> <ChargeC fields> <ChDocC1 fields>

<Header2 fields> <ChargeC fields> <ChDocC2 fields>

<Header2 fields> <ChargeC fields> <ChDocC3 fields>

Thanks in Advance.

Regards,

Suman

Accepted Solutions (0)

Answers (3)

Answers (3)

suman_sourabh
Participant
0 Kudos

Hi Experts,

Thanks to your response.

I have developemd the Java Mapping for this solution.
and it works...

Regards,

Suman

Former Member
0 Kudos

If have example file posted here, others would propose suggestions.

Right now, it seems unclear for a couple points:

1. When you say it is mutiple IDOC, are they same type or not

2. Charge1 and Charge2 and Charge A and Chage B are same segment definition or different?

Regards

Liang

suman_sourabh
Participant
0 Kudos

Hi Liang,
Thanks for your response,
1. yes Multiple Idocs are of same type.. actually the input is XML Idoc from the SAP system.

so one file may contain multiple idocs of same type.

2. yes, Charge1 and Charge2 or ChargeA, ChargeB are same segment definition

Regards,
suman

suman_sourabh
Participant
0 Kudos

2. yes, Charge1 and Charge2 or ChargeA, ChargeB are same segment definition comes in two Idoc segments..

Regards,

Suman

rajasekhar_reddy14
Active Contributor
0 Kudos

Very simple

Create target structure like below

< Header 1> 1 to unbounded

< Header 2> 1 to unbounded.

Map Charge1------>Header 1 and duplicate Header1  2 times and map ChDoc21 to Header 1 , ChDoc22 to Header 1.

the same way try for others structure also.

Best Regards,

Raj

suman_sourabh
Participant
0 Kudos

Hi Raja,

Thanks for your response,

I saw your reply but not able to understand it.
Could you please make it more clear to me.e.

Thanks in advance

Regards,

Suman