Message Flow Control and Error Handling
This document describes how to create your own BDoc types and services, how to create mapping functions for different object type classes, and how to configure the message flow and error handling.
Purpose
The message flow is controlled by the flow control within the CRM Server. The flow control is the central component of the CRM Server.
The flow control distinguishes between two types of message flow and between inbound and outbound processing:
This is an infrastructure especially for CDB-based message processing for replicating data to mobile terminals (clients).
This is an infrastructure for transferring data to the CRM application and processing data from the CRM application, in the form of change and status messages, such as process messages. This includes a range of services for error notification, repeated attempts to process in error situations, and monitoring.
The different data structures of the two message flows are linked to each other via mapping functions.

Messages are also called BDocs (business documents), which serve as containers for transporting business data. BDoc types describe the hierarchical structure of the business data segments of a BDoc. Typical BDoc types are customer and sales order.
SAP provides a number of BDoc types and services. The sequence of services for a BDoc type is defined in the flow context which is controlled via flow tables. The services to be performed on a BDoc type depend on the available flow context of the given flow definition.
You can define flows in the following flow tables:
Entries in these tables are dominated by the settings in the more specific tables. Entries in customer and BDoc type-specific tables control all the identical entries in the other two tables.
You can create further BDoc types and services, as required.
Based on the flow definition, the Flow Controller passes BDocs to services, which process the contained business information. Inbound and outbound messages are passed on by adapters.
Error conditions that may occur in a flow are handled by a special service, the Error Handler.
Features
Each flow definition contains a standard sequence of registered services. Services can either be synchronous or asynchronous.
At runtime, the flow control performs the following steps:
The Error Handler is called if there is no next service to call. The Error Handler starts an error action specified in the error handling definitions. This action is generally asynchronous and may require user interaction.
Components
These are the main components:
Adapters and services process the BDocs, which are messages in BDoc format.
Adapters forward the messages from the inbound queues to a message store or from the message store to the outbound queues. The following adapters are available: INB (inbound adapter); R3A (R/3 adapter), CRM (CRM application adapter) and OUT (outbound adapter).
Services provide a special function which can be applied to business documents. The following standard services are available:
The message access agent is responsible for storing and retrieving the messages in the message store.
The message processor determines the flow to be executed. It controls which service or adapter must process a message next.
The Error Handler consists of a decision-making mechanism which reads the error handling definitions and performs the actions specified. (see