The message flow, in short 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:
· Synchronization Flow
This is an infrastructure especially for processing CDB-based messages for replicating data to mobile terminals (clients).
· Flow for the CRM server application: Messaging flow
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 used as containers for transporting business data are called BDoc messages (business documents). BDoc types describe the hierarchical structure of the business data segments of a BDoc message. 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.
The SAP default flow table SMW3FDSTD contains predefined entries that you cannot change.
You can define the flow in the following flow tables:
· BDoc type-specific flow table SMW3FDBDOC
· Customer and BDoc type-specific table SMW3FDCUST
Entries in these tables are overridden by the settings in the more specific tables. Entries in customer and BDoc type-specific tables control all the identical entries in the SAP default flow table SMW3FDSTD.
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.
Each flow definition contains a default sequence of registered services.
The sequence of services in inbound and outbound processing of a message depends on the message flow (messaging or synchronization):
|
Messaging |
Synchronization |
Inbound |
- The validation service is called - Administrator is informed if an error occurs - Monitoring/new processing attempt |
- Mapping function to mBDoc message is called - The validation service is called - Administrator is informed if an error occurs - If an error occurs, message is rejected to sender |
Outbound |
- Asynchronous message processing - The services of the relevant context to be called are determined - Services are called - Administrator is informed if an error occurs - Message is resent if errors involving the recipient occur |
- Asynchronous message processing - The services of the relevant context to be called are determined - Services are called - Administrator is informed if an error occurs - Message is resent if errors involving the recipient occur |
These are the main components:
· Adapters/services for inbound and outbound processing
Adapters and services process the BDoc messages.
Adapters either forward the messages from the inbound queues to the control component, which saves them in the message repository, or accept the messages from the control component and forward them to the outbound queues.
Services provide a special functionality that can be applied to business documents.
The following services are called up in the message flow:
- Validation service
This service is BDoc type-specific and implements the inbound processing.
- Replication service
This service determines the recipients and implements a realignment (in mobile scenarios).
- Outbound function
This function transfers the message to the various adapters in line with the replication service recipient list.
- Mapping function for mobile applications
This service is BDoc type-specific and is used to map an mBDoc message to one or more sBDoc messages.
For newly created BDoc types, a validation service and mapping function must be implemented for mobile applications (see Creating Interfaces for New BDoc Types).
· Message repository
The message repository is used to store messages.
· Error Recovery
Error handling consists of a decision-making mechanism that reads the error handling definitions and performs the actions specified. (see Error Handling).