Anda di halaman 1dari 13

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

Posted by Fabio Almeida Sep 9, 2013 The intention of this first posting is to offer a kind of overview about common issues faced by MM-IM consultants. The purpose of this page os to help consultants who are initially beginning in the Inventory Management component. The following sections will explain the most common MM-IM scenarios and issues, expose possible tips, solutions, how and what to check on each case, links to SAP Notes and SAP KBAs, and important documentation.

1. Process Overview
The process supported by SAP Inventory Management functionality allows a company to meet customer needs for the availability of material.

Inventory Management within SAP gives to the customer an effective set of processes for all types of goods movement within the plant. Streamlining plant processes can help companies to compress order-to-delivery time, decrease costs, reduce inventory, and improve customer service.

The Inventory Management component deals with the following tasks: Management of material stocks on a quantity and value basis, Planning, entry, and documentation of all Goods Movements, Carrying out the Physical Inventory.

The stock is updated whenever a transaction is posted which implies a change in the stock. This way it is possible to obtain an overview of the current stock situation of any given material at any time.

The stocks are managed not only on a quantity basis but also by value. The system automatically updates the following data each time there is a goods movement: Quantity and value for Inventory Management, Account assignment for cost accounting, G/L accounts for financial accounting via automatic account determination.

Generated by Jive on 2014-04-01+02:00 1

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

Goods movements include both "external" movements (goods receipts from external procurement, goods issues for sales orders) and "internal" movements (goods receipts from production, withdrawals of material for internal purposes, stock transfers and transfer postings). For each goods movement a material document is created which is used by the system to update quantities and values and serves as proof of goods movements. Finally, it is possible to carry out a physical inventory of the companys warehouse stocks in order to adjust any possible unbalance between the quantities stored in the system and the quantities really present in the warehouse (unbalances can arise as a consequence of damaged goods, stolen goods, etc).

The Inventory Management Process happens at the Plant level and its relationship with the Storage Locations within the Plant. All relationships between the Storage Location and its Storage Types, Warehouse Number, Storage Area and Storage Position are approached by the Warehouse Management Process (LE-WM* component).

The Inventory Management Process depends on the material master data creation. However, all issues related to material master data belongs to General Logistics area (LO-MD-MM component).

2. Goods Movements Scenarios: The Movement Types

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.

Generated by Jive on 2014-04-01+02:00 2

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

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.

The database tables to keep the material documents are:

MKPF MSEG

Material document header-data Material document item-data

And the Key-fields are: MANDT MBLNR GJAHR ZEILE Client Material document number Fiscal year Line number (only in 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. What really identifies a goods movement is the movement type: It is a three-digit code which differentiates between the various kinds of goods movements which can be entered in the system. Movement type is a key to generate a material document which identifies a goods movement.

Characteristics of Movement Types: Three-digit identification key for a goods movement

Generated by Jive on 2014-04-01+02:00 3

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

Quantity control (stock tables) Value control (FI document, account determination) Screen layout (dialog only) GR/GI slip print Checks (min. shelf life, dynamic availability, etc. Link to WM, QM, serial numbers

Classification of Movement Types:

1xx 2xx 3xx 4xx 5xx 6xx 7xx 8xx 9xx, Xxx, Yxx, Zxx

GR from purchasing/production + returns GI for consumption Transfers Transfers for Special Stock GR without reference to PO or PP order LE-SHP movement types Physical inventory (MM-IM: 70x / WM: 71x) Brazilian Movements and Industry solution Customer range

The different movement types are documented in the IMG. In any internal test system or in customers 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 >> Materials Management >>> Inventory Management and Physical Inventory >>>> Movement Types >>>>> Copy, Change Movement Types

Generated by Jive on 2014-04-01+02:00 4

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

Once you are in this last activity "Copy, Change Movement Types" do not execute the transaction, but click in the "IMG activity documentation icon" instead. You will be able to see the some general information concerning the movement types and then specific information for every single movement type.

To check the movement type configuration you should execute this activity "Copy, Change Movement Types" or you could directly access transaction OMJJ.

3. Critical issue in the MM-IM component


Unfortunately, there is not a "standard" critical issue in the Inventory Management Area. Most cases of this kind arise when customer is not able to save goods movements into the system because of the existence of error messages. 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 errors addressing to duplicated entries (dump "SAPSQL_ARRAY_INSERT_DUPREC") for material documents always check the current number in use in the number range interval (customizing transaction OMBT). Then check in SE16 the last number really used. This number found in SE16 cannot be higher than the current number in the number range interval. If this is the case, the current number in the customizing should be increased accordingly. Check also in SE11 the index used for the relevant table. See if any index has been set as unique. In this case, see if, according to this unique index, duplicated entries are being created (for example, a unique index is set considering only the fiscal year but not the document number: as soon as two documents are created within the same year, the system will consider that they are duplicated entries). 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".

Generated by Jive on 2014-04-01+02:00 5

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

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. These cases are processed by the component MM-IM-GF-INC. 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. A critical stock inconsistency issue is justified only if: - The inconsistency prevents further postings (error message) in urgent processes. - 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, customer gets one of the following messages when posting the goods movement:

M7 308 'Stock value and qty are unrealistic: & / & M7 309 'Stock value is negative: & M7 310 'Valuated stock is negative: & M7 314 Valuated stock becomes negative: & 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 relevat notes which explains possible reasons for the generation of database inconsistencies as well as how to proceed in this case.

Generated by Jive on 2014-04-01+02:00 6

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

Error M7308: If customer is reporting error M7308 and you run the report MBQUANT(S) and see the description "Please post MR21 with standard price &1 price unit &2" it is not necessary to forward to IMS. You should ask to customer to post a price change in transaction MR21 and then post a price change once again. See KBA note 1708261 for further details.

"False" inconsistencies: If customer reports negative stocks (error M7310) although they have not been allowed in the Customizing (OMJ1), indicate the note 935755 .

3.2.2. How to proceed for other error messages? Check with customer if there have been any recent changes in the customizing or if new user exits or BAdIs have been implemented (transaction SE95).

Also check if there have been any recent Support Package upgrades or if customer is migrating into a new Release.

Check if dumps, update termination errors or express documents are generated. Dumps can be displayed in the transaction ST22.The dump specifies the coding section (include) and the error message. Use this information to determine the proper CSN component. Often dumps in MIGO are caused by "A" messages from other modules like FI, CO, etc, if you recognize here the correct component you should forward it to the corresponding area.

Consider specially the note 386152 : A dump MESSAGE_TYPE_X in SAPLMBWL / LMBWLU21 / MB_POST_GOODS_MOVEMENT occurs in MM-IM only in order to avoid the generation of inconsistencies. 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.

Express documents are the notification to the user of dumps or update termination errors.

Generated by Jive on 2014-04-01+02:00 7

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

The transaction SM50 for the Process Overview can be used to see the tables that are being updated after the posting of a goods movement (useful when the material document is posted but there is a delay in the database update).

Always perform note and message searches for similar messages that may have occurred for other customers.

4. Transactions in Inventory Management


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) Enter return delivery (transaction code MBRL) Release blocked stock (transaction code MBSF) Enter subsequent delivery (transaction code MBNL) Cancel material document for goods receipts (transaction code MBST) Display material document for goods receipts (transaction code MB03)

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) Goods issue (transaction code MB1A) Cancel material document for goods issues (transaction code MBST) Display material document for goods issues (transaction code MB03)

Release 4.70: The following new functions are made available: Transfer Postings and Stock Transfers (transaction code MB1B) Subsequent Adjustment in subcontracting (transaction code MB04)

5. Important tables in the Inventory Management Area

Generated by Jive on 2014-04-01+02:00 8

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

Document Tables: Table MKPF MSEG BSIM CKMI1 Meaning Header: Material Document Material Document segments/ lines Index for material to the FIdocuments Material ledger index, used to document changes in MBEW for each movement Key fields Document number (MBLNR), year (MJAHR) Document number (MBLNR), year (MJAHR), line number (ZEILE) Material (MATNR), Valuation Area (BWKEY) KALNR, use mbew-kaln1

Valuation Tables: Table MBEW EBEW QBEW OBEW Meaning Material Valuation Sales Order Stock Valuation (from 4.0 on) Project Stock Valuation (from 4.0 on) Valuated Stock with Subcontractor (from 4.6 only for Japan)

Stock Tables: Table MARC MARD MCHB MSSL MSLB MSKU MSSA MSKA MSSQ MSPR MKOL Meaning Plant Data for Material Storage Location Data for Material Batch Stocks Total Special Stocks with Vendor O Special Stocks with Vendor O Special Stocks with Customer V,W Total Customer Orders on Hand E Sales Order Stock E Project Stock Total Q Project Stock Q Special Stocks from Vendor K,M

Generated by Jive on 2014-04-01+02:00 9

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

6. Important breakpoints for debugging


Check all data before posting: Important breakpoint when we work in productive environments and we cannot save the posting. This is the last point in which the debugging can be re-started. Breakpoint in MM07MFB9, form BUCHEN_AUSFUEHREN.The internal table XMSEG shows how the document would be posted. Check data defaulted from other documents or master data: Data from the Material Master: Set a breakpoint in the function module MATERIAL_READ. Goods Issue for Reservation: Breakpoint in MM07MFR0, form RESERVIERUNG_LESEN, at call function MB_READ_RESERVATION_POS_WA. Check the internal table XRBEFU. The same function module is also called from the include LMBWLU10. Cancellation of a Material Document: Breakpoint in MM07MFB1, form BELEG_LESEN, at call function MB_READ_MATERIAL_POSITION. Goods Receipt for Production Order: Breakpoint in MM07MPPS, form PPS_AUFTRAG_PRUEFEN, at call function CO_SF_ITEM_GOODS_RECEIPT. For valuation data, set a breakpoint in the include LMBGBFPP (4.0: LMBGBFWR) at call function CK21_ITEM_GOODS_RECEIPT. Goods Issue for Production Order: Breakpoint in LMBGBFWR, form WERTE_ML_INITIALISIEREN, at call function CKML_F_CKML1_PRICES_GET. Check data in the interfaces: Data in the accounting interface: Breakpoint in MM07MFF9, form F-BELEG_ERGAENZEN, at call function CKMV_AC_DOCUMENT_CREATE (2nd page). The internal tables XACCIT (for the accounting document item data. It will be the data in BSEG when the document gets posted), XACCHD (accounting document header data: BKPF) and XACCCR (for the values in the different currencies) can be checked here. 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. Check some other data:

Generated by Jive on 2014-04-01+02:00 10

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

Check the account determination process: Breakpoint in function module MR_ACCOUNT_ASSIGNMENT (at "SELECT SINGLE * FROM T030").

Check the account assignment data: Breakpoint in function module K_COBL_CHECK. Check the movement type being posted: Breakpoint in function module MB_CONTROL_MOVETYPE_GET_SINGLE. Check the valuation: Breakpoint in MM07MFF9, form F_SEGMENTE_GENERIEREN at call function MB_CALCULATE_VALUES. Special program MBDEBUG: Some of these Breakpoints can be set automatically by executing the program MBDEBUG in SE38 and setting a flag in the desired point. A "stop" icon will be displayed as soon as the breakpoint is selected (i.e. activated). Exit the report going back with the green arrow (F3) and the system will stop at the breakpoints activated this way. 3331 Views Tags: inventory_management, enterprise_resource_planning, message_type_x, sap_erp_logistics_materials_management, m7314, m7308, m7309, m7310, movement_types, stock_tables, valuation_tables, material_document_tables, stock_inconsistencies, mm_transactions, stock_value_and_qty_are_unrealistic, stock_value_is_negative, valuated_stock_is_negative, valuated_stock_becomes_negative, ombt, sapsql_array_insert_duprec

kush kumar Jan 6, 2014 8:32 PM Nice knowledge sharing document, keep it up. PREETI KASHYAP Nov 7, 2013 1:02 PM Good Knowledge Sharing. Thanks Sir. Regards Preeti Muhammad Umar Farooq Nov 6, 2013 11:14 AM excellent effort, I am looking for a comprehensive information about the process of transfer within a plant and intra plants, if you could help me. S Ramaraju Nov 4, 2013 2:10 PM Good information. Thank you. Jason Zhuang Nov 1, 2013 2:28 AM Thanks for your efforts to build this great document.

Generated by Jive on 2014-04-01+02:00 11

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

Pathik Shah Oct 27, 2013 6:13 AM Very Informative..!! Thanks for the Sharing.. Manas Ghosh Oct 16, 2013 5:06 PM I have learnt a few things. Thanks for sharing. Suseelan Hari Oct 16, 2013 8:22 AM Hi Fabio, Good Day! I appreciate your efforts. Great work! Keep it up! Regards, Hari Suseelan Mehmet Ozgur Unal Oct 15, 2013 7:14 PM Thanks for your good intention M.Ozgur Unal Rajendar K Oct 10, 2013 3:17 PM Thanks , useful information Cecil D'Souza Oct 10, 2013 4:03 AM Very good information. Thank you Fabio for sharing. Satish Babu Oct 9, 2013 6:35 PM Useful information...Thank You very much sharing. Regards Satish Anupam Kumar Oct 9, 2013 8:28 AM Really an informative document. Thanks for sharing it with us

Generated by Jive on 2014-04-01+02:00 12

SAP ERP - Logistics Materials Management (SAP MM): Tips & Tricks about MM-IM*

Regards Anupam SG Sg Oct 9, 2013 8:20 AM useful document, niecely presented. Regards Giri Sudeep A Oct 9, 2013 7:57 AM Good one..!! Thiyagarajan V Sep 23, 2013 12:36 PM Real eye opener...with nice scenarios.... Shawn Xixi Wang Sep 23, 2013 12:18 PM Thank you. I like the part of categorizing the MoTs by their number ranges. S Ramaraju Sep 12, 2013 7:53 PM Very Good post Allen Wang Sep 12, 2013 4:21 PM Good post. Pillamgolla Amala Srinivasa Rao Sep 9, 2013 1:16 PM Good Effort

Generated by Jive on 2014-04-01+02:00 13

Anda mungkin juga menyukai