Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
Ajeet
Employee
Employee

This blog is focused on to explain the benefit of deactivation of statistical moving average price and how business can leverage the improvement in material movement using late lock functionality with SAP S/4HANA



 

Summary


Deactivation of the statistical moving average is not mandatory in SAP S/4HANA, but is nevertheless recommended in order to achieve a significant increase of transactional data throughput for goods movements. It is important to note that the deactivation is not reversible.

In ECC for materials with price control "Standard" the system also calculates a statistical moving average valuation in parallel which requires exclusive locking which limits the transactional data throughput, and therefore needs to be avoided in SAP S/4HANA. As a result In the S/4HANA cloud edition or new installs of the SAP S/4HANA on-premise edition, the statistical moving average price is disabled by default. Once activated this setting cannot be deactivated anymore.

What you will learn from this Blog?



  1. What are the advantages of deactivation of statistical moving average price?

  2. What is Impact of deactivation of statistical moving average price?

  3. How to deactivate statistical moving average price?

  4. Does late lock work only for materials with standard price?

  5. What are available lock strategies?

  6. What is process to permit negative stocks?

  7. Impact on LIS with late lock strategy

  8. What is alternate to LIS in SAP S/4HANA?


What are the advantages of deactivation of statistical moving average price?


One major innovation of SAP S/4HANA in MM-IM is the significant increase of transactional data throughput for high-volume transactions, especially goods movements. To enable this, it is necessary to avoid exclusive locking.

  • For goods movements this can be achieved for materials with price control "Standard", where the unit costs and inventory valuation are kept constant during goods movements.



  • To calculate a consistent moving average valuation, the system is still forced to use exclusive locks. Therefore, it is not possible to achieve the same increase in transactional data throughput for materials with price control "Moving Average" as for materials with price control “Standard".


What is Impact of deactivation of statistical moving average price?


The statistical moving average price is purely statistical and does not have any impact on inventory valuation. The following database table fields are affected by the deactivation of the statistical moving average

  • In table MBEW, EBEW, OBEW, QBEW the fields SALKV and VERPR are not updated anymore for materials with price control “Standard”. The same applies to the history tables MBEWH, EBEWH, OBEWH and QBEWH.

  • In table CKMLCR the fields PVPRS and SALKV are not updated anymore for materials with price control “Standard”.

  • In table MLCR the fields SALKV, SALKV_OLD and PVPRS_OLD are not updated anymore for materials with price control “Standard”.

  • As a result, the statistical moving average price and the value based on the statistical moving average price is no longer available to users in transaction codes: MM01, MM02, MM03, CKM3 and MR21.

  • Check if you are using statistical moving average price in any of the process i.e. Balance Sheet Valuation, Product Cost Planning, custom code etc. and then revisits and adopt the solution appropriately.

  • Check if you are using LIS because you cannot use late lock strategies and LIS reports together.


Refer OSS note for more detail 2267835

Does late lock work only for materials with standard price ?


With SAP S/4HANA 1610 this option also includes materials with Moving Average price control and all special stock types. The benefit of this option is that exclusive locking is no longer required for material valuation, which enables parallel material document processing

However, exclusive locking is still required if material master data is created or changed by a goods movement. Material master data is created by a goods movement if split valuation is used and a new batch must be created, for instance.

Changes of material master data concerns especially materials with Moving Average price control. When a goods movement changes the ratio between the stock value (SALK3) and the valuated stock quantity (LBKUM), the moving average price must be adjusted accordingly, which ultimately requires an exclusive lock until the V1 update.

Refer OSS note  2338387

How to deactivate statistical moving average price?


The report SAPRCKM_NO_EXCLUSIVELY_LOCKING can be used to deactivate the statistical moving average price. This can be done for converted systems running the S/4HANA on-premise edition.

The activation of this locking behavior no exclusively locking leads to the deactivation of the statistical moving average price and as consequence the statistical moving average price is no longer available on the following transaction codes: MM01, MM02, MM03 and MR21.

In the S/4HANA cloud edition or new installs of the SAP S/4HANA on-premise edition, the statistical moving average price is disabled by default.

Once activated this setting of deactivation of statistical moving average price then this field cannot be made available again anymore.

Goto SE38 and run Programme SAPRCKM_NO_EXCLUSIVELY_LOCKING

This programme deactivates statistical moving average price as well sets the "Late exclusive block"



Field Per.unit Price will be removed from "accounting 1" view of material master as shown below:-



Refer OSS note 2618202


What are available lock strategies ?


Currently two different locking methods are available for goods movements those are Exclusive block or Late block as explained below.

Transaction - OMJI



 

Exclusive Block

When material master data is read for the first time during a goods movement, Exclusive lock specifies that tables MARC (plant data) and MBEW (accounting data) are locked exclusively until the goods movement has been fully posted

Other users cannot maintain the material during this time. This ensures that the goods movement is valuated correctly and that the stock quantities and values are updated correctly. The disadvantage is the long period of time for which the lock is set (from the time the material master data is first read when the goods movement is entered).

The first method locks all affected materials exclusively on their plant level during the entire document processing stage. This method offers the fastest document processing speed, since only a few locks need to be set, and all required material data only needs to be read once for the whole process. The drawback of this method is a high lock collision probability for similar parallel postings. Moreover, this effect worsens with document size since every additional item extends the total exclusive locking duration and scope.

 Late block

Late lock specifies that a material Is locked as late as possible to keep the lock time to a minimum and exclusively only if data is to be saved.

The advantage is that multiple users can enter goods movements at the same time because only one shared lock is set for the material when the movement is entered

The second method involves individual locking of material master and valuation data. Reduced exclusive locking times are used to minimize the collision probability between parallel postings. To achieve this, intended stock changes are communicated early in the process via the central enqueue server. All similar postings need to read these numbers from the enqueue server and take them into account along with the data read from the database. The drawback of this method is increased effort resulting in a longer total runtime for each document.

Waiting time for late block

When the late block is activated, the system tries to lock the data in the material master record before the posting is started. This ensures that postings are consistent. A high value for the waiting time means that a lower number of goods movements is refused. But the waiting time for the user may be longer.

Late DB Update for Goods Movements

You use this to activate the late database update for goods movements in the inventory management update

Switching the lock strategies

The toggling between early lock and late lock strategy can be done via customizing transaction OMJI. Marking the flag "Exclusive block" means early lock strategy whereas marking "Late exclusive block" means late lock strategy. Toggling of these two lock modes is possible. The setting of "no exclusive lock" for the late lock strategy must be done by executing program SAPRCKM_NO_EXCLUSIVELY_LOCKING. This change cannot be undone. For this setting please refer specially to note 2267835.

Refer note 2319579

 

What is process to permit negative stocks ?

It is possible to allow on plant level negative stocks. Also, on storage location level negative stocks can be permitted. And for the material itself a negative stock can be enabled. All this was possible to configure already in Suite on HANA now also in S/4HANA. If on all 3 level the permission on negative stock has been granted, then in S/4HANA OP1610 and CE1608: -

  • No locks at all will be set in the late lock strategy case.

  • No stock determination from the data base will be done and no stock underrun check will be executed (in both lock strategies).


Hence for such a configuration and setting of material master data the runtime and the throughput may increase further.

Negative stocks level settings

The permission must be granted on plant level. Go to SAP IMG --> Materials Management --> Inventory Management and Physical Inventory --> Plant Parameters. Here you can grant negative stocks on special stock types.



The permission must be granted on storage location level. Go to SAP IMG (or use customizing transaction OMJ1) --> Materials Management --> Inventory Management and Physical Inventory --> Goods Issue / Transfer Postings --> Allow negative stocks. Here you can grant negative stocks for storage locations in a plant assigned to a valuation area.



 

The permission must be granted for the material itself. Execute material maintenance (e.g. transaction MM02) and enter the tab "Plant data / stor. 2". Mark flag "Neg. stocks in plant"



 

Impact on LIS with late lock strategy


You cannot use late lock strategies and LIS report together (Consequently, MC.* reports would not be getting updated with stock movements), LIS and late lock mode is defined now as an inconsistent system state starting with S/4HANA OP1610 and CE1608 ,

Refer OSS note 2659269

LIS settings can be done by executing the customizing transaction OMO9 and LBW1. LIS update processing is only possible for early lock strategy. For late lock strategies LIS must be deactivated by setting "No updating" for all LIS info structures in transaction OMO9 or LBW1 as sown in screen print below: -

Transaction OM09



 

Transaction LBW1



 

Can we switch late lock strategy to exclusive lock or vice versa?

Toggling ON/OFF LIS is not that easy as for the lock strategies. Toggling LIS from OFF to ON requires the re-generation of the content of the LIS info structures as per note Please refer to the steps which are described in notes 79083 and 64636.

Also you may refer OSS note https://launchpad.support.sap.com/#/notes/2319579

What is alternate to LIS in SAP S/4HANA


As an alternative to LIS, you may choose new analytical capabilities available in SAP S/4HANA.
https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/#/home

 

Thank you very much Rainer Christian and  Sudharsan Renganathan for your review and feedback.

 

Thanks

Ajeet Agarwal


SAP S/4HANA Regional Implementation Group- APJ

SDC- Bangalore
9 Comments