cancel
Showing results for 
Search instead for 
Did you mean: 

Creating multiple idoc from single source file

former_member601528
Participant
0 Kudos

Dear All,

I have a requirement to generate multiple idocs depending on the SiteCode of source file.

My scenario is File to IDoc inbound scenario..

eg: file format will be like this

C001|hdfc|20130404|GEN|1000

C001|hdfc|20130404|GEN|1000

C002|icici|20130404|GEN|1000

C002|icici|20130404|GEN|1000

C003|axis|20130404|GEN|1000

C003|axis|20130404|GEN|1000

I have to generate the 3 idocs depending on the site code C00x..first column is SiteCode

all c001 come under one idoc and

all c002 come under second idoc and

all c003 details come under third idoc.

How to achieve this task , any idea please let me know.

Regards,

Aravind

Accepted Solutions (0)

Answers (5)

Answers (5)

rajasekhar_reddy14
Active Contributor
0 Kudos

You wanna generate different IDocs or same IDocs ?

1)If you wanna generate Multiple same IDoc means then change IDoc segment occurance to 1 to unbounded build a mapping accopridnigly.

2)If you wanna generate miltiple different IDocs then you have two options

   refer below blog

http://scn.sap.com/people/rajasekhar.reddy14/blog/2011/02/24/multi-mapping-without-bpm-for-idoc-scen...

    or

develop different mapping programs for differentr IDocs and add all different mappings under interface determiantion.

Thank you

nabendu_sen
Active Contributor
0 Kudos

Hi Aravind,

Please check the below blog to get the idea of triggering multiple IDocs.

http://scn.sap.com/community/pi-and-soa-middleware/blog/2005/12/04/xi-idoc-bundling--the-trick-with-...

Rest you have to handle in your message mapping.

former_member184789
Active Contributor
0 Kudos

Hi,

You can do it easily as per the below thread. Map the IDoc node to the one whose occurrence will decide the no. of IDoc's:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30ea2fdf-f047-2a10-d3a2-955a634bd....

former_member207622
Contributor
0 Kudos

Hi

Change the ocurrence of the IDoc to 1- unbounded

map the ID field as  ID - Remove context - Split by value ( value change ) - IDoc root node

http://scn.sap.com/thread/1475576

Check the above discussion

Hope this helps

Ninad Sane

former_member601528
Participant
0 Kudos

Hi All,

Thanks for your valuable inputs i have solved the task successfully

MichalKrawczyk
Active Contributor
0 Kudos

hi,

create a user defined function which will split the IDOC node on the basis of this site code and you can map one message to multiple IDOCs (using the trick with IDOC occurance change from my blog)

it's as simple as that

Regards,

Michal Krawczyk