cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Idocs creation based on source conditions

Former Member
0 Kudos

Dear All,

I have to create multiple idocs from the source idoc based on the line litems ie if my source Idocs has 5 line items so 5 different idocs to be generated at target.

I am able to process upto this stage.

Now my requirement is that target Idocs is to be generated based on different plants available in the source idoc line items. I need to trigger a single idoc for the line items having same plant.

S.No Line Item No Plant

1 00010 8200

2. 00020 7800

3. 00030 7800

4. 00040 8200

5. 00050 2100

So, for the above case total 3 Idocs needs to be generated at the target.

Kindly suggest me how the mapping is to be done which can filter out the plants at line items and creates the no of target idocs.

Regards,

NJ

Accepted Solutions (1)

Accepted Solutions (1)

madanmohan_agrawal
Contributor
0 Kudos

Hi NJ,

It is simple. If you know how to create multiple IDOCS from one IDOC then you just need to map the target IDOC node to the source field "Plant" and make sure to use the proper context during the mapping.

Regards,

Madan Agrawal

Answers (1)

Answers (1)

former_member206760
Active Contributor
0 Kudos

just a samll pointer...

you can use

plant>sort>splitbyvalue(valuechange)->collapse context ..

this will create the plant Queue as

2100

7800

8200

now u can generate number of idocs based on this

Edited by: Tarang Shah on Mar 30, 2009 3:02 PM

Former Member
0 Kudos

Hi Tarang,

Thank you for your reply.

Based on the mapping suggested by you I am able to get the multiple Idocs based on plants but all the Item/Header details are getting populated in the first Idoc only whereas in the second Idoc no segment is coming.

Please guide me on correcting the mistake.

Regards,

NJ

former_member206760
Active Contributor
0 Kudos

for this ensure that you have a context change after each item...and then only assign it to the target

use split by value each value for that

Edited by: Tarang Shah on Mar 31, 2009 11:12 AM