Implementing Loose Coupling with BAPIs


When a BAPI is used to exchange data asynchronously within the context of ALE, the following processes are involved:

  • When the asynchronous BAPI function module interface is called in the sending system, it fills the corresponding IDoc with data from the BAPI call (outbound processing).
  • This IDoc is dispatched to the target system.
  • In the target system, a BAPI call is created from the IDoc by filling the BAPI import parameters with the IDoc data and passing them on to the corresponding BAPI function module (inbound processing).

To use BAPIs as asynchronous interfaces, a BAPI-ALE interface that can be used in the distributed business process must be generated for an existing BAPI. This BAPI-ALE interface involves the following components:

  • A message type
  • An IDoc type
  • An ALE inbound function module that reads the segments of an inbound IDoc, fills the parameters of the corresponding BAPI, and calls the BAPI
  • An ALE outbound function module that generates an IDoc from the parameters of the BAPI and places it in ALE outbound

For a detailed description of the process flow during the generation of the BAPI-ALE interface, see Maintaining the BAPI-ALE Interface.

Process Flow

Flow of Asynchronous Communications

The individual steps involved in asynchronous communication using BAPIs are described in detail below. The process flow can be divided into the following phases:

The diagram below illustrates the steps required to call the BAPI in a remote system.