ALE Outbound Processing


The outbound processing performed by the ALE layer can be divided into the following steps: data filtering, converting the BAPI call to an IDoc, segment filtering, field conversion, version change, and dispatch control.

Data Filtering

If data filters have been defined for the BAPI in the distribution model, then this filtering is performed automatically by the outbound function module. Data filtering offers two filter services: interface reduction, which carries no conditions, and parameter filtering, which is tied to conditions:

  • Interface reduction allows field suppression by the BAPI interface, which means that these fields are ignored by the receiver. This can be used to prevent certain fields from being overwritten, for example. However, it can only be used for certain types of BAPIs whose interface explicitly supports this type of filtering.
  • Parameter filtering allows you to control the scope of the dataset for transmission in the BAPI, by filtering out BAPI table parameters that fail to meet the defined conditions. If hierarchical dependencies exist between two table parameters of the BAPI, then additional parameter hierarchies will have to be defined. For further information, see the ALE Programming Guide under Defining Hierarchies Between BAPI Parameters.

Because parameter filtering can be linked to conditions, filter objects have to be created for this type of filtering (in contrast to interface reduction). For more information on data filtering, see the ALE Programming Guide under Filtering Data.

Converting the BAPI Call to an IDoc

Once data filtering is complete, the outbound function module uses the BAPI call to generate an IDoc with the data to transfer. In the process, note the following:

  • If full parameters were suppressed during interface reduction, then these parameters will not be included in the IDoc. In contrast, if you only left out individual fields for structured parameters, the full parameters will still appear in the IDoc.
  • Table lines that are filtered out during parameter filtering are not included in the IDoc.

Segment Filtering

Once the IDoc has been created, additional filtering of the IDoc segments is possible. Please note, however, that this type of filtering is only rarely used with BAPIs.

Field Conversion

The field conversion, which takes place after segment filtering, is especially relevant, for example, when a field format differs between the sender and receiver system. This function is especially important for converting the field format during data exchange between R/2 and SAP Systems. Please note, however, that field conversion only plays a very small role for BAPIs.

Version Change

To ensure that ALE functions properly between SAP Systems with different releases, a conversion of IDoc formats can be performed to modify the message types used by the different releases.

Once the version change is complete, the IDocs are stored in the database and dispatch control is started: it decides which of these IDocs are dispatched immediately.

Dispatch Control

Dispatch control involves both a time-based control and a quantity control:

  • Time-based control

IDocs can be dispatched immediately or in background processing. These settings are made in the partner agreement. If the IDocs are dispatched in background processing, a job must be scheduled to do so. The execution interval of this job can be selected freely.

  • Quantity control

By default, ALE immediately writes the result of every IDoc in the BAPI to the database. It is possible, however, to collect IDocs and send them in packages. As a consequence, the results of the IDocs or BAPIs are not updated until the entire package has been processed. The package approach also allows you to bundle multiple BAPIs under a single LUW within ALE. The package size is configured for each specific partner in ALE customizing.

When an IDoc is to be dispatched, dispatch control uses the partner agreement for the logical receiver system to automatically determine the corresponding RFC destination. It then passes the IDoc on to the communication layer.

For more information on outbound processing, see the ALE Programming Guide under Implementing Outbound Processing.