MM Tricks 2
MM Tricks 2
MM Tricks 2
The Inventory Management process within SAP means movements inside the plant
that can create a change in stock levels within the storage locations designated to
that plant. The movement of stock can happen in different ways like goods receipt,
goods issue, a stock transfer between plants, or an internal transfer within a plant.
For every goods movement, the SAP system can create two types of documents: a
material document and an accounting document. The SAP system follows the
accounting principle that for every material movement, there is a corresponding
document that provides details of that movement. In addition, an accounting
document is produced that describes the financial aspects of the goods movement.
However, the accounting document is only relevant if the material is valuated.
The material document is produced for each movement type. It contains the date of
the material movement, the material number, the quantity of the material moved, the
location of the movement, the batch number if applicable, and the movement type.
Changes cannot be made to the material document after it has been posted, except
when you are only changing the header and item text. If an error was made on the
material movement, it has to be reversed and the movement correctly entered. This
will produce a material document for the reversal and then a new material document
for the correct movement.
MANDT Client
MBLNR Material document number
GJAHR Fiscal year
Line number (only in
ZEILE
MSEG)
To check material documents you can directly display via transaction MB03 or search
for material documents via transaction MB51.
The same goods movement can be posted on-line using different transactions or by
means of BAPIs or Idocs.
In any internal test system or in customer’s system you can check the documentation
of the movement type going to the transaction SPRO, then "SAP Reference IMG" (or
F5), and open the path:
SPRO
> IMG
To check the movement type configuration you should execute this activity "Copy,
Change Movement Types" or you could directly access transaction OMJJ.
Normally customers can wait for one day to be able to post the goods movement, but
the situation can be more complicated depending on the number of postings which
are stopped and depending also on the date in the month: When customers are
about to do the period closing and they urgently need to post the goods movement
on a required date.
3.1. When no goods movements at all can be posted into the system
Most cases in which goods movements are completely stopped from being posted
relate to issues with the number range or the posting period.
In Inventory Management it is only possible to post into the current and the previous
period. It is not possible to post into other periods. If re-opening a previous closed
period is needed, please, check the note 1085641 , section "Period Closing
Problems".
3.2. When the process fails for only some certain materials in certain
plants
3.2.1. Inconsistencies
The most common reason for urgent cases in this scenario is the existence of
database inconsistencies.
The fact that inconsistencies exist does not justify the criticality. For example, if the
customer detected an inconsistency by looking at the tables or by using the
transaction MB5K, this has to be analyzed, but it is not too urgent to be considered
as production down.
- The inconsistency leads to a delay in the year-end close. Monthly closing processes
must not be delayed because of inconsistencies.
So, in this case, one of the following messages are raised when posting the goods
movement:
These messages are generated if the system finds a data inconsistency when
reading the material master data (this is, the stock quantity or the stock value is
already inconsistent before the goods movement). Further data about this situation
can be found in the SAP KBA note 1618888. This KBA points to relevant notes which
explains possible reasons for the generation of database inconsistencies as well as
how to proceed in this case.
"False" inconsistencies:
If customer reports negative stocks (error ‘M7310’) although they have not been
allowed in the Customizing (OMJ1), indicate the note 935755 .
Also check if there have been any recent Support Package upgrades or if
customer is migrating into a new Release.
The long text of the termination contains information on the actual error cause
(section "error analysis").
Update termination errors can be seen with the transaction SM13. Double click
in the lines with status "Err" for further information about the problem. If a
dump has been generated, it can also be displayed from here.
The Enjoy Transaction MIGO was first made available in Release 4.6A. Since then its
functionality has been constantly growing to cover as many possible goods
movements as possible. Here there is an overview of the tasks the functionality of
MIGO offers for every Release and the old MBxx transaction that it replaces. As
advised before, if a process fails using MIGO, it is always a good idea to check if the
error is the same using the old transaction MBxx.
Release 4.6A:
Goods receipt for known purchase order (transaction code MB01)
Goods receipt for unknown purchase order (transaction code MB0A)
Release 4.6C: The following functionalities are added to the ones listed before:
Goods receipt for order (transaction code MB31)
Other' goods receipts (transaction code MB1C)
Document Tables:
Table Meaning Key fields
MKPF Header: Material Document Document number (MBLNR), year (MJAHR)
Material Document – Document number (MBLNR), year (MJAHR), line
MSEG
segments/ lines number (ZEILE)
Index for material to the FI-
BSIM Material (MATNR), Valuation Area (BWKEY)…
documents
Material ledger index, used to
document changes in MBEW
CKMI1 KALNR, use mbew-kaln1
for each
movement
Valuation Tables:
Table Meaning
MBEW Material Valuation
EBEW Sales Order Stock Valuation (from 4.0 on)
QBEW Project Stock Valuation (from 4.0 on)
OBEW Valuated Stock with Subcontractor (from 4.6 only for Japan)
Stock Tables:
Table Meaning
MARC Plant Data for Material
MARD Storage Location Data for Material
MCHB Batch Stocks
MSSL Total Special Stocks with Vendor O
MSLB Special Stocks with Vendor O
MSKU Special Stocks with Customer V,W
MSSA Total Customer Orders on Hand E
MSKA Sales Order Stock E
MSSQ Project Stock Total Q
MSPR Project Stock Q
MKOL Special Stocks from Vendor K,M
Data from the Material Master: Set a breakpoint in the function module
MATERIAL_READ.
For valuation data, set a breakpoint in the include LMBGBFPP (4.0: LMBGBFWR) at
call function CK21_ITEM_GOODS_RECEIPT.
Data in the MB_CREATE interface (valid for all goods movements posted
automatically like postings from SD - Goods issues for deliveries -, from PP –
backflush; confirmation of production orders, EDI, QM, BAPIs, MIGO, etc.):
Breakpoint in LMBWLU14, function module MB_CREATE_GOODS_MOVEMENT.
See the data in the internal table IMSEG.