SAP CPI iFlow Template Generator
IntegrationNewGenerate SAP Cloud Platform Integration (CPI) iFlow configuration templates. Configure sender/receiver adapters, mappings, and groovy script stubs for common integration patterns.
iFlow Configuration
# iFlow Configuration: Order_To_S4HANA_Integration # Receive orders from external system and post to SAP S/4HANA [iflow] id=Order_To_S4HANA_Integration name=OrderToS4HANA description=Receive orders from external system and post to SAP S/4HANA version=1.0.0 [sender] participantName=ExternalSystem adapterType=HTTPS address=/http/order_to_s4hana_integration csrfProtection=true authentication=BasicAuthentication [receiver] participantName=S4HANA_PROD adapterType=S/4HANA systemName=S4HANA_PROD communicationArrangement=SAP_COM_XXXX authentication=OAuthClientCredentials [mapping] type=Groovy Script scriptFile=mapping.groovy methodName=processData [errorHandling] enabled=true escalateEvent=true logPayload=true [logging] enabled=true attachPayload=true logLevel=INFO
Groovy Mapping Script
import com.sap.gateway.ip.core.customdev.util.Message
import groovy.json.JsonSlurper
import groovy.json.JsonOutput
/**
* iFlow: OrderToS4HANA
* Mapping script for ExternalSystem β S4HANA_PROD
*/
def Message processData(Message message) {
def body = message.getBody(String.class)
def headers = message.getHeaders()
// Log incoming message
def msgLog = messageLogFactory.getMessageLog(message)
if (msgLog) {
msgLog.addAttachmentAsString("Input", body, "application/json")
}
try {
// Parse input
def json = new JsonSlurper().parseText(body)
// TODO: Map source fields to target fields
def output = [
SalesOrderType: "OR",
// Add more field mappings here
]
message.setBody(JsonOutput.toJson(output))
message.setHeader("Content-Type", "application/json")
} catch (Exception e) {
message.setBody('{"error": "' + e.message + '"}')
throw e
}
return message
}Advertisement
About SAP CPI iFlow Template Generator
SAP CPI iFlows share recurring shapes β sender/receiver adapter configuration, message mapping, Groovy script steps β for common integration patterns like SOAP-to-OData or IDoc-to-REST. This generator produces iFlow configuration templates and Groovy script stubs for those common patterns, so you start from a working skeleton instead of an empty canvas in Integration Suite.
How to use this tool
- Choose an integration pattern (e.g. SOAP to REST, IDoc to OData, file polling).
- Configure the sender and receiver adapter types for your scenario.
- The tool generates a Groovy script stub for any custom mapping logic needed.
- Import the generated template structure into SAP Integration Suite and wire up your actual endpoints.
All processing happens locally in your browser. No data is sent to any server. Your SAP code and business data remain private at all times.
Frequently Asked Questions
What is SAP CPI?
SAP Cloud Platform Integration (CPI), now part of SAP Integration Suite, is SAP's cloud-based middleware. It uses iFlows (Integration Flows) as the graphical design unit for defining integration scenarios between SAP and third-party systems.
What adapters does SAP CPI support?
CPI supports HTTPS, SOAP, OData, IDoc, SFTP, S3, HTTP, AS2, AMQP, Kafka, JMS, SuccessFactors, and many more. The generated template covers the most common adapter types with their typical configuration parameters.
How do I deploy a CPI iFlow?
After designing the iFlow in the Web UI or importing the generated configuration, deploy it via the Deploy button in the CPI Web IDE or via the CPI API (POST to /api/v1/IntegrationDesigntimeArtifacts). Monitor it in the Message Monitoring section.
Advertisement