Distribution Using Message Types

When message types are used to transfer data asynchronously in ALE:

Outbound Processing

An application function module creates a master IDoc in outbound processing, the so-called master IDoc.

The following steps are carried out in the ALE layer:

·        Receiver determination, if this has not already been done by the application.

·        Data selection

·        Segment filtering

·        Field conversion

·        Version change

·        Dispatch control

The formatted IDoc is passed to the communication layer and from here sent to the system that was called (server) via a transactional remote function call (RFC) or via file interfaces (for example, EDI).

If an error occurs in the ALE layer, the IDoc containing the error is saved and a workflow task is created. The ALE administrator can use this workflow to correct the error.

For information on programming see the Implementing Outbound Processing.

The individual steps are explained below.

Receiver Determination

Like a normal letter, an IDoc has a sender and a receiver. If the application does not explicitly specify the receiver, the ALE layer uses the distribution model to help determine the receivers of the message.

The ALE layer can find out from the model whether any distributed systems should receive the message and, if so, then how many. The result may be that one, several or no receivers at all are found.

For each of the distributed systems identified as receiver systems, the data specified by the filter objects in the distribution model is selected from the master IDoc. This data is then entered into an IDoc, and the appropriate system is specified as the receiver.

Segment Filtering

Individual segments can be removed from the IDoc before it is dispatched. If you want to remove IDoc segments, in Customizing for ALE choose:

Modeling and Implementing ALE Business Processes
   Configure Master Data Distribution
         Specify Scope of Data for Distribution
               Filter IDoc Segments (BD56)

The appropriate setting depends on the sending and receiving logical R/3 System.

Field Conversion

You can define field conversions for specific receivers in the IMG:

Basis
IDoc Interface/Application Link Enabling
   Modeling and Implementing Business Processes
         Converting Data Between Sender and Receiver

Standard rules can be specified for field conversions. One set of rules is created for each IDoc segment and rules are defined for each segment field. These are important for converting data fields to exchange information between R/2 and R/3 Systems. For example, the field plant can be converted from a two character field to a four character field.

Standard Executive Information System (EIS) tools are used to convert fields.

IDoc Version Change

SAP guarantees that ALE works correctly between different releases of the R/3 System. By changing the IDoc format you can convert message types from different R/3 releases.

SAP uses the following rules to convert existing message types:

·         Fields can be appended to a segment type

·         New segments can be added

ALE Customizing records the version of each message type used in each receiver. The communication IDoc is created in the correct version in outbound processing.

Dispatch control

Time and quantity are the factors that control the dispatch of IDocs in the dispatch control.

Scheduling the dispatch time:

IDocs can either be sent immediately or in the background. This setting is made in the partner profile.

If the IDoc is sent in the background, a job has to be scheduled. You can choose how often background jobs are scheduled.

Controlling the amount of data sent:

IDocs can be dispatched in packets. The packet size is assigned in ALE Customizing in accordance with the partner profile.
Model and Implement Business Processes
  
® Partner Profiles
        
® Generate Partner Profile

This setting only affects IDocs that are processed in the background.

Inbound Processing

The following processes are carried out on inbound IDocs in the ALE layer:

·        Segment filtering

·        Field conversion

·        Transfer control

·        Serialization

For information on programming see the Implementing Inbound Processing.

The individual steps are explained below.

Segment filtering

You can filter IDoc segments in inbound processing.

In inbound processing this function is principally the same as in outbound processing.

Field conversion

You can define field conversions for specific receivers in the IMG:

Basis
IDoc Interface/Application Link Enabling
   Modeling and Implementing Business Processes
         Converting Data Between Sender and Receiver

Standard rules can be specified for field conversions. One set of rules is created for each IDoc segment and rules are defined for each segment field. These are important for converting data fields to exchange information between R/2 and R/3 Systems. For example, the field plant can be converted from a two character field to a four character field.

Standard Executive Information System (EIS) tools are used to convert fields.

For reduced message types field values are not overwritten in the receiving R/3 System, if the corresponding IDoc field contains the character "/".

Transfer control

Once the IDocs have been written to the database, they can be posted by the application.

IDocs can be passed to the application either immediately on arrival or at a later time in background processing.

Inbound IDocs can be posted in three ways:

·         By calling a function module directly:

The inbound IDocs are posted directly.  An error workflow is started, if an error occurs.

·         By starting an SAP Business Workflow. A workflow is the sequence of steps required to post an IDoc.

Workflows for ALE are not provided.

·         By starting a work item

A single step performs the IDoc posting.

The standard inbound processing setting is for ALE to call a function module directly. For information about the options in SAP Business Workflow see the Inbound Processing Using SAP Workflow.

You can specify the people to be notified for handling IDoc processing errors in SAP Business Workflow. Different people can be responsible for each message type.