cancel
Showing results for 
Search instead for 
Did you mean: 

ccBPM, Splitting XML into seperate documents

Former Member
0 Kudos

I have an incoming XML that contains a list of payments and I need to generate a file for each entry (payee) that that is going to be FTP'd. Not all the account numbers will be unique but I still want to generate a unique file for each entry. For example the following inbound XML

Incoming XML

<Payee>

<Acccount>00194763</Acccount>

<Amount>MESSAGE AA</Amount>

<Text>Payment to customer XXXXXXXXX</MoreText>

</Payee>

<Payee>

<Acccount>00192873</Acccount>

<Amount>MESSAGE BB</Amount>

<MoreText>Payment to customer YYYYYYYY</MoreText>

</Payee>

Would be transformed into two outbound XML files as follows

Message ONE

<Payment>

<Acccount>00194763</Acccount>

<Amount>MESSAGE AA</Amount>

<Text>Payment to customer XXXXXXXXX</MoreText>

<Text>Additional Text I've added</MoreText>

</Payment>

Message TWO

<Payment>

<Acccount>00192873</Acccount>

<Amount>MESSAGE BB</Amount>

<MoreText>Payment to customer YYYYYYYY</MoreText>

<Text>Additional Text I've added</MoreText>

</Payment>

Would I use a transformation step? How would BPM know where to split the incoming file as I'm not checking for particular values.

Your help is appreciated

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

If only purpose if using BPM is to make use of Multimapping, then don't use BPM. See this

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

Regards,

Prateek

Former Member
0 Kudos

Thanks,I'm using BPM as I have a number of other tasks I need to take care of, this is just a small part of the overall process.

Former Member
0 Kudos

Despite you can avoid Transformation Step in BPM, that is more resource consuming and effects on your BPM performance.

Thanks

Farooq.

Former Member
0 Kudos

I've had a look at the following blog....

When testing the output appears as a single document although it does contain separate messages. According to the blog Messages that result from the split in a mapping-based message split are sent using one AE. So only adapters running on the AE are supported. In particular, this means that target IDOC message splits are not supported since the IDOC adapter is not part of the AE.

I'm using the file adapter, is this what is causing the problem? Is there anyway around this?

Former Member
0 Kudos

File Adapter reside in the AE, so this Splitting supports for File adapter also.

Check you mapping.

What source message you are sending?

Thanks

Farooq

Former Member
0 Kudos

Sorry, I appear to have missed something in the blog. I've rebuilt the mapping and now I'm getting the error Split mapping created no messages

Does anyone have any ideas?

Former Member
0 Kudos

>>now I'm getting the error Split mapping created no messages

Where is that Error? in MONI or Test Tool(IR)?

Thanks

Farooq

Former Member
0 Kudos

Sorry Farooq, the message is appearing in MONI.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Request Message Mapping -->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>XIServer</SAP:Category>

<SAP:Code area="MAPPING">GENERIC</SAP:Code>

<SAP:P1>Split mapping created no messages</SAP:P1>

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>Split mapping created no messages</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

My input message is as follows....

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:MT_INPUT xmlns:ns1="urn:xxxxxx.com/TRAINING:MESSAGE:SPLIT">

<INPUT>

<NAME>brad</NAME>

<TEST>aaaaa</TEST>

</INPUT>

</ns1:MT_INPUT>

<ns1:MT_INPUT xmlns:ns1="urn:xxxxx.com/TRAINING:MESSAGE:SPLIT">

<INPUT>

<NAME>matt</NAME>

<TEST>bbbbbb</TEST>

</INPUT>

</ns1:MT_INPUT>

</ns0:Message1>

</ns0:Messages>

Former Member
0 Kudos

Take out you source message and delete the tags that I mentioned in the bold.

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns1:ASH_MULTI_Message1 xmlns:ns1="http://ASH_MULTI">

<age>21</age>

<name>Ashish</name>

<location>Melbourne</location>

</ns1:ASH_MULTI_Message1>

</ns0:Message1>

</ns0:Messages>

Thanks

Farooq.

Former Member
0 Kudos

Please read every blog carefully and also read comments for better understanding.

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible is the blog. Read its comment section if will solve your problem.

thanks

farooq

Former Member
0 Kudos

Farooq,

I've read the blog again and made a few changes

a) Modified my output message as the structure wasn't correct.

b) Updated the interface determination as per the blog

and it appears to be working. Many thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

First of all just to split message you need not required BPM.

Just map your payee node to payment node in target.

I hope I have understood your reqts correctly.

Thanks,

Tuhin

Former Member
0 Kudos

I'm not sure how I would split a message using standard mapping. When I say I want to split a message I mean take ONE XML document and create SEVERAL flat files (depending on the number of entries in the XML.

In mny example I have two payments in the XML document and I need to create TWO seperate XML documents that I will use to create TWO seperate flat files.

I

Former Member
0 Kudos

check this blog