cancel
Showing results for 
Search instead for 
Did you mean: 

How to Zip Multiple files in Single in Zip Folder Using Poll Enrich SFTP Adaptor in SAP CPI

sunil93
Member
0 Kudos

Hi everyone,

I am working on an integration project using SAP Cloud Platform Integration (CPI) and I need to zip multiple source files into a single zip file. I have two scenarios:

Scenario 1: I know the file names in advance
In this scenario, I know what are all the file names that will be coming. How can I zip them into a single zip file using SAP CPI? Is there any pre-built feature or should I use a custom Groovy script? if YES please share the relevant information how can we handle via groovy ?

Scenario 2: I don't know how many files can come
In this scenario, I don't know how many files can come, as they will be dynamically generated by the source system. How can I handle this situation and zip all the files into a single zip file using SAP CPI?

I would appreciate any help or guidance on this matter. Thank you in advance for your support.

Best Regards,

Sunil

Accepted Solutions (0)

Answers (1)

Answers (1)

pranav_malhotra
Explorer
0 Kudos

Hi Devineni,

You can use poll enrich in looping subprocess to get multiple files and the you can use gather and select aggregation algorithm as ZIP to combine multiple files.

Please check below blogs for reference :

https://blogs.sap.com/2022/10/31/cloud-integration-poll-enrich-with-sftp-adapter-for-multiple-file-p...

https://blogs.sap.com/2020/05/16/handling-zip-files-in-sap-cloud-platform-integration/