on 07-16-2010 5:22 AM
Hi All,
Please can you guys put your little valuable time to help me in this. I have got one scenario like xml files to xml file, with one outbound interface to one inbound interface. These input 'n' xmls are coming into the folder in 5 to 10 minutes time. I want to merge all 'n' number of xmls into one xml.
'n' number of input all files are comes in same structure, file names are like MTT_006669800_1.xml, MTT_00666801_2.xml,....
MTT_006670300_1.xml, MTT_006670301_2.xml .... MTT_006670310_10.xml etc.,
the above two files are coming from 2 different divisions. Division numbers are in the file like 006669,006670 etc.,
But I need to pickup only one division all files first then goto Second division. These 'n' number picked files parse it and keep into one file as follows:
Input files structure
<ROOT>
<OUTPUT>
<Product1>..</Product1>
<Product2>..</Product2>
</OUTPUT>
</ROOT>
=========================
Output file Structure
<ROOT>
<OUTPUT>
<Product1>..</Product1>
<Product2>..</Product2>
</OUTPUT>
<OUTPUT>
<Product1>..</Product1>
<Product2>..</Product2>
</OUTPUT>
<OUTPUT>
<Product1>..</Product1>
<Product2>..</Product2>
</OUTPUT>
<OUTPUT>
<Product1>..</Product1>
<Product2>..</Product2>
</OUTPUT>
<OUTPUT>
<Product1>..</Product1>
<Product2>..</Product2>
</OUTPUT>
</ROOT>
To this above scenario I have implemented BPM (As what SAP pattern says - Payload collect) with block,loop,Receive, multi line Container, Counter Container, after block Transformation step and Send step.
I am using graphical mapping source side 0..n occurrence --> 1 occurrence (one to one mapping)
Sender file adapter Process mode I have taken append.
The problem is it is clubbing but the all file namespaces etc., coming into one file. I can't able to open that xml.
I can't put the target file with different name too.
Please correct me where I am making mistakes.
Thanks in advance.
Kind Regards
San
Hi ,
The Pattern should work,what is the occurace of OUTPUT it should be 1 to unbounded check in data type.
you no need to take append mode in adapter level,because merging will happend in BPM it self.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
Many thanks for your quick reply. But one thing I have noticed here. If you take Append mode, I can't able to change file name for division wise. Second thing the append mode appending header lines
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<ns1:ROOT xmlns:ns1="urn:xxx:snc:productactivedata">
are also coming in target xml file. Am I making any mistakes in mapping??
Messages Messages
Message1 Message1
ROOT -
> ROOT
OUTPUT -
> OUTPUT
Product 1 -
> Product 1
Product 2 -
> Product 2
Please little bit more idea on this!!
Many Thanks
Regards
San
Some how BPM is not merging then I changed file mode into append mode
The merging should be done in the BPM itself (by the mapping program)
Did you test your mapping in IR (test tab) .....is it able to bundle all the source messages into one?
Is your BPM collecting the messages properly (the container).....try with only one message first then with two messages.....does it work as expected?
Regards,
Abhishek.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.