cancel
Showing results for 
Search instead for 
Did you mean: 

How to create 2 idocs from one row in .csv file

Former Member
0 Kudos

Hello Guru's,

Guide me if I am duplicating my question here in SDN.

I am new to SAP PI.

I am working on one scenario which is

Pick up .csv file from server -> convert it to xml -> Do message mapping on XML to IDOC structure and send it to SAP

Special condition here is:

For each row in .csv file, I have to create 2 Idocs.

For this:

I have created:

2 different message mapping based on logic

and tried to use both the message mapping in Interface mapping.

When I do that I get error however, If I use single message mapping records get processed.

Please help.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi ,

No need to create two mappings at all, if you wnat to send same IDoc to Receiver twice,

I am thinking that you want to ORDERS05 IDoc to SAP,

use simple trick, create duplicate structure of IDoc in target side, right click on IDoc select Duplicate structure, then your target will become like below

<ORDERS05>

<IDoc>

<IDoc>

That means Two IDocs, so you can do same mapping for two structures and execute it will work.

Regards,

Raj

Former Member
0 Kudos

Thank you everyone. Problem is solved and I really appreciate your help.

I did the same way by creating a duplicate instance of IDOC . It created 2 idoc's for me. I am same IDOC type.

Regards

Pankaj

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos
2 different message mapping based on logic
and tried to use both the message mapping in Interface mapping.

Two mappings wont help. You can create two instances of the same IDOC (IDOC bundling), however you cannot created two different IDOCs.

Former Member
0 Kudos

Hi pankaj,

Please refer the below blog for creating multiple idocs:

/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change

Also, no need to create 2 separate mappings.

In one mapping itself you can put the condition for the IDOC node and generate multiple idocs.

-Supriya.