Skip to Content
Author's profile photo Pablo Marín

Correct stock differences between IM and WM+HUM

Probably the most of you know SAP note 660009 – Stock comparison between WM and IM with handling units. Reports RLABGL00 and RHUSTOCK_DIFFERENCES provide information about stock inconsistences, but they cannot fix those problems. In the mentioned note, SAP intervention is required.

There are two different ways to solve stock differences by yourself. Both are risky, but sometimes you must choose between jeopardize or wait for the SAP intervention in your system. I will suppose that WM+HU stocks are OK and the problem is at IM level.

First option: Remove the IM-WM link and the HU management.

/wp-content/uploads/2014/07/1_509136.png

/wp-content/uploads/2014/07/2_509137.png

It looks easy. Deactivating the assignment we will be able to correct IM stock without affect WM one. At the same time, deactivating the HUM we could fix it too.

Once you stock is adjusted, you will have to reassign the warehouse number and mark again the HU management flag. Due to SAP restrictions, you cannot activate the HUM if the storage location is not empty, so you will have to update it manually (T001L-XHUPF).

The main problem of this solution is that all the warehouse activities will have to stop during while you perform this task, and this is not always possible.

Second option: Break the IM – WM/HU assignment by debugging

To perform this option you need authorization to debug and change variable values during debugging. Just set these break-points and post the IM movement for adjust the stock (for example by MIGO):

  • Break-point 1:
    • Program MM07MFL0_LAGERORTDATEN
    • Line 744 (vm07m-sdkun = xt001l-kunnr.)
    • Action: Clear variable VM07M-XHUPF
  • Break-point 2:
    • Program LMBWLU14
    • Line 619 (IF xdeliv IS INITIAL AND no_choice IS INITIAL …)
    • Action: Clear variable NO_CHOICE and set NO_DELIV to ‘X’
  • Break-point 3:
    • FM LVS_COMMUNICATION_MB
    • Line 83 (if flg_bfwms is initial)
    • Action: Set variables LVS_RELEVANT, LVS_RELEVANT_UM and LVS_RELEVANT_UB to 0

Conclusions

What is the best option? When I have to fix this kind of problems I use to choose the second one. Yes, I know that it seems almost a hacking process, but I am pretty sure that SAP support team would perform something similar when they connect to your system.

Anyway, before of run any of those solutions, I kindly recommend to test them deeply in a parallel environment and always under your responsibility.

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jürgen Lins
      Jürgen Lins

      I actually do not like any recommendation to change values in the debugger. You would be helpless in our system as this option of changing values in the debugger is only available in the development system.

      Author's profile photo Pablo Marín
      Pablo Marín
      Blog Post Author

      Jürgen, I completely agree with you. Change variables in real time is highly risky, but so also is modify values of standard tables and raise his hand who have never done it!

      Of course, my recommendation is follow the note 660009 and contact with the SAP support team. Consider this post just like an alternative in case you need an immediate action.

      Author's profile photo Joao Sousa
      Joao Sousa

      I don't get why SAP doesn't provide a simple way to do this. It's very easy to generate an inconsistency, especially because it only takes is a miss configuration in OMJJ and you get a diference.

      Author's profile photo Pablo Marín
      Pablo Marín
      Blog Post Author

      Joao, as you say this situations occurs more often than we would like. A standard way to solve it would be really appreciated!

      Author's profile photo Joao Sousa
      Joao Sousa

      Especially since you can leave the system inconsistent without using a single development...

      Author's profile photo Stephen Brennan
      Stephen Brennan

      Hi Joao, while I agree that having a simple way to correct inconsistencies within HU/WM/IM stocks without SAP intervention would be helpful, there are far too many variations covered within the three stock management systems to ensure all scenarios are covered. It is for this reason that the development team ensure that each inconsistency is reviewed on a case by case basis to avoid any 'incorrect' corrections.

      Having worked on many of these inconsistency cases, I can confirm that for each of the six cases laid out in note 660009, there are several subsequent checks which need to be reviewed before any correction can take place which leads to many combination of inconsistency scenarios, and I would never suggest the removal of the IM/WM/HU relevance assignment.

      Author's profile photo Joao Sousa
      Joao Sousa

      I would never suggest it either, but people have a hard time depending on SAP support for anything. It's hard enough for end users to give IT the time to solve problems, when you add a second layer (SAP) on top of it they stop caring.

      Author's profile photo Pablo Marín
      Pablo Marín
      Blog Post Author

      Stephen,

      I completely agree with you, and this post doesn't try to suggest something different.

      Of couse that each inconsistency must be thoroughly analyzed. This is just a tool, an emergency procedure... Please, don't understand it as a hacking.