
Note the prerequisites for the adapter that you want to use for the lookup.
More information: Adding Lookups to Mapping Programs
To add a lookup to an XSLT program, you must parameterize it and use the lookup API. To access parameters and to use the mapping API, you must call Java methods in the XSLT program. To minimize the number of Java methods that need to called, SAP recommends that you encapsulate the entire mapping lookup in one single Java method.
1. Implement a Parameterized XSLT Mapping Program
To be able to execute the lookup, your XSLT mapping program requires an import parameter for the adapter that is to be used. Create an XSLT mapping (see steps 1 and 2 in Parameterizing XSLT Mappings ). At runtime, the relevant operation mapping uses the import parameter to transfer the ID of an appropriate receiver channel for the adapter (see steps 4-6).
Create a Java mapping program by implementing the look up. The method that you want to use to execute the lookup must have a parameter in order to transfer the ID of the receiver channel (see step 1) from the XSLT program. Furthermore, add additional parameters that are required for the lookup and for transferring the result to the XSLT program, to the signature of the Java method.
More information: XSLT Mapping with Java Enhancement
Using the lookup API and the import parameter, implement the call to the application system within the Java method.
For JDBC adapter calls, use the specific lookup API for the JDBC adapter.
More information: Implementing Lookups Using DataBaseAccessor
For calls with all other adapters, use the generic lookup API.
More information: Implementing Lookups Using SystemAccessor
To be able to assign a receiver channel to this import parameter later, you must assign the import parameter to an operation mapping parameter by using a binding (see steps 3-7 in Parameterized XSLT Mappings ).
To execute or test the mapping program and the mapping lookup, perform the following steps in the Integration Directory:
2. Configure a Receiver Channel for Mapping Lookups
Create the receiver channel for the application system call in the Integration Directory.
More information: Defining Communication Channels
To transfer the ID of the receiver channel to your XSLT mapping program at runtime, create an interface determination and assign it to the operation mapping from step 4.
More information: Defining an Interface Determination
You can only execute the mapping lookup once you have performed these steps and have installed the runtime components of the Integration Server. If this is not the case, the XSLT mapping program will terminate with an error message.
Using a Java enhancement, you have implemented a lookup in your XSLT mapping program, and have configured it in the Integration Directory. You can now test the XSLT mapping program in the operation mapping (see: Test Environment for Operation Mappings ).