Skip to Content
Personal Insights

BDoc Analysis

Hello Friends, In my previous blog post we discussed on basics of Middleware. Now lets have a look on BDocs.

BDoc Analysis

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.

Tr SMW01 can be used to check the status of all BDoc’s.  The search can be filtered according to status, BDoc GUID, BDoc type and queue name.

SMW02 is just a summary – which groups the bdocs by type and status

BDoc’s in Error Status:

Errors can be seen by clicking on the red “Show BDoc msg/errors/receivers” button.  Validation errors are always raised by the application; in most cases technical errors are also the responsibility of the application

In order to find the responsible component, click on the long text and look for the component responsible for the validation module mentioned (ie “service that caused the error”) and/or the error code given.

Sales BDoc’s Look Successful in SMW01 But Data are Missing

It is possible in some cases that a BDoc with a green light may have still have an error or errors. This can occur if a partial confirmation has been sent.  In such cases, you can see any errors by clicking on the “Show BDoc msg errors/receivers” button, or else by checking the application log, transaction SLG1.

 

Header Data Empty

If a BDOc is created with no classic (header) data, then the problem should be investigated from the application side. Once the Middleware has created a BDoc, the application is responsible for filling the header data

BDoc Status Codes

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

Types of BDocs:

We have 2 types of Business Documents mBDoc and sBDoc.

mBDoc (Message BDocs) used for messaging b/w the systems of SAP ECC or other system and SAP CRM system.

sBDoc (Synchronisation BDocs) used for processing and handling the data in mobile clients.

 

SAP CRM M BDOCS inbound and outbound process

  • When the data is exchanging, the data enter to CRM and the data is validated by a validations.
  • The Message Business documents layer uses this Doc types and exchange the data with the CRM system, ECC, and other systems.
  • Admin Console controls the received data and sen to the outbound the adapters.
  • mDoc acts as envelop, where the CRM middleware cannot access the data inside the envelop and they can access the data on the envelop. Every application uses different address for e.g. sales order can be triggered according to the sales organization only.

How to create BDoc in SAP CRM

SAP provides standard BDoc types and Services, we can create custom types and Service as per business requirements. We can create custom BDoc’s in SAP by using one of the following navigation method.

SAP Menu >> Architecture and Technology >> Middle ware >> Development >> Meta Object Modeling >> BDoc Modeler

Transaction code: SBDM

CRM BDocs Modeler

BDoc can be monitored by using the transaction codes “SMW01”. Here we can analyze Bdoc details like BDoc State, flow data, flow context, object link, etc. BDoc can be modified, delete o reprocess if required.

Tx SMW02A “BDoc Message Error Analysis: Sum of Errors”

This transaction is useful to get a detailed error message for “BDOC type”. That allows summarising all errors founded in the system.

BDOC error analaysis.png

The result list not only show the “Bdoc Type” but also the component affected that is useful information when researching SAP Notes that could give any indication of the reason for the error.

BDOC Summary of errors.png

When pressing button “Detail Analysis” system navigate automatically to transaction “SMW01 Display BDOC Messages” and displays the BDocs Message affected.

press detail analysis button.png

/wp-content/uploads/2014/01/smw01_376759.png

Tx SMO8REORG “Delete processed BDocs”

This transaction allows deleting BDocs logs from the system. It could be run in a test mode and filtered by BDoc Type, BDoc Message ID, User or change date/time. Cleaning the log will allow users to focus on unresolved system issues.

Delete BDOCS.png

In summary, middleware problems are usually based on configuration. Always have a look not only to the middleware configuration but also to the component configuration.  Using monitor tools, issues in more detail could be checked and knowing the “Application Component”, a better filter could be used when lookingfor SAP Notes.

 This completes our discussion on BDocs. 

 Happy Reading 🙂 

References:

https://support.sap.com/en/alm/focused-solutions/focused-run-expert-portal/integration-cloud-monitoring/bdoc.html#section

Be the first to leave a comment
You must be Logged on to comment or reply to a post.