You can use the mapping lookup API in a used-defined function of a message mapping and then use the generic lookup API (class SystemAccessor) or the special API for database calls (DataBaseAccessor). In the case of the latter, if the SELECT calls are only basic, it is sufficient to use the standard function to define JDBC lookups graphically (see: Defining JDBC Lookups Graphically).
Note the prerequisites for the adapter that you want to use for the lookup (see: Adding Lookups to Mapping Programs).
You have already created a message mapping and are in the mapping editor.
1. To execute the lookup, your user-defined function requires an import function parameter of type Adapter, which is assigned to the message mapping parameter (see step 1-3 in Defining and Using Import Parameters).
2. Using the lookup API and the import parameter, implement the call to the application system.
○ If the features of the standard function for graphical JDBC lookups (see above) are not sufficient for your application, use the specific lookup API for the JDBC adapter (see: Implementing Lookups Using DataBaseAccessor).
○ For calls with all other adapters, use the generic lookup API (see: Implementing Lookups Using SystemAccessor).
3. If, later, you want to assign a receiver channel to the message mapping parameter that you assigned the import function parameter to in step 1, you must assign this import parameter to an operation mapping parameter by using a binding (see step 4-8 in Defining and Using Import Parameters).
To execute or test the mapping program and the mapping lookup, perform the following steps in the Integration Directory:
4. Create the receiver channel for the application system call in the Integration Directory (see: Communication Channel).
5. To transfer the ID of the receiver channel to your message mapping program at runtime, create an interface determination and assign it to the operation mapping from step 3 (see step 6 in 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 message mapping program will terminate with an error message.
You have implemented a lookup in a user-defined function of your message mapping program, and have configured it in the Integration Directory. You can now test the message mapping program in the operation mapping (see: Test Environment for Operation Mappings).