Groovebox: free online Groovy IDE for SAP CPI, on Groovy 2.4 and Groovy 4
Groovebox is a free, browser-based Groovy IDE and playground for SAP Integration Suite (Cloud Integration, CPI) Groovy scripts. Paste a script, give it a payload, headers, properties and value mappings, and run it on Groovy 2.4 (Java 8) or Groovy 4 (Java 17): you see the output body, what changed in headers and properties, the Message Processing Log and any error. No tenant needed, no iFlow to deploy.
You may know the product under one of its names over the years: SAP Cloud Integration (part of SAP Integration Suite on SAP BTP), formerly SAP Cloud Platform Integration (CPI) and HANA Cloud Integration (HCI). Groovebox works for the Groovy scripts of all of them: think of it as an online Groovy editor, script tester and debugger for iFlow script steps.
Who it is for
- SAP Integration Suite developers and consultants who want a fast feedback loop while writing Groovy scripts for iFlows.
- Teams moving scripts from the Groovy 2.4 runtime to Groovy 4 and the Script API v2.
- Anyone learning the CPI
MessageAPI, value mapping lookups or the Message Processing Log.
Features
| Area | What Groovebox does |
|---|---|
| Runtimes | V1: Groovy 2.4.21 on Java 8 with com.sap.gateway.ip.core.customdev.util.Message. V2: Groovy 4.0.24 on Java 17 with the Script API v2 (com.sap.it.script.v2.api.Message and Exchange). |
| Message | Body as String, InputStream or byte[] with the usual getBody(...) conversions, case-insensitive headers, properties, attachments. |
| Value mapping | ITApiFactory.getApi(ValueMappingApi.class, null) with getMappedValue and getMappedValues, from a table you fill in or import (CSV or the value_mapping.xml of a CPI export). |
| Other SAP APIs | SecureStoreService (user credentials, OAuth2 tokens), PartnerDirectoryService parameters and a number range counter, all with test data you provide. |
| Message Processing Log | messageLogFactory.getMessageLog(message) works as in CPI: string properties, attachments and custom headers appear in the MPL tab. |
| Results | Output body (beautified XML / JSON), header and property diff against the input, console output, the SAP API calls made, and errors with the failing line highlighted. |
| Your work | Kept in your browser; save the script as a .groovy file or export the whole session (script and inputs) as JSON. |
How to use it
- Choose the runtime: V1 (Groovy 2.4) or V2 (Groovy 4).
- Write or paste the script. The function to call is
processDataby default; you can change it. - Fill in the input: body, headers and properties (with their Java type), value mappings, attachments, secure store and partner directory entries.
- Press Run or Ctrl+Enter.
- Check the output tabs: Body, Headers, Properties, Attachments, MPL, Console, API and Error.
- Save the script with Save: it is downloaded to your computer as a
.groovyfile.
Example script
A typical CPI script reads the payload, looks up a value mapping, sets headers and properties and writes to the Message Processing Log. It runs unchanged in Groovebox:
import com.sap.gateway.ip.core.customdev.util.Message
import com.sap.it.api.ITApiFactory
import com.sap.it.api.mapping.ValueMappingApi
def Message processData(Message message) {
def order = new XmlSlurper().parseText(message.getBody(String))
def valueMapping = ITApiFactory.getApi(ValueMappingApi.class, null)
def country = valueMapping.getMappedValue('S4', 'Country', order.Customer.Country.text(), 'SF', 'Country')
message.setHeader('SF_Country', country)
message.setProperty('OrderId', order.Id.text())
def messageLog = messageLogFactory.getMessageLog(message)
messageLog?.setStringProperty('Country', country)
return message
}
What Groovebox does not do
- It is not a Cloud Integration tenant: there are no Camel routes, adapters, real stream caching or tenant memory limits.
- Scripts cannot reach the network, the file system or start processes, so scripts that call external HTTP APIs fail here even if they work on CPI.
SimpleExpressionfrom the Script API v2 cannot be evaluated.- The SAP API mocks return the test data you enter, not data from your tenant.
Privacy and security
- Nothing is stored on the server. The script and its inputs are sent only to run it, in an isolated, single-use container with no network, which is destroyed right after. Requests and their content are not logged.
- Your work stays in your browser (local storage). No cookies, no analytics, no accounts. A random anonymous ID, also kept in your browser, is sent with each run only to apply the usage limits per browser.
- The code editor (Monaco) is loaded from the jsDelivr CDN, which receives your IP address like any web server.
- Don't paste production data or real credentials: use anonymized test payloads.
Frequently asked questions
Is Groovebox free?
Yes. It runs in the browser, with no account and no installation.
Do I need an SAP tenant to test a Groovy script?
No. Groovebox simulates the CPI script environment (Message, value mapping, secure store, partner directory, Message Processing Log), so you can run a script before deploying it to a tenant.
Which Groovy versions are supported?
Groovy 2.4.21 on Java 8 (the classic CPI script runtime) and Groovy 4.0.24 on Java 17 (the Script API v2 runtime).
Can I test value mapping lookups?
Yes. Enter the mappings in the Value Mapping tab or import them from a CSV or a CPI value_mapping.xml; getMappedValue and getMappedValues return them, in both directions.
Can my script call external systems?
No. For security, scripts run without network access, file system access or the ability to start processes.
Is my code or data stored?
No. Nothing is stored or logged on the server; your work is kept only in your own browser.
Is Groovebox made by SAP?
No. Groovebox is an independent tool, not affiliated with or endorsed by SAP.