Skip to Content

SFTP - pick multiple files and zip them through SAP CPI

Hi Team,

We have a requirement to pick 2 different files which contains same name but with different extensions (Ex: abc.xml & abc.pdf) from Source directory through SFTP and place the zip folder of those two files in the target directory.

We would need to achieve this requirement through SAP CPI. Could any one please provide your suggestions.

Note: Source directory may contains 'n' number of files. out of all the files we need to pick

.xml & .pdf files of same file name.








Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Apr 02, 2018 at 07:33 PM

    Hi Sandhya,

    Hope we can't collect all the files in a single message of SAP HCI.

    The reason behind is if you poll files from SFTP, each file would be processed as a separate message in SAP HCI.

    So it would be better if you ask SFTP team to ZIP all relevant files and keep it as a ZIP file in SFTP directory.

    Then easily you can process the ZIP file to target system.

    You can go for below approach, if SFTP team is not able to combine and create the ZIP file.

    If you need to poll only few no.of files from SFTP and combine them (in SAP HCI), you can try with the approach mentioned in the below blog (Check Sriprasad Shivaram Bhat's answer)

    You could try with one main integration process and many local integration processes to poll different files from same SFTP directory and combine them in SAP HCI

    I am not sure whether we can create ZIP file with multiple files. (So far tried only for single file).



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 05, 2018 at 06:38 AM

    Hi Deva,

    Thanks for the reply.

    We should not expect any changes from source side. So we need to handle in picking the combination of .xml & .pdf files of same file name in CPI.

    By doing merging ( as per the blog provided by you) the requirement will not be satisfied as I should pick .xml & .pdf files of same name from source folder and both files should be zipped in a single folder.

    Do we have any information on custom adapter module implementation / Script at adapter level in CPI.

    Please suggest.



    Add comment
    10|10000 characters needed characters exceeded

  • Apr 17, 2018 at 01:00 PM

    Hello Sandhya,

    Please find the below documentation wrt to Custom Adapter development in SAP CPI.

    Also there are handful of blogs in SCN,please search.


    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded