cancel
Showing results for 
Search instead for 
Did you mean: 

Sender file adapter

shweta_walaskar2
Contributor
0 Kudos

Hello Experts,

Is there a way to configure sender file adapter to pick files based on the file content ? setting file name scheme for different types of files is not

For ex, I have three sender communication channels, one should pick the file if it contains string 'Order data' ,other if the file contains 'Invoice data'

Please let me know.

Thanks.

Best Regards,

Shweta

Accepted Solutions (0)

Answers (8)

Answers (8)

shweta_walaskar2
Contributor
0 Kudos

Achieved using an ABAP report to check file type and based on file type,placing the file in respective folder.

Former Member
0 Kudos

Probably the way you are thinking will not help to solve the problem easily or I would say it is not a good approach at all.

The right approach should be, using just 1 sender CC to pick the files and then based on contents you should perform the conditional Receiver Determination to route the file to desired receivers.

If your requirement is other then this then explain it in more detailed way.

shweta_walaskar2
Contributor
0 Kudos

Hello Colleagues,

Thanks a lot for the details.

The reason why we want to check contents before file is picked up because based on this we need to call respective Seeburger BIC Mapping(using DynamicConfiguration) in Sender communication channel.

I am working on an approach to write an adapter module which would check the contents of thefile and set corresponding BIC mapping name in Dynamic Configuration.

This dynamic mapping can then be used as a module parameter in Sender CC.

I would update the thread when I am able to achieve this.

Thanks.

Best Regards,

Shweta

Former Member
0 Kudos

Hi Shweta,

What i would like to know is that why you want to read the content and are using 3 CC.

Rather you can use one CC and then use context/Xpath to determine the reciever based on the field value.

Alternatively, you can write a Java bean and add that to your File CC.

sufw
Active Participant
0 Kudos

Hi Shweta,

I think using a ccBPM is a little overkill here and will also degrade performance of your PI system with the extra memory and database space requirements of the BPM.

A more light-weight solution might be to implement a simple script on the operating system which is triggered every few minutes. If you're on a UNIX/Linux system, you can easily check file contents using grep. If the file contains the content you expect, then the script can rename it in such a way that your PI File Sender channel can pick it up and process it...

This way you'll avoid using a ccBPM and will be able to make use of the AAE/AEX in the latest releases of PI

Regards,

Sascha

Former Member
0 Kudos

You will first need to pick up the file and then decide what is to be done based on contents

Use a single CC and either receiver determination with rules or BPM to achieve rqeuirement

rgds

gab

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>pick files based on the file content

I believe it is possible. Use Collect Pattern based on payload using BPM.

Reference: SAP ships BASIS software components--- Go t http://sap.com/xi/XI/Systems/Patterns --> BPMPatternCollectPayload.

This example helps you to achieve your requirement. Basically you can choose some xpath element and create some condition to decide picking up the files...

Former Member
0 Kudos

Hi Shweta,

A File Adapter can only pick up a file for processing based on the name of the file and its extension, but not on the basis of its contents.

Hope this helps you buddy

Thanks

Biswajit

Former Member
0 Kudos

Hi Swetha,

File adapter cannot check the content and process.

Thanks,