|Skip Navigation Links|
|Exit Print View|
|About Oracle Java CAPS Application Adapters Java CAPS Documentation|
SAP ALE (Application Link Enabling) is a technology for exchange of business data between multiple SAP R/3 systems or SAP R/3 and customer applications. The vehicle for data exchange is an IDoc (Intermediate Document), which is basically a SAP defined message structure that serves as a container for the different types of application data being transmitted.
ALE provides SAP customers with a program distribution model and technology that enables them to transfer IDocs across various platforms and systems.
IDocs are used as containers for information, and are used to exchange business data between systems.
Several hundred IDocs are supplied with each SAP R/3 system, serving as templates for a wide variety of applications. The IDoc hierarchy is represented by the following terminology:
The SAP ALE IDoc Object Type Definition (OTD), when used with the SAP BAPI Adapter in Transactional Remote Function Call (tRFC) mode, enables Java CAPS projects to exchange data with SAP R/3 software using SAP’s Intermediate Documents (IDocs) via the Application Link Enabling (ALE) interface.
The next two sections provide an overview of how to use the IDoc OTD and the SAP BAPI Adapter to send or receive IDocs to SAP R/3.
During routine operations, an application on the SAP R/3 system generates a transaction designated for an external system. The ALE interface converts the data from the internal data format to the IDoc format, and sends it via tRFC to the SAP BAPI Adapter, acting as a RFC server.
The Java CAPS Project’s business rules receive the IDoc data from the SAP BAPI Adapter, performs any necessary processing or routing, and sends the information to another adapter connected to the recipient system. Any necessary data transformation required for the target application is performed in your Project Collaborations.
The adapter reads in the required configuration parameters and establishes a network connection with the SAP R/3 system. The adapter acts an RFC server, receiving IDocs from the SAP R/3 system.
When the IDoc is sent from SAP R/3 via tRFC, the SAP BAPI Adapter uses the RFC OTD, IDOC_INBOUND_ASYNCHRONOUS, to receive the IDoc data.
IDoc data received by the IDOC_INBOUND_ASYNCHRONOUS OTD can be marshaled out of the OTD and unmarshaled into a IDoc OTD.
If identified successfully, the process moves on to the next step. If not, the adapter composes the appropriate response and logs an exception in the log file.
If the Collaboration or Business Process fails, an exception is logged in the log file raised back to SAP R/3.
The adapter then repeats the procedure beginning with step 2.
In the outbound mode, you must first get the data into the IDoc OTD using its unmarshal method. From the IDoc OTD, you unmarshal the data into the IDOC_INBOUND_ASYNCHRONOUS RFC OTD which sends the IDoc to SAP R/3 using tRFC protocol.
When the Collaboration or Business Process starts to run, the adapter is initialized with its configuration properties.
The data is unmarshaled to the IDoc OTD before being sent to the SAP BAPI Adapter’s RFC OTD---IDOC_INBOUND_ASYNCHRONOUS.
The SAP BAPI Adapter transmits the data to SAP R/3.
If no exceptions are raised by the receiving SAP R/3 host, the next TID is incremented.
The adapter repeats the procedure beginning with step 2.
Messages are sent to the SAP R/3 host via Transactional RFC (tRFC). With tRFC, the receiving SAP R/3 system relies on an unique Transactional ID (TID) sent with the message to ascertain whether or not a transaction has ever been processed by it before. The SAP BAPI Adapter assumes that all messages handled are new and assigns a new TID to each message.
Note - If you have IDoc data in a byte array format you may unmarshal it directly to the IDOC_INBOUND_ASYNCHRONOUS OTD without using the IDoc OTD first.