Showing results for 
Search instead for 
Did you mean: 

Can SAP PI 7.31 Receiver SFTP adapter place the files in two different folders based on the file naming convention

Former Member
0 Kudos

Hello Experts,

I have requirement in PI 7.31. SAP ECC sending two files (say F_Ven_XXX.txt and D_Ven_XXX.txt) to PI. In PI we are picking the the file by giving the naming convention as *Ven*. So Here we are using single interface which means single sender adapter to receive the files from ECC.

Now the requirement is, we need to place the files in two different folders (say Folder1 and Folder2) based the file names which are used while picking the files from ECC.

For Example: If we are receiving the F_ven_XXXX.txt from ECC then we need to place the file in Folder1 at receiver SFTP server. And if are receiving D_ven_XXXX.txt from ECC then we need to place the file in Folder1 at receiver SFTP server.

In order to achieve this we can use two interfaces (i.e two receiver adapter for each file). But can it be possible to achieve this by using single interface.

Thanks in advance!!!!!

Accepted Solutions (0)

Answers (3)

Answers (3)

Active Contributor
0 Kudos

Hi Pavankumar

If you don't plan to use ESR objects, another alternative would be to deploy and use DynamicAttributeChangeBean.

You can use the regex mode described in scenario 5 to dynamically determine the target folder based on the source filename pattern.


Eng Swee

Active Contributor
0 Kudos

Use 'FileName' Context Object in your Receiver tab to decide the Receiver at runtime. You can use the same Receiver Channel for both the Receiver Business Services.

Please find the blog for more information:



Active Contributor
0 Kudos

Either go for a java mapping and set the dynamic configuration for directory.

or if you already have a graphical mapping, write a UDF and set the adapter specific attributes for directory.

If you don't want to use any ESR objects then as you already knew, you should use xpath condition -> two receiver channels.