Pre-launch — your 10 free credits are reserved for launch day. Join the waitlist
The SAP Pack
SAP Studio

Groovy Script Studio

Your payload + intent → run-ready CPI Groovy against your real paths & fields, plus explanation and test payload.

Preview — sign in to run this Studio1 credit per kit

What's in the kit

CPI Groovy ScriptCore
Plain-English ExplanationCore
Sample Test PayloadCore
Usage & Placement NotesCore

Core documents ship at launch; staged ones join the kit as they pass validation — same price.

The Studios open on launch day.

Free tools are live now. Join the waitlist and your 10 credits are ready the day this opens.

Join the waitlist

A real sample kit

Generated from A real order payload + a plain-English intent

import com.sap.gateway.ip.core.customdev.util.Message import groovy.xml.XmlSlurper import groovy.xml.StreamingMarkupBuilder

def Message processData(Message message) { // Read message log to log the original payload def messageLog = messageLogFactory.getMessageLog(message)

// Read the incoming XML body as a String
String body = message.getBody(java.lang.String)

// Log the original payload before any transformation
if (messageLog != null) {
    messageLog.addAttachmentAsString("OriginalPayload", body, "text/xml")
}

// Parse the XML using XmlSlurper (namespace-aware)
def order = new XmlSlurper().parseText(body)

// Transform productName to upper case - field exists in allowedFieldNames
def currentProductName = order.productName.text()
order.productName.replaceBody(currentProductName.toUpperCase())

// Serialize the modified XML back to a String, preserving structure/namespaces
String updatedXml = new StreamingMarkupBuilder().bindNode(order).toString()

// Set the updated XML as the new message body
message.setBody(updatedXml)

return message

}

This is the real output for a sample artifact — yours is written from your own file. Drafts for your review before client delivery.