All integration guides
Groovy IDE / SAP CPI

Groovy for SAP CPI. Right in your browser.

Test Groovy scripts for SAP Cloud Integration with a simulated message. Follow a small example covering the body, headers and exchange properties.

Sample data, a working example and an output you can inspect.

An example to try
processData.groovy
import com.sap.gateway.ip.core.customdev.util.Message
import java.util.Locale

Message processData(Message message) {
    String body = message.getBody(String) ?: ""
    String source = message.getProperty("sourceSystem") ?: "unknown"
    message.setHeader("X-Source-System", source)
    message.setBody(body.toUpperCase(Locale.ROOT))
    return message
}
Groovy / SAP CPIMessage → processData → Message

The runnable example from the tutorial below.

01

Tutorial: test an SAP CPI Groovy script online

  1. 01
    1

    Enter test data

    • Open CPI mode in the Groovy IDE
    • Enter contiva as the input message text
    • Add a sourceSystem property with the value demo
  2. 02
    2

    Run the script

    • Copy the example below into the script editor
    • Use processData as the function name
    • Select Run to process the message
  3. 03
    3

    Check the result

    • The output body is CONTIVA
    • The X-Source-System header has the value demo
    • Change the input and test edge cases next
02

Groovy example for body, header and property

With the input from step 1, contiva becomes CONTIVA. If sourceSystem is missing, the header uses unknown instead.

processData.groovy
import com.sap.gateway.ip.core.customdev.util.Message
import java.util.Locale

Message processData(Message message) {
    String body = message.getBody(String) ?: ""
    String source = message.getProperty("sourceSystem") ?: "unknown"
    message.setHeader("X-Source-System", source)
    message.setBody(body.toUpperCase(Locale.ROOT))
    return message
}
Groovy / SAP CPIMessage → processData → Message
Our approach

Why Our Groovy IDE?

Built for SAP CPI professionals - simple, fast, and setup-free

Ready to Use

No installation, no configuration

Simulate a message

Set the body, headers and properties, then inspect results.

Real-time Testing

Instant feedback for your scripts

03

What the script test covers and what still needs an iFlow test

01

Check script logic

Use synthetic data to check changes to the body, headers and properties. Include empty input, missing properties and unexpected formats.

02

Test integration separately

Simulation does not replace testing adapters, permissions and target systems in your SAP environment. Match the Groovy version to your iFlow.

04

Professional Features for CPI Developers

01

CPI Message API

Simulate the body, headers and exchange properties for processData scripts.

  • Groovy 2.4 and 4.0
  • Compare input and output
02

Templates and debugging

Start from templates and inspect the output step by step.

  • Console, Problems und History
  • Configure headers and properties
Your next step

Start Your CPI Development Now

The browser IDE is free to use. For complex iFlows, troubleshooting or reviews, explore our SAP CPI consulting services.

All integration guidesContiva / Groovy IDE / SAP CPI