cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

Sending files from different folders/directories at a time through single SFTP sender channel.

Bhargav_Parab1
Explorer
0 Likes
1,254

Hello SAPians,

I have a requirement where there will be 3 different folders in  AL11. I have to fetch files from these 3 folders at a time and send it to the receiver using SFTP sender channel. I have to send all this files at a time using single sender channel. If not SFTP, pls suggest the correct way.

Thanks in advance šŸ™‚
SAP Cloud Platform, industry edition, client libraries SAP BTP ABAP environment SAP Integration Suite Cloud Integration SAP Business Technology Platform 

Accepted Solutions (1)

Accepted Solutions (1)

Ryan-Crosby
Active Contributor
0 Likes

The only way this is possible is to check the "Include Subdirectories" option of the processing tab, which will work if and only if the three directories are subdirectories of the one specified in your iFlow configuration.

 

Regards,

Ryan Crosby

Sree_Pujitha
Explorer
0 Likes

Hi Ryan, but in case of multiple files with different filenames to be picked from different folders at same time, we cannot use include sub directories option. Include sub directories only helps to select this option allows you to look for files in all subdirectories of the directory. In CPI we do not have advance source file selection as of SAP PI

Ryan-Crosby
Active Contributor
0 Likes
@Sree_Pujitha the sender adapter was recently updated to include regular expressions for polling which in conjunction with the "Include Subdirectories" option would potentially handle this request.
Bhargav_Parab1
Explorer
0 Likes
@Ryan-Crosby Thanks Ryan! It would be very helpful if you could share those expression if you have or maybe some link for the expressions
Bhargav_Parab1
Explorer
0 Likes
@Ryan-Crosby Thanks Ryan! It would be very helpful if you could share those expression if you have or maybe some link for the expressions. Thank You
Ryan-Crosby
Active Contributor
0 Likes
@Bhargav_Parab1 I can try to provide a regular expression if I knew the file name formats, but I wouldn't be able to account for files that should not be selected potentially because that depends on other contents in said directories.
Bhargav_Parab1
Explorer
0 Likes
@Ryan-Crosby Thanks Ryan! I found the solution and its working.
Bhargav_Parab1
Explorer
0 Likes
File naming • If you know the exact file names (ABC123.xml and DEF123.xml), you can use this pattern ABC.xml|DEF.xml If the files have common prefixes (e.g., ABC and DEF): ABC*.xml|DEF*.xml If you want to match specific patterns, such as files containing ABC or DEF anywhere in the name: .*ABC.*\.xml|.*DEF.*\.xml .* matches any characters before or after ABC/DEF and \.xml ensures the files end with .xml
Ryan-Crosby
Active Contributor
0 Likes
@Bhargav_Parab1 if the solution I mentioned regarding subdirectories and regular expressions has solved your problem feel free to mark it as the solution.

Answers (1)

Answers (1)

Sree_Pujitha
Explorer
0 Likes

Hello Bhargav,

There is no standard way to poll files different from different folders.

You can achieve this in below ways : 

1. You can use 3 local integration processes and configure 3 different SFTP adapters using request reply  and pull the required files. In main integration flow you can handle the payloads as per your requirement.