TECH CPI ZONE

SAP CPI Camel Expressions Reference

๐Ÿ’ฌ Message & Headers

Expression Description
${in.body}
Message payload
${header.var1}
Message header variable (replace var1)
${property.prop1}
Exchange property (replace prop1)
${bodyAs(String)}
Message body as String
${bodyAs(java.lang.String)}
Java-style string conversion
${header.CamelHttpMethod}
HTTP method used (GET, POST, etc.)
${header.CamelHttpUri}
Full HTTP request URI

๐Ÿ•’ Date, ID & Meta

Expression Description
${date:now:yyyy-MM-dd}
Current date
${date:now:yyyy-MM-dd HH:mm:ss.SSSZ}
Time Current date
${property.SAP_MessageProcessingLogID}
Message GUID (for logs)
${SAP_ApplicationID}
Application ID for monitoring
${camelId}
iFlow name / route ID
${exchangeId}
Unique exchange ID

โš ๏ธ Error Handling

Expression Description
${exception.message}
Error message
${exception.stacktrace}
Error stacktrace

Persist Messages

Expression Description
https://<Cloud Integration host>/api/v1/MessageProcessingLogs('<Message ID>')/MessageStoreEntries
Store a message so that you can access the stored message and analyze it at a later point in time.
https://mytenant.tmn.hci.eu1.hana.ondemand.com/api/v1/MessageProcessingLogs('ABCD-1234-EFG')/MessageStoreEntries
Store a message so that you can access the stored message and analyze it at a later point in time.

๐Ÿ“ File Info (Relative & Absolute)

Expression Returns
file:absolute
TRUE or FALSE
file:absolute.path
Full absolute path
file:ext
File extension
file:name
File name with path
file:name.ext
File extension only
file:name.noext
File name without extension
file:onlyname
File name only (no path)
file:onlyname.noext
File name only, no extension
file:parent
Parent folder
file:path
File path

๐Ÿงพ Header Expressions

Expression Description
${header.CamelHttpMethod}
HTTP Method (GET, POST, etc.)
${header.Type}
Custom header value (e.g. Order Type)
${header.CustomerID}
Customer ID header from source system

๐Ÿ”ง Property Expressions

Expression Description
${property.SAP_MessageProcessingLogID}
Message GUID (used in monitoring/logs)
${property.Status}
Status property (Success, Error, etc.)
${property.CustomerID}
Property set earlier in flow

๐Ÿ“ฆ Body Expressions

Expression Description
${body}
Entire message payload
${body} contains 'CONFIDENTIAL'
Check if payload contains specific text
${body.length()}
Get message body length

๐Ÿ•’ Date, ID & Meta

Expression Description
${date:now:yyyy-MM-dd}
Current date
${date:now:yyyy-MM-dd HH:mm:ss.SSSZ}
Full timestamp with timezone
${exchangeId}
Unique message exchange ID
${id}
Message ID
${camelId}
Route or iFlow ID
${SAP_ApplicationID}
Application ID for monitoring

๐Ÿ“ File & Path Expressions

Expression Description
${header.CamelFileName}
Full file name from SFTP/File adapter
${header.CamelFileAbsolutePath}
Absolute file path
${header.CamelFileNameOnly}
File name without path

๐Ÿง  Logical & Advanced Expressions

Expression Description
${header.Type} == 'Invoice'
Compare header value for conditional routing
${header.Type} regex 'INV.*'
Regex match in headers
${body} contains 'CONFIDENTIAL'
Payload contains condition
${date:now:yyyyMMdd}_${header.CustomerID}
Dynamic string for filenames or logs

About

This section contains information about you or your business.

Services

Here you can describe the services you offer in detail.

Contact

You can place a contact form or contact details here.