Function documentation Condition Editor Locate the document in its SAP Library structure

Use

If you specified the receiver business systems explicitly, you can specify a condition for forwarding the message to these receivers.

You can specify a condition that refers to fields in the payload of the message. If the specified condition is fulfilled for these fields (the field has a certain value, for example), then the message is forwarded to the specified receiver business systems.

Note

Conditions are specified in the language XPath. The language XPath addresses parts of an XML document. A description of XPath would go beyond the scope of this documentation. See the W3C recommendation from November 16, 1999 (English/German/Other translations).

Three options are available for formulating a routing condition:

·        Type: Field value

You can select the contents of a field from the payload by using an XPath expression and compare them (using the operators This graphic is explained in the accompanying text or This graphic is explained in the accompanying text) to a value. At runtime, the current value of the field in the payload is compared with the value that you have specified in the Condition Editor.

You can use AND and OR operators to link multiple occurrences of these “equations” to a more complex condition.

Example

In a flight booking Business Scenario, a message contains the field Destination_From for the departure airport of a flight. An example of a possible condition would be: “If the field Destination_From has the value FRA (departure airport: Frankfurt am Main) or JFK (departure airport: Kennedy Airport New York), then the message is forwarded to the business systems that are specified in the column Receivers.” The text in the column Condition would then read: (//Destination_From = FRA) OR (//Destination_From = JFK).

·        Type: Logical expression

If you are unable to use the field value method and want to make full use of XPath, you can enter a complex logical expression directly. If this expression is fulfilled, then the message is forwarded to the specified receivers.

·        Type: Context

The adapters contain information that may be relevant for routing. In such cases, where IDoc outbound interfaces or RFC outbound interfaces are to be processed, in the routing condition you can specify context objects which you want to use to access this information.

¡        IDoc

This gives you the option of accessing selected fields of the IDoc control record (see Features).

¡        RFC

Here you can specify the name of the RFC destination in the sender system (see Features).

Features

The Condition Editor consists of two tab pages:

Tab Page Expression

This allows you to define the condition. You can enter a separate expression in a table row. You can then use AND and OR operators to combine these expressions to any complex condition. 

Functions for Editing Tables

Icon

Function

This graphic is explained in the accompanying text

Insert Group: Inserts a new row for a new expression below the selected row.

The new expression is linked to the expression in the selected row by the OR operator.

This graphic is explained in the accompanying text

Insert Expression: Inserts a new row for a new expression below the selected row.

The new expression is linked to the expression in the selected row by the AND operator.

Expressions that are linked through an AND operator are combined using a parenthesis symbol. The complete condition is displayed below the table in a preview window.

The contents of the individual table columns do not depend on the expression type you have specified in the column Type. You can define the type while in change mode, using the dropdown list box.

Table Columns

Column Type

Column XPath

Column OP

Column Value

Field value

Here you can enter the XPath expression that you want to use to select contents of a payload field (for example: //Airline_Id).

Choose between This graphic is explained in the accompanying text and This graphic is explained in the accompanying text

Comparison value for the field value in payload that is selected by the expression in column XPath

Logical expression

Here you can enter a complex logical XPath expression. The entire expression is then compared with the value TRUE (in the column Value).

This means: If the expression specified here is true, then the message is forwarded to the specified receivers.

This graphic is explained in the accompanying text

TRUE

(The expression specified in column XPath is checked for TRUE.)

Context

IDoc

To identify the IDoc partner, you can access one or more of the following fields of the IDoc control record:

RCVPRN, RCVPRT,RCVPFC, SNDPRN, SNDPRT, SNDPFC.

Use the following syntax with the IDoc namespace (example for field RCVPRN):

urn.sap-com:document:sap:idoc:messages.RCVPRN

Choose between This graphic is explained in the accompanying text and This graphic is explained in the accompanying text

Comparison value for the field value selected in column XPath

Context

(RFC)

Here you must specify the name of the RFC destination of the sender system in the following syntax with the RFC namespace:

urn.sap-com:document:sap:rfc:functions.Destination

Choose between This graphic is explained in the accompanying text and This graphic is explained in the accompanying text

 

 

Tab Page Namespaces

If the elements used in the XPath expression are specified by a namespace, you can assign them to a prefix. This prefix can be used to make the XPath expression more clear. On the tab page Namespaces, you can define prefix namespace pairs to specify the prefixes that are used in the XPath expression.

Functions

Icon

Function

This graphic is explained in the accompanying text

Insert a Row Below the Selection: Inserts a new row for a new prefix/namespace pair below the selected row.

If you confirm the details you have entered in the Condition Editor by choosing Copy This graphic is explained in the accompanying text, then the selected condition is saved and Display/Change Routing Condition is displayed in the Editor in the Condition column.

 

Leaving content frame