— SAP Integration Suite

SAP CPI Groovy Script Generator

Pick what your iFlow step needs, fill in your names, and copy a clean Groovy script for the CPI Script step. Runs in your browser, free, no sign-in.

What should the script do?

Set headers and properties.groovy

import com.sap.gateway.ip.core.customdev.util.Message

def Message processData(Message message) {
    def headers = message.getHeaders()
    def value = headers.get("SAP_ApplicationID") ?: ""

    message.setProperty("orderId", value)
    message.setHeader("X-Correlation-ID", value ?: UUID.randomUUID().toString())
    return message
}

Frequently asked questions

Which CPI script signature does this use?
The standard Script step entry point: def Message processData(Message message), importing com.sap.gateway.ip.core.customdev.util.Message.
Is MPL attachment logging safe in production?
Attachments add storage and can expose payload data, so the logging template only writes when a switch property is true. Keep it off in production unless you are troubleshooting.
Does it use AI?
No. Each script is a reviewed template filled with your names, so the output is instant and identical every time. Test it in your tenant before transporting.

Templates are starting points. Test every script in a non-production tenant. ERPClimb is independent and not affiliated with SAP SE.