Show TOC

Querying the Distribution ModelLocate this document in the navigation structure

Prerequisites

The distribution model defines the potential receivers of a BAPI call. Because the distribution of data can be linked to additional conditions, certain dependencies between BAPIs or between BAPIs and message types can be defined as receiver filters .

For each of these receiver filters, before the distribution model is defined, a filter object is created whose value at runtimes determines whether the condition is satisfied or not.

Procedure

The query of the distribution model is divided into the two sub-phases determining the filter objects and performing receiver determination .

Determining the Filter Objects

Before receiver determination can be performed, the filter objects that have been assigned to the BAPI must be determined. If the filter objects are known at runtime, they can be specified directly during receiver determination. If not, function module ALE_BAPI_GET_FILTEROBJECTS is available: it extracts the corresponding filter objects for a specific BAPI.

Performing Receiver Determination

Function module ALE_SYNC_BAPI_GET_RECEIVER is called by the application program to determine the receivers of a synchronous BAPI. This module returns a table with all the receivers. In addition to the logical system, the table also contains the RFC destination. If receiver determination is tied to conditions, then the function module must be given the values of the filter objects that were determined above.

Receiver determination for calling a remote BAPI from the ALE distribution model generally appears as follows:

call function 'ALE_SYNC_BAPI_GET_RECEIVER'
        exporting
                object= 'TESTFH01'
                method= 'GETDETAIL'
        tables
                receivers= receivers
                filterobject_values= 
                filterobject_values
        exeptions
                error_in_filterobjects=1
                error_in_ale_customizing=2
                no_rfc_destination_maintained=3.
            

If you want to determine only one receiver for a synchronous BAPI, then the application program calls function module ALE_BAPI_GET_UNIQUE_RECEIVER.