cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Multiple IDocs

former_member1330829
Participant
0 Kudos

Hi Experts,

I have a source structure as below :

<ns0:MT_Test>

   <RowsetElec>

      <CallID/>

      <WAMOrderNumber/>

      <Number/>

      <ID/>

      <Name/>

   </RowsetElec>

   <RowsetGas>

      <CallID/>

      <WAMOrderNumber/>

      <Number/>

      <ID/>

      <Name/>

   </RowsetGas>

</ns0:MT_MT_Tes>

I need to generate multiple idocs ( Idoc occurence set as 0..unb) depending upon the occurence of  <RowsetElec> and <RowsetGas> without using multimapping.

I tried with standard function but was unsuccessful. Could anyone please provide an alternative for this.

Accepted Solutions (0)

Answers (3)

Answers (3)

praveen_sutra
Active Contributor
0 Kudos

Hi,

you can duplicate subtree on Idoc level and map it based on your required condition as mentioned by experts please let us know if you still face any issues.

thank and regards,

Praveen T

ambrish_mishra
Active Contributor
0 Kudos

Hi,

did you try doing a duplicate subtree ?

Ambrish

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

copy the IDOC node in the target structure and map <RowsetElec> to the first one and <RowsetGas> to the second one,

Regards,

Michal Krawczyk

former_member1330829
Participant
0 Kudos

Hi Experts,

Thanks for your answer. it does work by duplicating the sub tree. But my client is now looking for an exclusive java code to handle this. Any help is appreciated.

Thanks.

ambrish_mishra
Active Contributor
0 Kudos

Hi Tanzoom,

Graphical mapping is SAP recommended and duplicating a sub tree is a standard way to handle such cases. It handles very complex requirements in a simplified manner.

In fact, Java code will be overtly complex and unnecessary.

As a consultant, you should be propagating best practices and reason with the client on why they would want to use a Java code (Java mapping) for this.

Cheers,

Ambrish