-
Technical Assistance
Request product support from SAP
-
Non-Technical Assistance
Request non-product support or provide feedback on SAP Support Portal site
Technical Assistance
Request product support from SAP
Non-Technical Assistance
Request non-product support or provide feedback on SAP Support Portal site
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.
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:
To get an overview which flow contexts are used for a BDoc type, you can display them using transaction SMO8FD.
The following technical prerequisites have to be met in order to use the BDoc (Real-time Monitoring) as of ST-A/PI 01M:
Monitoring Template: BDoc (Real-time Monitoring)
This template provides automatic monitoring of the BDoc processing in an SAP CRM system for error states and intermediate states. This way you can be notified if the number of BDoc messages in one of these two status categories is higher than expected, the age of the oldest message is too old as well as the combinations.
Metric Name | Description | MAI Category | Since SP |
---|---|---|---|
Number of BDoc messages in error state |
Counts the number of BDoc messages with errors based on the configured selection criteria |
Exceptions |
7.1 SP12 |
Age of oldest BDoc message in error state |
Monitors the age (in minutes) of the oldest BDoc message in error state based on the configured selection criteria. |
Exceptions |
7.1 SP12 |
Number of BDoc messages in error state (combination with Age)1) |
Counts the number of BDoc messages with errors based on the configured selection criteria. Shares a common event with metric “Age of oldest BDoc message in error state (combination with Number)” |
Exceptions |
7.1 SP12 |
Age of oldest BDoc message in error state (combination with Number)1) |
Monitors the age (in minutes) of the oldest BDoc message in error state based on the configured selection criteria. Shares a common event with metric “Number of BDoc messages in error state (combination with Age)” |
Exceptions |
7.1 SP12 |
Number of BDoc messages in intermediate state |
Counts the number of BDoc messages in an intermediate state based on the configured selection criteria. |
Performance |
7.1 SP12 |
Age of oldest BDoc message in intermediate state |
Monitors the age (in minutes) of the oldest BDoc message in an intermediate state based on the configured selection criteria. |
Performance |
7.1 SP12 |
Number of BDoc messages in intermediate state (combination with Age)1) |
Counts the number of BDoc messages in an intermediate state based on the configured selection criteria. Shares a common event with metric “Age of oldest BDoc message in intermediate state (combination with Number)” |
Performance |
7.1 SP12 |
Age of oldest BDoc message in intermediate state (combination with Number)1) |
Monitors the age (in minutes) of the oldest BDoc message in an intermediate state based on the configured selection criteria. Shares a common event with metric “Number of BDoc messages in intermediate state (combination with Age)” |
Performance |
7.1 SP12 |
Key figures with combined rating strategy (number & age)
In classic BPMon you had the possibility to use key figures that had a combined rating for number of messages and age of entries for critical and intermediate state.
To model this behavior in ICMon these key figures are presented by two metrics that are correlated on alert level.
From a functional point of view these metrics behave in the same way as the single metrics Number of BDoc messages in error state and Age of oldest BDoc message in error state. However, they share a common event, which means an alert is only raised if both metrics exceed their threshold values. If you do not configure one of the metrics the system behaves as if only the single metric has been configured. E.g. not configuring the Age of oldest BDoc message in error state (combination with Number) metric means that alerts are created based on the output of Number of BDoc messages in error state (combination with Age) metric solely.
Use these metrics if you are not just interested in the amount of erroneous messages or the age of the oldest erroneous message, but in the combination of those values. Consequently, you can use these metrics to get alerted about the age of the oldest erroneous message only if a certain number of erroneous messages exist, or get alerted about the number of erroneous messages only if the oldest of these messages has reached a certain age.
Key Figure | Alert | Metrics |
---|---|---|
Combi of Messages & Age in error state | Critical Combination of Messages & Age for BDocs in error state |
|
Combi of Messages & Age in interm. state | Critical Combination of Messages & Age for BDocs in intermediate state |
|
Note: Per MAI category, the metrics monitor a set of different status codes of the BDoc message. All available status codes are either grouped into one of these severity groups, or are ignored for monitoring if they indicate a final state already. The actual list of status codes within one of these groups does also depend on the release of the CRM system. Earlier releases have fewer different states. The data collector automatically assigns the available status codes to the two severity groups.
Monitoring Template: BDoc (Analysis)
This template provides metrics to analyze the BDoc message processing on the managed system. This includes not only critical message states, but also the throughput of BDoc messages within a certain timeframe. The data can be used for monitoring and alerting, too. However, it is mainly intended to feed the Business Process Operations reporting tools. The monitoring template “BDoc (Analysis)” can be used to feed the Business Process Operations reporting tools. This includes the Business Process Analytics tool and the Business Process Operations Dashboards.
Metric Name | Description | MAI Category | Since SP |
---|---|---|---|
Number of BDoc messages in critical status(es) |
This metric counts the number of BDoc messages based on the configured selection criteria. It is intended to be used for measuring BDoc messages in a critical status. |
Exceptions |
7.1 SP12 |
Number of BDoc messages in uncritical status(es) |
This metric counts the number of BDoc messages based on the configured selection criteria. It is intended to be used for measuring BDoc messages in an uncritical status. |
Performance |
7.1 SP12 |
Monitoring Template: CRM Middleware
This template provides metrics for checking for errors in the underlying CRM Middleware infrastructure, with a special focus on the data exchange between SAP CRM system and mobile clients. Five commonly used transactions related to the area of mobile clients are in scope of the monitor:
Metric Name | Description | MAI Category | Since SP |
---|---|---|---|
Number of Mobile sites with overdue synchronization |
This metric checks if there are any mobile sites for which synchronization has been overdue for a specified time. The same output can be obtained when running report RSMWM_QUEUE_INFO or transaction SMWMQUEUES ("Queue information for mobile client sites") on the managed system. |
Exceptions |
7.1 SP12 |
Number of R&R queues in status HOLD |
This metric checks if there are any queues in status "HOLD". The same output can be obtained when running transaction SMOHQUEUE ("Monitor R&R Queues") on the managed system. |
Exceptions |
7.1 SP12 |
Number of entries in R&R queues |
This metric counts the number of entries in the selected queues. The same output can be obtained when running transaction SMOHQUEUE ("Monitor R&R Queues") on the managed system. As a result you get an alert for every queue that contains entries telling you how many entries are in the selected queues. |
Performance |
7.1 SP12 |
Number of MW Cockpit nodes in critical state |
This metric counts the number of nodes in the MW Cockpit which are in a warning or error status. The same output can be obtained when executing transaction SMWP ("CRM Middleware Monitoring Cock pit") on the managed system. As a result you get red alerts for the nodes that are in an error status and yellow alerts for nodes that are in a warning status. The measured value displays the number of nodes that are in error/warning status. |
Exceptions |
7.1 SP12 |
Number of BDoc messages processed |
This metric calculates the number of BDoc messages which have been processed yesterday. The same output can be obtained when running transaction SMWMFLOW ("Message Flow Statistics") on the managed system. |
Performance |
7.1 SP12 |
Average processing time for BDoc messages |
This metric calculates the average processing time of all BDoc messages which have been processed yesterday. The average processing time is not directly visible in transaction SMWMFLOW. It is calculated by the sum of all processing times divided by the sum of BDocs processed. |
Performance |
7.1 SP12 |
Number of mobile sites with import failures |
This metric checks the number of mobile sites with import failures. The same output can be obtained when running transaction CMWQ ("Mobile Client Import Failures”) on the managed system. |
Exceptions |
7.1 SP12 |
The Interface and Connection Monitoring setup can be accessed via SAP Solution Manager Configuration (SOLMAN_SETUP).
To access the Integration Monitoring setup please go to SAP Solution Manager Configuration (SOLMAN_SETUP) → Application Operations → Integration Monitoring → Interface and Connections.
Note: If you didn't perform the infrastructure configuration yet, please follow the Interface and Connection Monitoring Setup with SAP Solution Manager 7.2.
Monitoring Template: BDoc (Real-time Monitoring)
As a preparatory step you can call the standard BDoc monitors in the managed system (transactions SMW01 and SMW02) to get an overview about of the amount of critical BDoc messages. In addition the Message Flow Statistics (transaction SMWMFLOW) provide an overview which BDoc types are processed by the system in general. The parameter fields also have an input help which helps you to select the correct values.
Navigate to the Define Scope step. You can create a new scenario or use an existing one. Make sure the sender and the receiver system are part of the Interface and Connection Monitoring scenario.
Create the Interface Channel:
Maintain the Interface:
If you want to use the metrics including a combination with the age of the BDocs you have to set values for the Minimum Age (errors) and Minimum Age (intermediate). If the parameter is empty, all found messages are counted immediately.
Select Metrics:
On the Metrics tab, select the metrics you want to monitor.
Usually it is not necessary to include all the available metrics. For a status monitoring, you might not be interested in the absolute number of messages in an erroneous state, as you have to react anyway, no matter whether it is just one failed message or several of them. So instead of Number of BDoc messages you can just monitor Age of oldest erroneous/intermediate BDoc message with a small threshold value. A monitoring of the intermediate states does not include the erroneous states as well, so you are advised to configure at least one metric from both status severity groups.
You can maintain attributes as described in the Interface and Connection Monitoring Setup on the Attributes tab.
Thresholds and the collection schedule are maintained in the next step of the guided procedure. Once you have maintained all your channels, click Next in the main guided procedure to move to the Activation step.
Maintain Thresholds and Schedule:
Note: Performance Warning
The BDoc tables in the CRM system (starting with prefix SMW3_BDOC*) can grow rather very large. Their size depends on the amount of processed BDocs messages within the residence time before reorganization takes place, and the amount of all messages in a non-final state which prevents reorganization.
In case of a huge amount of BDoc messages in the system, use this monitoring template with care, as it causes an additional workload on the monitored CRM server. Please avoid running the data collection with a high monitoring frequency and avoid complex configurations of the selection criteria, especially those with patterns, ranges and exclusions.
If you are in doubt, try to simulate the filter criteria with transaction SMW01 or SMW02, to get an idea about the possible runtime of the data collection.
Note: Queue Monitoring
For the exchange of BDoc messages (e.g. internally within the CRM system, between CRM and ERP, and between CRM and Mobile Clients), the CRM Middleware uses the qRFC technique for queuing and sending the BDocs. In many cases there is a relation between a BDoc message status and a corresponding qRFC queue entry. Therefore, it is highly recommended to set up a qRFC monitoring as well.
Monitoring Template: BDoc (Analysis)
Navigate to the Define Scope step. You can create a new scenario or use an existing one. Make sure the sender and the receiver system are part of the Interface and Connection Monitoring scenario.
Create the Interface Channel:
Maintain the Interface:
Select Metrics:
On the Metrics tab, select the metrics you want to monitor.
Enter Metric Parameters:
Note: Metric Categories
Note that technically both metrics produce the same result if configured identically. However, the Number of BDoc messages in critical status(es) metric is supposed to be used for measuring BDocs in an error state only, whereas the Number of BDoc messages in uncritical status(es) metric can be used for throughput measurements too (number of successful BDoc messages). Consequently in the Interface Channel Monitoring application the metrics are categorized as Exceptions and Performance, respectively.
You can maintain attributes as described in the Interface and Connection Monitoring Setup on the Attributes tab.
Thresholds and the collection schedule are maintained in the next step of the guided procedure. Once you have maintained all your channels, click Next in the main guided procedure to move to the Activation step.
Maintain Thresholds and Schedule:
Monitoring Template: CRM Middleware
Navigate to the Define Scope step. You can create a new scenario or use an existing one. Make sure the sender and the receiver system are part of the Interface and Connection Monitoring scenario.
Create the Interface Channel:
Maintain the Interface:
Select Metrics:
On the Metrics tab, select the metrics you want to monitor.
Enter Metric Parameters:
Metric: Number of Mobile Sites with overdue synchronization
Metric: Number of mobile sites with import failures
Metric: Average processing time for BDoc messages
Metric: Number of BDoc messages processed
Metric: Number of entries in R&R queues
You can maintain attributes as described in the Interface and Connection Monitoring Setup on the Attributes tab.
Thresholds and the collection schedule are maintained in the next step of the guided procedure. Once you have maintained all your channels, click Next in the main guided procedure to move to the Activation step.
Maintain Thresholds and Schedule:
BDoc Status | Description | Severity | Reprocessing |
---|---|---|---|
D01 |
To be processed (Debug) |
Intermediate |
X |
E01 |
Technical error (incomplete) |
Error |
X |
E02 |
Partially send, receivers have errors |
Error |
X |
E03 |
BDoc cannot be read from DB |
Error |
|
E04 |
BDoc validation error |
Error |
X |
E05 |
Inbound processing failed |
Error |
X |
E06 |
Outbound processing failed |
Error |
X |
E07 |
Conversion error |
Error |
X |
E08 |
Mapping error |
Error |
|
E09 |
Update failure |
Error |
X |
F01 |
Rejected (fully processed) |
Final |
|
F02 |
Confirmed (fully processed) |
Final |
|
F03 |
Set to processed (fully processed) |
Final |
|
F04 |
Confirmed (fully processed by all receivers) |
Final |
|
F05 |
Information (no processing) |
Final |
|
I01 |
Received (intermediate state) |
Intermediate |
X |
I02 |
Written to qRFC Queue (intermediate state) |
Intermediate |
X |
I03 |
After qRFC step (intermediate state) |
Intermediate |
X |
I04 |
BDoc stored before update task (intermediate state) |
Intermediate |
|
O01 |
Sent to receivers (not all have confirmed) |
Intermediate |
X |
R01 |
Retry after temporary error |
Error |
X |
T01 |
Temporary lack of resources in application layer |
Error |
X |
Available Flow Contexts
Flow Context | Description | Flow | Direction |
---|---|---|---|
SI0 |
sBDoc Validate |
Synchronization |
Inbound |
SI1 |
sBDoc Inbound (Before Validation) |
Synchronization |
Inbound |
SO1 |
sBDoc Notification |
Synchronization |
Outbound |
SOA |
sBDoc Notification (additional calls) |
Synchronization |
Outbound |
SO2 |
sBDoc Rejection |
Synchronization |
Outbound |
SOB |
sBDoc Rejection (additional calls) |
Synchronization |
Outbound |
SO3 |
sBDoc Initial Load |
Synchronization |
Outbound |
SOC |
sBDoc Initial Load (additional calls) |
Synchronization |
Outbound |
SO4 |
sBDoc Direct Send |
Synchronization |
Outbound |
MI0 |
mBDoc Validate |
Messaging |
Inbound |
MO1 |
mBDoc Notification |
Messaging |
Outbound |
MOA |
mBDoc Notification (additional calls) |
Messaging |
Outbound |
MO2 |
mBDoc Notification Multiple |
Messaging |
Outbound |
MOB |
mBDoc Notification Multiple (additional calls) |
Messaging |
Outbound |
MO3 |
mBDoc Initial Load |
Messaging |
Outbound |
MOC |
mBDoc Initial Load (additional calls) |
Messaging |
Outbound |
MO4 |
mBDoc Direct Send |
Messaging |
Outbound |
MO5 |
mBDoc Post Request |
Messaging |
Outbound |
MO6 |
mBDoc Post Rejection |
Messaging |
Outbound |
MOF |
mBDoc Post Rejection (additional calls) |
Messaging |
Outbound |