This is an example to merge 2 files into 1 file using SAP PI ccBPM. Some points to considers:

  • The contents from 2 files will be merged into 1 file, based on same ID.
  • File part A might be available first while file part B not yet available and come later, and vice versa.
  • SAP PI BPM have to wait both file part A and part B with same ID available, then only merged together.
  • There can be many different ID, example W,X,Y,Z,..K,L,M,N..
  • There can be different file (either A or B) from different ID available at the same time.

Example:
pi-bpm-merge-high-level-overview-file
 
In Message Type view:
pi-bpm-merge-high-level-overview-message-type
List of ESR objects required:
pi-bpm-merge-esr-objects
List of ID objects required:
pi-bpm-merge-id-objects
 
When all above ESR and ID objects play together during run-time, below are the flows:
Blue line are the keys, Red line are determined object :
pi-bpm-merge-detail-flow-overview

 ESR Objects

Data Type (create as normally)
Message Type (create as normally)
Service Interface (2 outbound SI and 1 inbound SI) + ( 3 Abstract SI for BPM)
Message Mapping
pi-bpm-merge-esr-mm-01
pi-bpm-merge-esr-mm-02
Operation Mapping
pi-bpm-merge-esr-om

Integration Process
Integration Process: Setup Container
pi-bpm-merge-esr-ip-container

Integration Process: Setup Correlation
pi-bpm-merge-esr-ip-correlation
 
Integration Process: Setup Graphical Definition
pi-bpm-merge-esr-ip-graphical

 

ID Objects

Sender Communication Channel
pi-bpm-merge-id-cc-snd-a

pi-bpm-merge-id-cc-snd-b
Receiver Communication Channel
pi-bpm-merge-id-cc-rcv-c

Sender Agreement
pi-bpm-merge-id-sender-agreement

Receiver Agreement
pi-bpm-merge-id-receiver-agreement

Receiver Determination
pi-bpm-merge-id-receiver-determination-bc
pi-bpm-merge-id-receiver-determination-ip

Interface Determination
pi-bpm-merge-id-interface-determination-bc
pi-bpm-merge-id-interface-determination-ip

Basically is referenced below 2 links and did above example:
http://scn.sap.com/community/bpm/blog/2014/01/30/simple-bpm-scenario
http://www.saptechnical.com/Tutorials/XI/BPM/Fork1.htm
Keep on learning!

ccBPM – Merge Two Files into One File using Fork, Correlation and Transformation
Tagged on:                     

6 thoughts on “ccBPM – Merge Two Files into One File using Fork, Correlation and Transformation

  • February 19, 2016 at 3:21 pm
    Permalink

    Hey Yeeloon,
    Which msg type had u used in source side for MM .. coz i dont see any in ur screenshot

    Reply
    • February 19, 2016 at 3:26 pm
      Permalink

      At source side, both MT_TEST_A and MT_TEST_B, is in the screenshot.

      Reply
  • July 6, 2017 at 1:36 pm
    Permalink

    i have done everything as mentioned above, n=both of sender files are being read fine but problem lies with receiver file. I have exhausted a ton of ways to make it work but it is stuck in communication channel. Even though i am following required content conversion parameters but still those are not recognized in communication channel test. i am getting “: Parameter ‘row.fieldFixedLengths’ or ‘row.fieldSeparator’ is missing”. i tried giving both/either in content conversion parameter but it is not helping. Can anybody tell, what am I missing?

    Reply
  • July 6, 2017 at 2:51 pm
    Permalink

    Hi Azb,
    some hint:Possible typo error? try compare carefully “row.fieldSeparator” or copy-paste directly at your receiver channel.

    Reply
    • July 6, 2017 at 5:03 pm
      Permalink

      no there are no typos. i have double checked each it.

      Reply
  • November 8, 2022 at 3:18 pm
    Permalink

    Hello, is this going to work if i wanted to just merge/collect different structure XMLs? I’m not using any IDs.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *