Skip to Content
Technical Articles
Author's profile photo Kazuhisa Iwamoto

MARDH in SAP S/4HANA On Premise is different from MARDH in SAP ERP

Introduction:

This blog will show you how different MARDH between SAP S/4HANA and SAP ERP for MM Consultants.

This is valid for S/4HANA any on premise version.

MARDH in SAP ERP:

If the quantity is same in contiguous periods, only the oldest data is created in MARDH in SAP ERP.

MARDH in SAP S/4H

Although the quantity is same in contiguous periods, the MARDH data is created for each periods in SAP S/4HANA. MARDH in SAP S/4HANA is called the compatibility view. MARDH was unavailable in SAP S/4HANA. For compatibility reason MARDH is generated from table “MATDOC_EXTRACT” via compatibility view function.

How to see the compatibility view:

Execute Transaction code: se11

Choose Menu>Extras>Replacement Object

You can see the compatibility view. Compatibility view is constructed CDS view.

How to see the CDS View contained:

Execute ABAP development tool(ADT).

The compatibility view (Replacement Object) “NSDM_E_MARDH” is generated from CDS View “nsdm_e_mardh_per” and CDS View “nsdm_e_mardh_agg”.

CDS View “nsdm_e_mardh_per” is generated from the table “MATDOC_EXTRACT”.

CDS View “nsdm_e_mardh_agg” is generated also from the table “MATDOC_EXTRACT”.

Conclusion:

You can understand how different MARDH between SAP S/4HANA and SAP ERP.

SAP note:

2600024 – Create a Material, updates History Tables, MCHBH, MARCH and MARDH, with past Years (LFGJA) and Periods (LFMON) entries

2206980 – Material Inventory Managment: change of data model in S/4HANA

 

 

Brought to you by the SAP S/4HANA Customer Care and RIG

Assigned Tags

      5 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo J Heinrich
      J Heinrich

      comparing records in MARDH before and after S4 migration still leaves me confused, as I see now 25 times more records in MARDH

       I understand that in S4 there is a record for each period, while before there was only a record for a period with action. But this means basically  the older the material in a system is the more records are created in the history tables, for a system which started with R2 like ours is this a worse situation.

      What impact have such many records to the performance?  I feel the performance has gone south drastically .
      Just a random test in SE16N to retrieve 5000 records from MARDH without any selection criteria needed 516ms in ERP, while S/4 had a response time of 19 minutes and 18 seconds

      Of course is SE16N not a normal transaction, but it is a select like it is probably used in hundreds of programs.

      Similar increase of records is also seen in other history tables like MARCH, MKOLH, MSKUH, MCHBH, only MBEWH was spared

      I also do not understand why I find now records in MARDH from 12/1998 for a material which was initially created in 2005 and the oldest MATDOC_EXTRACT record for this material is from 001/2017

      Author's profile photo Kazuhisa Iwamoto
      Kazuhisa Iwamoto
      Blog Post Author

      Hello J Heinrich,

      I think that you can add LABST ne 0 in where phrase of select MARDH.

      Author's profile photo Michele De Nardi
      Michele De Nardi

      So, considering that on S4 the MARDH is calculated on MATDOC_EXTRACT, it always has the correct fiscal month end stock (like MCBC) also if some movements of previous month are made in the next month, right? How it works if on january we post a movement on december? Has the MARDH the correct recalculated stock? Thanks

      Author's profile photo Kazuhisa Iwamoto
      Kazuhisa Iwamoto
      Blog Post Author

      Hello Michele,

      Yes. You can use the standard CDS View also.

      Author's profile photo P. Lankhuijzen
      P. Lankhuijzen

      Hello Kazuhisa Iwamoto,

      Would you know if there is a reorganization program available for table NSDM_E_MARDH_PER?

      Is seems that it got initalized incorrect due to non-compliant  fiscal year variant configuration.

      Best regards, Peter