SAP PI 7.3.1 File Adapter - Select file based on content
Hi all,
I have a scenario where I need to process a file differently based on the content within the payload.
For example a file called File_IS,xml is sent to a folder that PI is polling. Within this file is a field <TYPE> which I want to use to determine whether the file should be used . I have two mapping scenarios that each have a file sender communication channel polling for the same file name "File_IS.xml" . This is because a message will come from a 3rd party with the same file name but the content can be different meaning different mapping scenarios are required. IF Com_Channel_1 sees the File I only want it to be picked up if say <TYPE> = 'A' - if not then Com_Channel_1 should do nothing with this file. Similarly Com_Channel_2 should only use the file if <Type> = 'B'.
Scenario:
File_IS.xml -> File sender 1 -> <TYPE> = 'A' - Pick up file - do mapping - archive. <TYPE> <> 'A' - do nothing and leave file in folder
-> File sender 2 -> <TYPE> = 'B' - Pick up file - do mapping - archive. <TYPE> <> 'B' - do nothing and leave file in folder
Is the above possible at all ?
Thanks for your time.
Best Regards.
Gary
Tags:
Amit Srivastava replied
Hello,
Since u are polling files from same folder for both the scenarios so instead of using 2 different channels use only one file sender channel and detremine routing conditions at interface determination level?
Hope the input structure for both the scenarios is same?
Thanks
Amit Srivastava