SAP CPI - Loop Process Call with SuccessFactor (oData V2)


This example will show you how to fetch data from SuccessFactor (oData V2 Message Protocal) with a specific page size. For example, if your data has 10,000 total records and each record consists of 20 child nodes (the result size is around 10MB), you can fetch data by 500 records per request by using Loop Process Call.


# My integration process consists of

1. Content Modifier "Initial Data" which I declare property "fetchData".

2. Loop Process Call "Loop Fetch Data" which calls Local Integration Process "Fetch Data From SF".

3. Groovy Script which writes data from property "fetchData" in an attachment format.

This example will focus on step 2 - Loop Process Call & Local Integration Process.



# Local Integration Process "Fetch Data from SF". How does it work?


1. Use Request Reply to call SuccessFactor to get data 500 records per request.




2. Use Groovy Script to get some fields and return in XML format.

3. Use XML to CSV Converter to make data into plain text and separate each field with a comma and separate each record with a new line.

4. Save the data from (3) to property "fetchData" with append mode


# Next we need to set the condition of Loop Process Call to know how to stop the loop 



1. Choose the Local Integration Process that you created to fetch data, in this case, is "Fetch Data from SF".

2. Expression Type is should be "Non-XML"

3. Condition Expression: The format of this field is "${property.<receiver.name>.<channel.name>.hasMoreRecords} contains 'true'". For more detail please visit SAP Help Portal. For receiver name and channel name, you can see the setting in the request reply in the above of this session.

I only config all of these and the result is correct. But the important thing about condition expression is "Ensure that the receiver system name in the Condition Expression is the SuccessFactors system that you are connecting to using the receiver channel in the Local Integration Process. Do not enter the receiver system name from the main integration flow."  


# Reference :

1. SAP Cloud Platform Integration for Processes 2017-09-15Developer's Guide: Managing Integration Content

2.  SAP Cloud Integration - Configure the OData V2 Receiver Adapter, SAP Help Portal. Visit

3. SAP Cloud Integration - Define Looping Process Call, SAP Help Portal. Visit



Popular posts from this blog

Setting IntelliJ IDEA to run Groovy Script

C# - BASE64 to Image