cancel
Showing results for 
Search instead for 
Did you mean: 

How to map into different Idocs after Multimapping

christopherko
Explorer
0 Kudos

Hi experts,

my scenario is a file to multiple idoc scenario. My flat source file contains up to 8 different record types. every file can have another combination of record types. For each record type, i will have an own mapping and an different idoc as target structure. But all idocs go to the same sap-system.

What i've done: I've created the sender communication channel, which imports the flat data structure via content conversion into xml. after this, i have one file in the PI, with all record types in it. So i created an data type for each record type and split the message via multimapping into 1 message with x records, but only with one record type per message.

Flat FIat with record type A,B,C,D,E,F,G,H

|

|  sender communication channel

V

1 big XML on SAP PI with x records per record type A,B,C,D,E,F,G,H

|

|  multimapping

V

Some XML, each with x records of the same record type

|

|  ???

V

My problem is now the next step: i have to map each of those homogeneous messages into their final idoc-structure. what is the simplest way to do this? as i said, i have an different mapping and idoc for each of those record types.

Hope, you can help me and looking forward for your hints.

Accepted Solutions (1)

Accepted Solutions (1)

maheswarareddykonda
Active Contributor
0 Kudos

Hi Koch,

you are getting multiple records in txt file and need to convert in to xml and each record need to send different idocs at target side. if i understood correct below is the way to handle.

1.create sender structure(DT,MT,SI) for txt file

2.import different IDOCs in esr

3.while create mapping ,sender side you can use MT which have created and receiver side you just go to signature tab and add all IDOC.

Answers (3)

Answers (3)

christopherko
Explorer
0 Kudos

Hi again,

my problem was, that my implementation was too complicated. I tried to put each record type from the full message in a temporary MT per record type and after this, map each of these temporary MT in the final idoc structure. This intermediate step was unnecessary. Now, in the Multimapping, i added all Idocs and map the data directly from the complete file.

Thank you for your hints!

greetings

former_member186851
Active Contributor
0 Kudos

Hello Koch,

Since flat file picked,Using FCC get each records separately.

A,B,C,D,E,F,G,H

All will be separate XMLS with one of the Records(A or B or C or D or E or F or G or H).

@ interface determination level use Conditions If the record A  execute mapping corresponding to A

If the record B execute mapping corresponding to B.Repeat the same for records.

Let us know if you face any difficulty in this.

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Christopher,

I understand from the above lines that you already designed one mapping which splits the file message in to multiple files with records type each. Then in that case, you can design a second mapping, which can be transformed from the output message of the above mapping and mention the same in the operational mapping.

Else, you can direct design a single mapping where you can transform in to multiple IDOC's from the source message using the mapping logic as required.

Refer the below blog for reference:

File to Multiple IDOC Splitting without BPM - Process Integration - SCN Wiki

Regards