Start of Content Area

Function documentation XSLT Mapping  Locate the document in its SAP Library structure


Interface descriptions are in the form of XML documents. XSL Transformation (XSLT) is a member of the XML family of languages. It describes how an XML structure is transformed into another XML structure.


Replacement of SAP XML Toolkit by JDK 5

In releases lower than SAP NetWeaver Process Integration 7.1, XSLT programs are executed by using the SAP XML Toolkit. The SAP XML Toolkit will be replaced by version 5 of the Java Development Kit (JDK). JDK 5 has the following advantages over the SAP XML Toolkit:

      Quicker execution of XSLT programs

      More-advanced troubleshooting

      Greater scope of functions

The SAP XML Toolkit is supported by SAP NetWeaver Process Integration 7.1, and will also be supported by the next release version. It will not be supported in any subsequent releases. Therefore, SAP recommends that you use JDK 5 for all new XSLT mapping programs, and that you test any existing XSLT programs with JDK 5 and modify them accordingly. To use the JDK 5 as the runtime for XSLT mapping programs, do not select Use SAP XML Toolkit in the operation mapping that you reference the XSLT mapping program from.


In SAP NetWeaver 2007, the PCK will only have JDK 5.


XPath and <xsl:include>

You can define mappings using XSLT together with XPath. XPath is also a specification of the XML family. Using XPath you can address any node in an XML document. XSLT implements XPath expressions to select substructures of an XML document. Using templates in XSLT you can define the mapping rules for the selected substructures.

You can use the XSLT tags <xsl:include> and <xsl:import> to include predefined templates for substructures in a complete mapping definition. In this way, you can reuse mappings for data types.

Runtime Constants

In the same way as in Java mappings, the mapping runtime in XSLT programs also returns parameters that you can use to evaluate information in the XSLT program that is not known until runtime.

Mapping Runtime Constants



Relevant for PCK


Classification of message. Possible values:

Asynchronous or synchronous request message

Response to a request message

      SystemAck, ApplicationAck, SystemError, ApplicationError:
Acknowledgment Messages



XI message protocol version. Example: For the XI 3.0 message protocol VERSION_MAJOR = 3 and VERSION_MINOR = 0.


The PCK only uses message protocol XI 3.0.





The mode of a message can be synchronous or asynchronous. Correspondingly, these constants can have the value synchronous or asynchronous.



The message ID. It can change during communication:

      Response messages get a new message ID.

      If new messages result from a message (the message is copied at multiple receivers), the new messages get new message IDs.



The ID of a referenced message that belongs semantically to this message. For example, a response message uses this field to note which request message it belongs to.



This field is not mandatory in the message. It enables an ID to be used to group messages that belong together. This field is not intended to be used for message serialization and has nothing to do with the serialization context ( ABAP proxy runtime, Java proxy runtime).




Time stamp specifying when the message was sent by the sender. The format of the time stamp is as follows:


The letter ‘T’ separates the date from the time, which is generally specified in UTC. If it is a local time, the closing ‘Z’ is omitted.



Sender interface name. As of SAP XI 3.0, use this constant instead of the constant SENDER_NAME used previously.



Sender interface namespace.

As of SAP XI 3.0, use this constant instead of the constant SENDER_NAMESPACE used previously.



Communication party that sent the message.


See also: Communication Party


Issuing agency for the message sender.



Identification scheme used by the sender.



Service on the sender side that sent the message. For example, the name of a business system.

As of SAP XI 3.0, use this constant instead of the constant SENDER_SYSTEM used previously.


See also: Service


Receiver interface name.



Receiver interface namespace.



Communication party to receive the message.


See also: Communication Party


Issuing agency for the message receiver.



Identification scheme used by the receiver.



Service on the receiver side that receives the message. For example, the name of a business system.

As of SAP XI 3.0, use this constant instead of the constant RECEIVER_SYSTEM used previously.


See also: Service


Returns an AbstractTrace object that you can use to write messages to monitoring in the mapping program.


If you want to access one of the constants in the XSLT program, you first have to declare the constant as a parameter, for example:

<xsl:param name="MessageId" />

Java Enhancements

Moreover, using an XSLT definition you can call external Java methods to convert XML structures. This procedure gives you more flexibility when defining mappings. For more information about XSLT mapping with Java enhancement , see further documentation.


For more information about XSL/XSLT and XPath, see the Web page of the W3 Consortium .


The function for booking a flight contains a parameter for the flight class. The outbound interface represents flight classes as symbolic values; in the inbound interface, flight classes have numerical values. The XSLT section converts the symbolic representation of the source system into the numerical representation of the target system.

The XPath expression match=“//hh:class“ selects the node <hh:class> in the outbound interface. The XSLT statement <xsl:choose> then defines the mapping rule for how the Integration Engine converts the symbolic values in the source system into the numerical values in the target system.

This graphic is explained in the accompanying text




End of Content Area