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.
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:
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 underFiltering 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:
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.
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.
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 involves both a time-based control and a quantity 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.
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 underImplementing Outbound Processing.