The ALE Module is written in Java and extends the vision connector framework. The module consists of:
The ALE Module uses the RFC Server connector component because the similarities for event processing both support RFC calls directly from the SAP application.
SAP delivers the RFC libraries in Java and C. The connector is delivered and run as a Java archive (JAR) file.
Figure 18 illustrates the architecture of the ALE Module.
Figure 18. ALE Module architecture
When processing events from SAP, the connector uses the components illustrated in Figure 18 in the following ways:
An event is the execution of an ABAP function that transfers data to the listener. The event data sent by SAP may represent one or more such heterogeneous executions.
Each event from SAP is considered a transaction. The connector uses a two-step process with a Transaction ID (TID) to handle each event, guaranteeing once-only delivery of data from SAP to the connector.
When processing requests from the integration broker, the connector uses the components illustrated in Figure 18 in the following ways:
Listener threads handle all of the ALE-specific RFC calls between the ALE Module and the SAP application. When the connector starts up, the init() method of the RFC Server Module creates a main thread that spawns a configurable number of listener threads. Each listener thread opens a handle to the SAP Gateway.
The listener threads do the following:
A thread listens continuously in a synchronous manner for events from the ALE-specific functions that it supports.
SAP uses a transaction and its corresponding ID to frame an event, guaranteeing that each piece of data is delivered once and only once from SAP. SAP sends a Transaction ID (TID) with the event data. To manage the TIDs centrally for event and request processing, the connector stores each TID as a JMS-MQ message on an MQSeries queue. When processing events, it also stores the associated IDoc data as the message body. The connector stores the TID, TID status, and the IDoc's processing status in the message header.
Two ALE-specific business object handlers are provided, one for event processing and one for request processing.
A listener thread instantiates the event-processing business object handler, which does the following:
The vision connector framework instantiates the ALE request-processing business object handler, which checks for a value in the TransactionId attribute in the WebSphere business object for SAP. If this value exists, it continues with the following steps.
A WebSphere business object for SAP represents each IDoc as a parent wrapper business object that contains two child business objects: a control record business object and a data record business object. The control record business object contains the metadata required by the connector to process the business object. The data record business object contains the actual business object data to be processed by the SAP application, and the metadata required for the connector to convert it to an IDoc structure for the RFC call.
The adapter includes a business object definition for the control record. The definition file, BO_SAPIDocControl.txt, is located in the \repository\SAP directory. The ALE Module uses the same business object definition for 3.X and 4.X versions of SAP.
The TABNAM attribute in the control record business object indicates which SAP function module the parent wrapper business object calls:
In addition, the following attributes must have values for SAP to properly process the object in ALE. These values are based on your ALE configuration:
The DOCNUM attribute in both business objects establishes the relationship between the data record business object and the control record business object.
When processing service call requests, the ALE Module can handle multiple IDocs in a single business object. Before it can do so, however, you must add another multiple-IDoc wrapper business object around two or more parent wrapper business objects. This top-level multiple IDoc wrapper business object contains an attribute that represents an array of parent wrapper business objects. For more information, see Parent wrapper business object.
The adapter includes a business object generation tool, SAPODA. This tool uses an IDoc definition text file to generate business object definitions for the ALE Module. For more information on developing business objects for the ALE Module, see Developing business objects for the ALE Module and Appendix C, Generating business object definitions using SAPODA.