Skip to Content
avatar image
Former Member

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

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!!!!!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Mar 24, 2015 at 05:14 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 24, 2015 at 05:46 PM

    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:

    Step by step Use of FCC,RD based on file name,CP in RD,ASMA,Dyanamic configuration,and StrictXML2PlainBean in Single Scenario........

    Regards,

    Nabendu.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 25, 2015 at 01:32 AM

    Hi Pavankumar

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

    DynamicAttributeChangeBean - The no-mapping solution to changing Dynamic Configuration ... dynamically!

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

    Rgds

    Eng Swee

    Add comment
    10|10000 characters needed characters exceeded