SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Learn how to migrate SFTP Advanced File Selection from SAP Process Orchestration to Cloud Integration

This tutorial covers the file polling by Poll enrich with SFTP Adapter in the SAP Integration Suite and achieve the file selection based on the list of filenames by Content Modifier with Iterating Splitter.

Overview

🎓 beginner 10 min. SAP Integration SuiteCloud IntegrationSAP Process IntegrationSAP Process OrchestrationBeginner

You will learn

  • How to use the Poll Enrich with SFTP Sender on Cloud Integration
  • How to use the iterating splitter to select the file based on a list of filename
  • How to process the files based on the presence by the Camel headers
Qi Liu Q Qi Liu October 11, 2024
Created by October 11, 2024
Contributors

Prerequisites

Prerequisites

  • Get permission to the SAP Integration Suite for design and monitor
  • Have access to an SFTP Server for file upload and download
  • Get Authentication to the SFTP Server

Steps

Intro

In SAP Process Orchestration (PO), advanced file selection is typically used when working with the File Adapter in an Integrated Configuration (ICO) or Sender Agreement. It allows you to apply complex filtering logic to select files based on specific patterns, timestamps, or metadata. If you want to migration/implement this function in SAP Integration Suite, you need to know how to define, split, poll and process files in SAP Cloud Integration. The Apache Camel framework provides robust file handling capabilities, such as reading files from directories and handles them based on their presence. We´re using an example integration flow to provide you the step-by-step process and we hope you can ensure efficient and error-managed file handling within your integration processes.

If you want to get an example with split and multicast in detail, please refer to the SFTP Poll Use Case.

Step 1 Use Content Modifier and Iterating Splitter based on Line Breaks

  1. Create a integration flow with a Start-Timer and Process Direct Receiver. We will only focus on the file polling function, therefore we use the simple start and receive to simulate.

  2. Use a Content Modifier to process the message content. This Content Modifier should contain a list of all filenames in the Message Body. This step is used here to initialize a list of file names, specifying multiple possible CSV file patterns to be used by subsequent steps. The specific file name patterns include eg.:

Expression
Dummy_A_*.csv 
DummyB_*.csv 
DummyC_*.csv 
DummyD_Dummy1_*.csv 

Filename
Filename

  1. Add Iterating Splitter to split the input message based on line breaks, process each line individually, handle messages sequentially. In the following table there are the configurations inside the Interacting:
    Configuration NameUsageDescription
    Expression TypeLine BreakThis setting indicates that the splitter will use line breaks as the delimiter to split the content. Each line in the input will be treated as a separate message part.
    Grouping1This setting specifies the number of items to be grouped together in each split message. A value of "1" means that each individual line (or item) will be processed separately.
    StreamingUncheckedWhen unchecked, this means that the splitter will not process the input as a continuous stream. Instead, it will handle the input as a whole.
    Table NameUncheckedWhen unchecked, the splitter will process the split messages sequentially. If checked, the splitter could process multiple split messages in parallel, which can improve performance for large datasets.
    Stop on ExceptionCheckedWhen checked, this setting ensures that the processing will stop if an exception occurs in any of the split messages. This is useful for error handling, ensuring that issues are addressed before proceeding further in the process.

![Add Branches](https://raw.githubusercontent.com/sap-tutorials/Tutorials/master/tutorials/ci-sftp-file-polling/ IteratingSplitter.png)

Step 2 Add local Integration Process Call to poll files from SFTP Server
+
Step 3 Add your next steps to consume the polled file and parameters
+
Step 4 Test yourself
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 4
1. Use Content Modifier and Iterating Splitter based on Line Breaks 2. Add local Integration Process Call to poll files from SFTP Server 3. Add your next steps to consume the polled file and parameters 4. Test yourself

Learn more →