cancel
Showing results for 
Search instead for 
Did you mean: 

N:1 mapping issue

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

First confirm ..

r u using BPM ??

or

using append mode in File channel??

Regards,

Raj

Former Member
0 Kudos

Hi Raj,

I am working both. Some how BPM is not merging then I changed file mode into append mode, please correct me.

Thanks & Regards

San

former_member200962
Active Contributor
0 Kudos
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.

Former Member
0 Kudos

Hi Guys,

Please can any one my question? if 3 different divisions sends more 20 xml files, 5 or 6 each division. How to change target file by division wise?

Many Thanks

Regards

San

Former Member
0 Kudos

Hi Guys,

Issue has resolved.

Many Thanks

Answers (0)