cancel
Showing results for 
Search instead for 
Did you mean: 

Doubts while using correlation

Former Member
0 Kudos

Hi Experts

I have scenario where I am getting two files one is for header and one is for item. Now I want to merge these two file based on PO number using correlation

PO number in header unique but in item PO number will repeats for each item

ex:

Header file has following PO numbers

10001, h1,h2,h3

10002, h4,h5,h6

10003, h7,h8,h9

And item file has PO numbers

10001,itm10,itm11,itm12

10001,itm14,itm15,itm16

10001,itm17,itm18,itm19

10002,itm20,itm21,itm22

10002,itm23,itm24,itm25

10003,itm30,itm31,itm32

10003,itm33,itm34,itm35

If I merge these two files using correlation id how will I my target structure means how it looks like.

Please help me

Regards

Sowmya

Accepted Solutions (0)

Answers (2)

Answers (2)

VijayKonam
Active Contributor
0 Kudos

One problem with your scenario is, you do not know which 2 files are related to each other to define the correlation. Since there are multiple PO numbers in one file and other file had multiple lines corresponding to each PO, the BPM will not know how long it has to wait and when it has received all the line item files correspondng to each PO in the header file. You might want to ask you sending side to give the entire data in one file or have an identifier line for header file and line item file.

VJ

aashish_sinha
Active Contributor
0 Kudos

HI,

Merging two files using BPM takes some simple steps like this

BPM :

You will have 2 receive steps in a fork.

Then , you will have a tranformation step, where you will map the 2 source messages into a single source, and finally a Send step.

Interfaces :

2 outbound Aysnch for each source file , 1 inbound Asynch for target file , 3 abstract Interfaces for each file message.

3 message types for each of the file , 1 interface mapping between the 3 asynch message interfaces.

Also have a look to this link for more information and examples.

http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/56373f7853494fe10000000a114084/frameset.htm.

Target structure you need to define, This way you can merge two files. ALso if you want to create a new file depending upon the purchase order , that means if purchase order is 0001 then that file will contain all data related to that purchase order, for that inside Transformation step you have to loop.

Hope this will help you

Regards

Aashish Sinha

Former Member
0 Kudos

Hi Aashish,

I have done excatly like what you said I have done mapping at message mapping level so I dont want to merge the files based on the correlation ID.I want to merge the files based on the mapping what I have created at message mapping. But here as correlation id is mandatory I have specifed the PO in the correlation field.

Now how these files will merge Is it based on PO number or based on the mapping which I have specified in the transformation step.

Am i sensable?

Please help me.

regards

Sowmya