cancel
Showing results for 
Search instead for 
Did you mean: 

How to collect to different files into one message

Former Member
0 Kudos

Hi,

I have the following scenario:

Two (5Mb) Files with different file structures each ->

XI (transform and generate a single structure record) ->

Insert a record in a DB for each new record generated

Let suppose file1 has order headers - one order per line -and file2 has the corresponding order items - one item per line, e.g;


File 1
OrderNr  Description
1        A
2        B
3        C

File 2 
OrderNr   ItemNr   MaterialCode ....
1         1        111
1         2        222
1         3        555
2         1        888
2         2        777
3         1        111

Imagine I want to insert a record in the database for

each order/item like this

OrderNr  ItemNr Description MaterialCode .....
1        1      A           111
1        2      A           222
1        3      A           555
...      ...    ...         ...

My real scenario is a little more complicated but never mind for now.

I need to collect the two different files with two different file structures into the same message. Although I have read about the subject I am not sure about how to do it using BPM because there isn't any field I could use to correlate file1 with file2 - I can only correlate a record of file1 with several records of file2. I simply know that the two files will be available in a specific directory once a day at 06:00AM.

First question is:

How can I collect the two messages originating each from a different file into only one message with two different subtypes one for each file structure?

Because my background is ABAP I could do it with a workaround for temporarily storing the info from each file into database tables in XI and then correlate the info from the two files to generate a single message.

Like this

File1 -> XI -> INSERT DATA XI ZDB1 (via ABAP Proxy or RFC)

File2 -> XI -> INSERT DATA XI ZDB2 (via ABAP Proxy or RFC)

Them I could use an event to check when the two tables have all the data from both files. I could then combine the data from the two tables and start another integration process like this

XI SERVER (ABAP Proxy) -> XI Integration Server -> Third-party (JDBC)

But this way I would have to code the hole data conversion which is not a good idea from the perspective of XI (EAI/Broker).

Maybe I sould use BPM. But how?

Futhermore:

Is BPM performant enough (we are talking about files with thousand of records)?

Thanks in advance

Diz

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

for N:1 Multimapping you have to use BPM.

After going through this weblog you will be quite familiar with how to collect 2 messages into one message.

/people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm

Steps:

1. Create a abstract/ inbound / outbound interfaces. (in your case 3 /1/2).

2. Perform 2:1 Multimapping.

You can specify more than one message in either side.

Just go to message tab in MM.

3. Now follow the blog and you will get a output in the form of abstract interface.

4. Define JDBC reciever Channel as usual.

Your database will be updated.

Just try this out.

Regards

Piyush

Former Member
0 Kudos

Thanks for your help

It solved the problem...

Diz

Answers (0)