BAPI/ALE Integration

Use

BAPIs are integrated into the ALE communication model. ALE communication is asynchronous and message-based. ALE communication is the preferred way to integrate distributed SAP Systems, for example, for distributing master data.

BAPIs are the standardized interfaces for ALE-supported communication. ALE services, such as asynchronous BAPI calls, distribution model, monitoring and error handling can be used for BAPIs. The IDoc types required for the ALE services can be generated from BAPIs.

See also: Using the ALE Services.

When you use BAPIs for asynchronous messaging, the application in the sending system calls the generated ALE IDoc interface instead of the BAPI. The ALE IDoc interface performs the following tasks:

  • Creates an IDoc from the BAPI data

  • Sends the IDoc to the target system

  • Receives the IDoc in the target system, creates the BAPI data from the IDoc and calls the BAPI

You can use Transaction BDBG to create the other objects required for the asynchronous communication (message type, IDoc type, inbound and outbound function module).

See also: Maintaining the BAPI ALE Interface.

A BAPI should only be implemented as an asynchronous interface, if at least of the following conditions is satisfied:

  • Database changes are consistent in all systems

    Data must be updated consistently on a remote system as well as on the local system.

  • Loose coupling

    With a synchronous interface the coupling between the client and the server system is too narrow. If the connection is interrupted the client system would not be able to function properly.

  • Performance

    The interface has a large volume of data or database operations to be carried on the server system will take a long time. A synchronous interface cannot be used in this situation because performance would be too low.

BAPI/ALE integration requires that:

  • Message types are created and IDoc types are generated for all write BAPIs.

    See also: Maintaining BAPI ALE Interfaces.

  • All IDoc types and the associated segments are released.

  • The BAPI interface and the IDoc interface are identical. Make sure that the message type, IDoc type and segments are regenerated, particularly if the BAPI is changed.