cancel
Showing results for 
Search instead for 
Did you mean: 

Xml to multiple IDOCs

Former Member
0 Kudos

Hi Friends,

My issue is as below and i would first like to know if we can mange this in Graphical mapping.

Strucutre is :

<PartBalance>-----1:unbounded.

                     <StoredBalance>

                     <Quantity/>

                     <Account>

                        <AccountId>     0:Unbounded

                           <Id/>

                        </AccountId>

                        <Quantity/>

                        <Lot>

                           <LotId>

                              <Id/>

                              <SupplierId/>

                           </LotId>

                           <Quantity/>

                           </Lot>                     

                  </StoredBalance>

                  </PartBalance>

One idoc per partbalance and partbalance can be mulitiple in Source.

My condition is if Partbalance----->Account---->AccountID----->ID exists and if it is of any values of A,B,C,D then i need to create an IDOC for this part balance,else the need to ignore that part balance.

Could some one help me if we can do this in Graphical mapping as i tried a lot and been unsuccessful.Do we need UDF for this ???

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You should use multimapping here, working with the cardinality of messages in the message mapping. Configure the target as 1...unbounded. Then, secondly, on the root node of that target message map your ID field and give it a "CreateIf" only in case of the desired values. If you consider these two things and work out the details, it should be fine. You should only think about the case that no message is created at all. Probably your mapping would throw an exception then.

Regards,

Jörg

former_member184681
Active Contributor
0 Kudos

Hi,

Have a look at my blog below:

Focus on the part related to "createIf" function and SUPPRESS special value. It discusses exactly what you're asking about.

Regards,

Greg

Former Member
0 Kudos

Hi Grzegorz,

i have tried using createif ,but the problem is where ever the successful condition for ID is creating an IDOC.

i mean where ever the ID is true it creates idoc instead of Partbalance.

former_member184681
Active Contributor
0 Kudos

Hi,

If so, then the only thing you are missing is Michal's blog:

It describes the "occurrence change trick" meaning how to create multiple IDocs from a single source message, via mapping.

Regards,

Greg