-
Request for existing cases, user IDs, Portal navigation support and more
BDoc Channel
BDoc Messages
BDoc (Business Document) messages are used in SAP CRM systems as containers for the data that constitute a business process (application message, transaction). BDoc messages are exchanged internally within the CRM Server between the CRM Application and the CRM Middleware, and between the CRM Server and CRM Mobile Clients (Field Applications). SAP ERP does not know the concept of BDocs, so there is no exchange of BDoc messages between an SAP ERP system and SAP CRM. Instead, the business data is packed into containers during BAPI calls. So during a data exchange to and from SAP ERP, there are in fact outbound and inbound BDoc messages on the CRM Server, but only to communicate with the inbound and outbound ERP (R/3) adapters. Externally the content of the BDoc message is mapped to the mentioned BAPI container structure.
To display BDocs in your system you can use transaction SMW01 or SMW02.
CRM Middleware Flow Control
The flow control for the BDoc messages distinguishes between synchronization flow (s-flow) and messaging flow (m-flow). Both flow types are used for inbound and outbound BDoc message processing. Inbound processing occurs when a remote system (for example ERP Backend system) posts data into the processing system (CRM Server). Outbound processing occurs, when the processing system (CRM Server) publishes or posts data to remote systems (for example ERP Backend) or to “listeners” (for example BW Adapter, Billing Engine). It can also be used if the CRM posts data to the Mobile Bridge or other outbound adapters.
M-flows and s-flows consist of different steps, so called flow contexts. A flow context is defined as a sequence of services, which must be called within this flow context. The inbound flow consists of inbound flow contexts MI… (m-flow) or SI… (s-flow). For outbound flows the contexts are named as MO… (m-flow) or SO... (s-flow).
The internal data flow consists of three main steps:
- Inbound processing - Incoming data of different formats, e.g. BAPI structures from a SAP R/3 Backend, sBDocs, XML/SOAP or IDocs, are converted into mBDoc messages. Note that an inbound sBDoc can be processed in two ways:
- If it is assigned to an mBDoc type, it is mapped to an mBDoc message.
- If not assigned to an mBDoc type, the sBDoc message is directly passed to outbound processing (i.e. the synchronization flow), e.g. customizing settings from one mobile client are distributed to other mobile clients. The CRM Server is not interested in this information and therefore the incoming sBDocs are directly passed to the outbound adapter.
- Validation - The incoming data in form of mBDoc messages is validated by the application, e.g. for the mBDoc BUPA_MAIN a function module CRM_BUPA_MAIN_VAL performs the validation of the data.
- If the validation is successful, the mBDoc message is passed to outbound processing.
- If the incoming data is not valid, the mBDoc is updated with an error message and then sent back to the sender.
- Outbound processing - The receiving systems (e.g. SAP R/3 Backend, external systems or Mobile Clients) are determined by the replication service. Then the mBDoc message is passed to the corresponding outbound adapter which converts the message into the data formats of the receivers. The Replication & Realignment Service determines to which mobile clients the sBDoc is forwarded.
To get an overview which flow contexts are used for a BDoc type, you can display them using transaction SMO8FD.