Show TOC

Function documentationDetermining the Receiver of a BAPI

 

How data is distributed by an object method can depend on the requirements specified in the distribution model (in the Implementation Guide). See Start of the navigation path SAP Web Application Server Next navigation step IDoc Interface End of the navigation path / Start of the navigation path ALE) Next navigation step Modelling and Implementing Business Processes Next navigation step Maintain Distribution Model End of the navigation path.

The prerequisite for this filtering is that a filter object type has been assigned to the relevant BAPI in your SAP application. For some BAPIs, SAP has already defined and assigned filter object types. You can also define your own filter object types and assign them to a BAPI (see Defining and Assigning Filter Object Types).

Before the BAPI or generated BAPI-ALE interface can be called, the receiver must be determined. When the receiver is determined, the system checks that the filter objects satisfy the specified conditions and the valid receivers are reported back.

In the ALE distribution model the following dependencies can be mapped:

  • Between a BAPI and a message type

  • Between BAPIs

These dependencies must be implemented by a function module on the application side. In ALE development, the function module must be assigned to the relevant object type (via Start of the navigation path Dependencies Next navigation step Define function module for dependent business object End of the navigation path).

If a dependency is defined as a condition in the ALE distribution model, the receiver of the referenced BAPI or message type is determined.

Example Example

Example of a BAPI dependency on a message type:

The distribution of company addresses has been integrated in the object maintenance for the vendor. The address data is then distributed together with the object data via ALE. The address data is dependent on the object data and is distributed via the BAPI. The object data is distributed using the message type CREMAS.

There is therefore a dependency between the BAPI and the message type.

In the distribution model, an active receiver filter is assigned to the BAPI used for distributing company addresses (AddressOrg.SaveReplica). The dependency has been activated in the attribute Dependent distribution in the filter display.

Based on the receiver determination, the object data with the BAPI addresses is only distributed if the filter condition for CREMAS is met.

End of the example.

ALE provides a range of function modules for receiver determination with the function group BDAPI.

Features

The function modules of function group BDAPI are used as follows:

Function Module

Features

ALE_BAPI_GET_FILTEROBJECTS

Determination of Filter Objects of a BAPI

ALE_ASYNC_BAPI_GET_RECEIVER

Determination of Receivers of Asynchronous BAPIs

ALE_SYNC_BAPI_GET_RECEIVER

Determination of Receivers of Synchronous BAPIs

ALE_BAPI_GET_UNIQUE_RECEIVER

Determination of Receivers of Synchronous BAPIs

Example Example

The following examples programs for receiver determination are provided:

End of the example.