cancel
Showing results for 
Search instead for 
Did you mean: 

n source 1 target.

Former Member
0 Kudos

Hi Experts,

I have a scenario where i am receiving a file where it can have three different structures.

This file has to be mapped to an Idoc structure.

can it be done using single message mapping or do i need to create three MM.

How to go about it.

Source side structure can be of this type.

Root

- name

- age

- height

Root

-name

-weight

Root

-name

-age

-color

Thanks all.

Accepted Solutions (1)

Accepted Solutions (1)

former_member192295
Active Contributor
0 Kudos

HI,

One Mapping is enough, if source is file use FCC it will solve easily. Take occurence in source end, it will help to pick more then one records.

Answers (5)

Answers (5)

Former Member
0 Kudos

solved

Former Member
0 Kudos

Hi ,

I am sorry I believe I was not very clear.

Thing is i am getting a file with three structure.

Structure 1 has 33 fields,

Structure 2 has 29 fields,

Structure 2 has 21 fields,

Fields of structure 1,2 and 3 can be different and mapped to different segment in the idoc

Now I have to map these structures to Idoc ( Only one structure will be coming at a time. ).

Kindly help.

Former Member
0 Kudos

Hi

You can do that in ur message mapping , Go to the Messages Tab (the 3rd one ) in ur MM editor,

You add more than one Message Type in the Source and select ur target IDOC

Regards

Krishna

Former Member
0 Kudos

Hi Krishna,

OK I can define 3 MT in MM but how do i determine which one to use at runtime according to data coming.

Akhil

Former Member
0 Kudos

Hi Akhil,

Now tell me how is ur message coming in the source.

What do u mean by saying that ur file has 3 root nodes???

It cant be 3 root nodes. Each XML file is supposed to have one root nodes with how many ever nested nodes?

Can u be clear here??

better, if u can give as a sample input

Regards

KRishna

Former Member
0 Kudos

Hi Krishna,

Thing is when the file gets created it can have any of the three structures given below.

Now I had to map these structure to Idoc fields according to their values.

Structure ONE

File No ( Destination )

File No ( Transmission Date )

Receiver's ID

Data ID

Record ID

Buyer Code

Invoice No

Currency code

Vanning Plant

Invoice Total Weight ( kgs )

Invoice Total Volume ( M3 )

Invoice Total Price

Structure TWO

File No ( Destination )

File No ( Transmission Date )

Receiver's ID

Data ID

Record ID

Buyer Code

Invoice No

Container No.

NML's Container ID No.

Container size

Filler

Container Gross Weihgt (kgs)

Container Gross Cubic Meter (M3)

FOB Price Amount ( Container Total )

Container Seal Number

Container Dock Location

Due Date

Structure THREE

File No ( Destination )

File No ( Transmission Date )

Receiver's ID

Data ID

Record ID

Buyer Code

Invoice No

Container No.

CLP Loading Location

Parts No.

RAN

Vanning Plant

Parts Quantity

Parts Piece Price

Parts Total Net Weight (kgs)

Box No.

External Package Module

Order No.

Case Gross Weight

Parts Description

NML's Container ID No.

Internal Package Module

Number of the carton box

Linefeed Location\

How do i Know which structure is coming and then mapping executes.

Edited by: Akhil Rastogi on Sep 5, 2008 10:51 AM

Former Member
0 Kudos

Hi Akhil,

Can you please tell me that you want to MAP the three file structures to a single IDOC? Please correct me if I am wrong.

Regards,

Sharath

Edited by: sharath Girmaji on Sep 5, 2008 2:26 PM

Former Member
0 Kudos

>

> Thing is when the file gets created it can have any of the three structures given below.

Do u mean to say only one those structures get generated everytime dynamically?

Regards

Krishna

Former Member
0 Kudos

Yes Sharath,

You are right.

Former Member
0 Kudos

Yes thats the case.

hemant_chahal
Contributor
0 Kudos

Hello

you can achieve this by creating a common source Data type for all the three structures.

also the target side having all the fields. make unique fields optional and common fields from FIle No to Invoice No M.

SO One mapping.

If you have further req let me know. that is receiver detrmination etc.

File No ( Destination ) M

File No ( Transmission Date ) M

Receiver's ID M

Data ID M

Record ID M

Buyer Code M

Invoice No M

Currency code O

Container No O

NML's Container ID No. O

Container size O

Filler O

Container Gross Weihgt (kgs) O

Container Gross Cubic Meter (M3) O

FOB Price Amount ( Container Total ) O

Container Seal Number O

Container Dock Location O

Due Date O

Vanning Plant O

Invoice Total Weight ( kgs ) O

Invoice Total Volume ( M3 ) O

Invoice Total Price O

CLP Loading Location O

Parts No. O

RAN O

Vanning Plant O

Parts Quantity O

Parts Piece Price O

Parts Total Net Weight (kgs) O

Box No. O

External Package Module O

Order No. O

Case Gross Weight O

Parts Description O

NML's Container ID No. O

Internal Package Module O

Number of the carton box O

Linefeed Location O

former_member189441
Active Participant
0 Kudos

Hi,

if all fields are coming from one structure then Give the occurence of Root node as 0..Unbound and map these fields to the IDOC field which has the Multiple Occurence.

if u want to give multiple messages in the source side then u can select by going to Message tab in Mapping editor and map the corresponding fields

Former Member
0 Kudos

Hi!

It could be done in one message mapping. However you have to set value 'name' to be mandatory and the rest of fields optional (minOccurs ="0").

Regards,

Radek