WebSphere® Adapter for SAP Software provides
multiple ways to interact with applications and data on SAP servers.
Outbound processing (from an application to the adapter to the SAP server)
and inbound processing (from the SAP server to
the adapter to an application) are supported.
For outbound processing,
the adapter client invokes the adapter
operation to create, update, or delete data on the SAP server or
to retrieve data from the SAP server.
For inbound processing, an event that occurs on the SAP server is
sent from the SAP server to
the adapter. The ALE inbound and BAPI inbound interfaces
start event listeners that detect the events. Conversely, the
Advanced event processing interface polls the SAP server for
events. The adapter then delivers the event to an endpoint, which
is an application or other consumer of the event from the SAP server.
You configure the adapter to perform outbound and inbound processing
by using the external service wizard to
create a deployable module that includes the interface to the SAP
application as well as business objects based on the functions or
tables it discovers on the SAP server.
Overview of the outbound processing interfaces
WebSphere Adapter for SAP Software provides
multiple interfaces to the
SAP server for
outbound processing.
Figure 1. Outbound interfaces
- Through its BAPI interfaces, the adapter issues remote function
calls (RFCs) to RFC-enabled functions, such as a Business Application
Programming Interface (BAPI) function. These remote function calls
create, update, or retrieve data on an SAP server .
- The BAPI interface works with individual BAPIs (simple BAPIs).
For example, you might want to check to see whether specific customer
information exists in an SAP database.
- The BAPI work unit
interface works with ordered sets of BAPIs.
For example, you might want to update an employee record. To do so,
you use three BAPIs to lock the record (to prevent any other changes
to the record), update the record, and have the record approved.
- The BAPI result set interface uses two BAPIs to select multiple
rows of data from an SAP database.
BAPI calls are useful
when you need to perform data retrieval
or manipulation, and a BAPI or RFC function that performs the task
already exists.
Simple BAPIs can be invoked through the
Synchronous RFC, Asynchronous Transactional RFC, or Asynchronous
Queued RFC protocol.
- The Query interface for SAP Software retrieves data
from specific
SAP application tables. It can return the data or check for the existence
of the data. You can use this type of interaction with SAP if you
need to retrieve data from an SAP table without using an RFC function
or a BAPI.
- With the Application Link Enabling (ALE) interface,
you exchange
data using SAP Intermediate Data structures (IDocs). For outbound
processing, you send an IDoc or a packet of IDocs to the SAP server.
The
ALE interface, which is particularly useful for batch processing of
IDocs, provides asynchronous exchange. You can use the Queued Transactional
(qRFC) protocol to send the IDocs to a queue on the SAP server.
The qRFC protocol ensures the order in which the IDocs are received.
It is often used for system replications or system-to-system transfers.
- With the ALE pass-through IDoc interface, the adapter sends the
IDoc to the SAP server with
no conversion of the IDoc. The business object contains stream data
representing the IDoc.
- With the Advanced event processing
interface, you send data to
the SAP server.
The data is then processed by an ABAP handler on the SAP server.
Overview of the inbound processing
interfaces
WebSphere Adapter for SAP Software provides
the following interfaces to the
SAP server for
inbound processing.
Figure 2. Inbound interfaces
- Through its BAPI inbound interface, the adapter listens
for events and receives notifications of RFC-enabled function calls
from the SAP server.
- With Synchronous RFC, both the adapter and the SAP server must
be available when the call is made from the SAP server to
the adapter. The adapter sends the request to a predefined application
and returns the response to the SAP server.
Note: In
version 6.1.0 of the WebSphere Adapter for SAP Software,
inbound synchronous processing of RFC-enabled functions was known
as the Synchronous callback interface.
- With
Asynchronous Transactional RFC, the event will be delivered
to the adapter even if the adapter is not available when the call
is made. The SAP server stores
the event on a list of functions to be invoked and continues
to attempt to deliver it until the adapter is available.
Note: You
can also use Asynchronous Transactional RFC if you want to deliver
the functions from a predefined queue on the SAP server.
Delivering the files from a queue ensures the order in which the functions
are sent.
If you select assured-once delivery, the adapter
uses a data source to persist the event data received from the SAP server.
Event recovery is provided to track and recover events in case a problem
occurs when the adapter attempts to deliver the event to the endpoint.
- With the ALE inbound processing interface, the adapter
listens
for events and receives one or more IDocs from the SAP server.
As with ALE outbound processing, ALE inbound processing provides asynchronous
exchange.
You can use the qRFC interface to receive the IDocs from
a queue on the SAP server,
which ensures the order in which the IDocs are received.
If
you select assured-once delivery, the adapter uses a data source
to persist the event data, and event recovery is provided to track
and recover events in case a problem occurs when the adapter attempts
to deliver the event to the endpoint.
- With the ALE
pass-through IDoc interface, the SAP server sends
the IDoc through the adapter to the endpoint with no conversion of
the IDoc. The business object contains stream data representing the
IDoc.
- The Advanced event processing interface polls the SAP server for
events. It discovers events waiting to be processed. It then processes
the events and sends them to the endpoint.
How the adapter interacts with the SAP server
The
adapter uses the SAP Java™ Connector
(SAP JCo) API to communicate with SAP applications. An application
sends a request to the adapter, which uses the SAP JCo API to convert
the request into a BAPI function call. The SAP system processes the
request and sends the results to the adapter. The adapter sends the
results in a response message to the calling application.
Figure 3. How the adapter connects
a calling application with an SAP application
How the
adapter is packaged
WebSphere Adapter for SAP Software is
packaged and delivered as two RAR files, and the one you use depends
on whether the invoked SAP function supports transactional behavior.
- If the targeted function (for example, BAPI) supports transactions,
use the CWYAP_SAPAdapter_Tx.rar adapter because it supports local
transaction behavior and, as such, can participate in the transaction
managed by the WebSphere Application Server Transaction
Manager.
- If the targeted function (for example, BAPI) does
not support
transactions, use the CWYAP_SAPAdapter.rar adapter because it indicates
to the WebSphere Application Server Transaction
Manager that the interaction performed with the SAP system cannot
participate in and follow transactional semantics.