Inconsistent MB5B Report Results for Same Data and Selection Criteria in SAP ERP SAP S4HANA Even in Closed Periods

Inconsistent MB5B Report Results for Same Data and Selection Criteria in SAP ERP & SAP S/4HANA (Even in Closed Periods)

User Query:

Why do several run of the MB5B report with the same selection criteria show different results, even when I execute the report for a period that has already been closed?

Screenshot: Taken on 04.09.2025 for the period 01.07.2025 to 30.07.2025

 

 

Screenshot: Taken on 05.09.2025 for the period 01.07.2025 to 30.07.2025

Root cause:

The calculation in MB5B is done by reading the current stock level and the goods movements for the material and working backwards to calculate the stock on the required date. So postings during the runtime can falsify the results. The results of MB5B on the stock value and stock quantity of past periods can be different if there are ongoing goods movements in the system.

The only source of information for MB5B is the current figures in the tables and the postings that have been performed. This way, goods movements posted during the execution of the report can lead to different figures even in closed periods.

MB5B is just a report: it does not perform any locking and it is indeed possible to post goods movements while the report is being executed. These goods movements can be in different "status": For example, the following scenario might happen if a goods movement is posted while MB5B is running:

  1. MB5Breads the table MBEW to get the current stock and value information.
  2. The current posting has not updated MBEW
  3. When MB5Breads MBEW the information of the current posting is not yet updated into this table.
  4. However, the document was already in the table BSIMwhen the data in this table was being analyzed.
  5. Therefore, these accounting documents would have reduced the opening and closing values for the timeframe being analyzed.
  6. Posting during the runtime of the report will always cause this type of problem, even in closed periods. This is due to the fact that there is no static information about the stock or value levels in the past in the system.

 

Solution:

1.Run transaction MB5B in a timeframe when there are no postings for the analysed materials. Then several consecutive runs of the report will deliver the same result.

End of Document

 

 

Regards

Vignesh B

SAP Logistics Consultant

+91 9840609084

 

Keep in touch!

We will get back to you as quickly as possible

Keep in touch!

We will get back to you as quickly as possible