SAP CPI global variables property commently used. dynamicall used.
Commonly Used Functions
When
designing integration content, you come across common questions such like how
to get the current system time (for example). The following table explains how
to solve such common problems.
How to ... |
Solution |
Get current system
time |
Use the following
expression: ${date:now:yyyy-MM-dd HH:mm:ss} The following blog shows how to
store the system time as variable (to make it available for another
integration flow on the same tenant): Cloud Integration – Using the JDBC Adapter to Implement
a Robust Scenario that Handles an Exception |
Get file name when
using the SFTP adapter |
Use the
header CamelFileName in the expression: ${header.CamelFileName}. More information: Headers and Exchange Properties Provided by the
Integration Framework |
Get exception
raised by the Camel framework |
Use the following
expression: ${exception.message} |
Find out which
operators are supported in routing conditions |
More
information: Define Router |
Calculate
hexadecimal values |
Java example for
calculating hex values: byte[] bytes =
"testValue".getBytes(StandardCharsets.UTF_8); String hexString =
DatatypeConverter.printHexBinary(bytes); |
Get the Camel
exchange ID (for example, to uniquely relate a step or another property to a
Camel exchange) |
Use the following
expression: ${exchangeId} |
display all SAP integration suite system variables ; ex:
${exception.message} ?
2 / 2
ChatGPT
ChatGPT
The SAP Integration Suite offers a
variety of system variables that can be used within integration flows to access
and manipulate data. These variables provide dynamic values based on the
context of the integration process. While there isn't an exhaustive list
available in a single location, here are some commonly used system variables
along with their descriptions:
- ${property.<propertyName>}: Accesses properties associated with the message.
- ${header.<headerName>}: Retrieves values from message headers.
- ${context.<contextProperty>}: Accesses values from the integration flow
context.
- ${exception.message}: Provides the error message associated with an exception.
- ${message.payload}: Accesses the payload of the message being processed.
- ${message.headers}: Retrieves all headers of the message.
- ${in.body}: Accesses the input message body.
- ${out.body}: Accesses the output message body.
- ${camelContext}: Provides access to the Camel Context.
- ${routeId}: Retrieves the ID of the current route.
- ${file:name}: Retrieves the name of the file being processed (if applicable).
- ${date:now}: Retrieves the current date and time.
- ${exchangeId}: Retrieves the ID of the exchange.
- ${exception.stacktrace}: Provides the stack trace of an exception.
These variables can be used within various components of
integration flows, such as routing, transformations, and error handling, to
access and manipulate data dynamically. Additionally, you can define and use
custom variables as needed within your integration flows to suit specific
requirements. Always refer to the documentation provided by SAP for the most
up-to-date and comprehensive information on system variables and their usage
within the SAP Integration Suite.