Start of Content Area

Procedure documentation Implementing Lookups Using SystemAccessor  Locate the document in its SAP Library structure


Generic Lookup API

In the case of generic access, before executing the lookup, developers must themselves build the payload that the adapter expects and parse the result payload.

To access an application system generically, developers use the SystemAccessor class. For generic calls, developers of a method must pass a stream with the payload, which is then sent to the adapter. The result of the call is a payload object, which you can use to both read the payload as a stream and parse the payload.

The generic lookup API is part of the mapping API (see LookupService class in the Javadoc documentation). For more information about these APIs, see SAP Developer Network at (SDN user required).


You can obtain the schema to call an RFC by simply importing the RFC into the Enterprise Services Repository. (See Importing IDocs and RFCs.)



public class Parametraziation_Java extends AbstractTransformation {

   public void transform(TransformationInput in, TransformationOutput out)
         throws StreamTransformationException {

      SystemAccessor accessor = null; inputStream = null;

      try {

         // 1. Read Import Parameter to get the channel ID for Lookup
         Channel channel = in.getInputParameters().getChannel("MYCHANNEL");

         // 2. Get a system accessor for a channel.
         accessor = LookupService.getSystemAccessor(channel);

         // 3. Create a payload according to the data type.
         // To get a payload object, pass the payload
         // as to one of the following methods:
         // LookupService.getBinaryPayload() for binary payload,
         // or LookupService.getTextPayload() for text payloads.

         Payload payload = LookupService.getXmlPayload(inputStream);

         // 4. Set the operation name and namespace; optional step,
         // only necessary if the used adapter needs these parameters.


         // 5. Execute lookup.
         Payload result =;

         // Steps 3. and 5. can be executed several times.

      } catch (Exception e) {
         // Exception Handling
      } finally {
         // 5. close the accessor in order to free resources.

         if (accessor != null)






End of Content Area