cancel
Showing results for 
Search instead for 
Did you mean: 

Merging two file based on the content on first file pick second file

RameshGulipall
Active Participant
0 Kudos

Hi All,

I have requirement read the proxy from ECC to PI according to the message content in the proxy and I need pick the file from other directory based on file message .Merge these two message and send to target system.

Please advice me how to achieve this requirement. Provide the your input...

Regards,

Ramesh

Accepted Solutions (0)

Answers (3)

Answers (3)

RameshGulipall
Active Participant
0 Kudos

Hi All,

In my current scenario I have 2 dependent sources (Proxy and File system) from which data is being sent to a common target service. The sources are dependent on Proxy/ECC to File System. Please let me know how I need to pick the file from File system because lot of files are there in File System. Based on my ECC/Proxy message details on field of ABN, according ABN number I need to be pick the file from the File system but I have lot of files in File system. Please let me know how to pick multiple files from one correct file.

After that picking the files I need merge the two messages and send to target file system.

Please provide your input.

Regards,

Ramesh

rajasekhar_reddy14
Active Contributor
0 Kudos

You can try with BPM or File look up using UDF or java mapping.

RameshGulipall
Active Participant
0 Kudos

Hi Raja,

Could you please explain step by step in both options? It would be great for me

Regards,

Ramesh

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi ,

Biswa alaredy explained the process using BPM, if you dont have any limitation from client end to use BPM then go with BPM only.

using UDF we can connect to any file system we can read the file.

Regards,

Raj

Former Member
0 Kudos

Hi Ramesh,

To achive your requirement you need to go ahead with BPM. Use correlation in BPM, you can link the exact set of files you want to send to the target.

Check this links:

/people/milan.thaker/blog/2008/07/23/correlation-150-runtime-behavior-of-bpm

/people/sravya.talanki2/blog/2005/08/24/do-you-like-to-understand-147correlation148-in-xi

Thanks,

Former Member
0 Kudos

Hi,

I think your requirement can be solved by using a BPM. Here you need to first use a receive step to receive the 1st file and then check whatever content you want to check using the container step and then if the file contains the desired contents, based on that use another receive step to receive the second file. This second receive step should be on one of the brances of a switch step, and on the other branch of the switch step, just use a control step and choose action as Cancel Process.After that use a transformation step where you need to call the mapping where the merging of the 2 files is done. After this step, use a send step to send the merged file as output.

Hope it helps you buddy!!!!

Thanks

Biswajit

Edited by: 007biswa on Feb 25, 2011 11:07 AM

RameshGulipall
Active Participant
0 Kudos

Hi Biswajit,

Thanks for your reply.

Elaborate my requirement a bit more.... PI will get the messages(1st Message) from the Client Proxy based on the content of the message, I want to fetch the files from the File system(File Directory), merge them and send them to target .If the File is not there in File directory throw the error

Regards,

Ramesh

Former Member
0 Kudos

Hi Ramesh,

>>I want to fetch the files from the File system(File Directory), merge them and send them to target .

when the files are in the file directory we can merge them using Correlation in BPM.

>>If the File is not there in File directory throw the error

This cannot be done, adapter will check for the files if there then will process if not it would not throw any error. This cannot be done through PI.

Thanks,

Former Member
0 Kudos

Hi Ramesh,

>>If the File is not there in File directory throw the error

This cannot be done in PI as was also told by Hareenkumar.

And as far as rest of your requirement is concerned, I have already described the steps in detail in my earlier reply.And yes, you need to incorporate correlation also in the BPM.

You can go through the following link for beginners to learn about correlation in BPM.

http://www.saptechnical .com/Tutorials/XI/BPM/Fork1.htm

Thanks

Biswajit

Edited by: 007biswa on Feb 25, 2011 12:12 PM