Deletion of Batch Management PDF
Deletion of Batch Management PDF
Deletion of Batch Management PDF
SAP Logistics
(MM,PP,SD,QM &WM)
Prepared By:
Jibin Jose
Associate Consultant SAP (MM & EBP)
Wipro Technologies
[email protected]
Mobile : 09845196334
Index
1. Introduction
2. Important Check Point
3. Stock Checking
4. Table Details
5. Programs used for deletion
6. How to remove from the database
7. How to Remove the batch management from Material master
8. Exceptions and how to handle it
9. OSS Notes
10. Patch Levels
1. Introduction
Are you afraid of the batch management deletion in SAP .If so read this document,
which will give you a total solution of how you can be a batch management deletion
expert?
This document describes the process of the deactivation of batch management for
materials for which stock already exists. SAP does not allow deactivating batch
management unless the old batches are deleted from the database.
What is a batch?
Subset of the total quantity of a material held in stock, which is managed separately from other
subsets of the same material.
Examples: different production lots (such as paints, dyes, wallpapers, and pharmaceutical
products), delivery lots, quality grades of a material.
The main characteristic of a batch is its homogeneity. A production lot can consist of one or more
batches.
Total quantity of a material that has been created under uniform conditions.
Hierarchically structured record of the use or composition of a batch across all production levels.
The batch where-used list facilitates both top-down and bottom-up analysis.
Top-down analysis indicates the batches of raw materials or semifinished products of which a
batch of a finished product is composed.
Bottom-up analysis indicates the batches of semifinished products or finished products that
contain a certain raw material batch.
1. Unrestricted Stock
2. Restricted use stock
3. Blocked stock
4. Quality Inspection stock
5. Reservation
6. Consignment stock
7. Vendor consignment stock
8. Third party stock
9. Stock with subcontracting
10. Stock in Transit
11. Physical inventory count documents
Once you make sure the stocks are not available in all areas, we can move ahead with the
reversal of the stocks.
3. Stock Checking
As mentioned in the above check points, we have to check the stock of the
material in all the relevant part of the materials management, Sales and Distribution,
Production planning, Quality systems, Project systems and Ware House management.
SAP gives a batch management cockpit to evaluate the batch where used list. If you are
really unaware of the material where used, this transaction will help you.
4. Table Details
• MCHA Batches
• MCHB Batch Stocks
• MCHBH Batch Stocks: History
• MCHCL Batch Class Conversion
• MCH1 Batches (if Batch Management Cross-Plant)
• MCHCL_MAT Materials for Batch Class Conversion
• MCHP Batch Record for a Batch
• MCHPV Batch Record: Versions
• MCHPVS Batch Record: Shadow Table for Link to Arc
• MCHPVT Batch Record: Long Text for Version
• MCHUWL User-Specific Batch Worklist
• MCHUWT Assignment of User to Batch Worklist Type
• MCHWT Batch Worklist Types
• MCHWTT Batch Worklist Type Texts
• MARDH- Material Master Storage Location Segment: History
1. DB_DELETE_TABLE
This program directly deletes the specified rows from the tables.
For more details see the program though SE37.
FUNCTION DB_DELETE_TABLE .
*"--------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(TABLENAME) LIKE DD02L-TABNAME
*" EXPORTING
*" REFERENCE(SQLCODE) TYPE I
*" TABLES
*" INTTAB
*" EXCEPTIONS
*" DB_ERROR
*" NOT_FOUND
*" WRONG_PARAM
*" INTERNAL_ERROR
*"--------------------------------------------------------------------
DATA: DBCNT LIKE SY-DBCNT.
Prerequisite
1. Remove all the stock of the materials from all required plants and storage locations.
2. Check all the stock reports and make sure no stocks are available.
3. Check the stocks in the different table mentioned in the table’s details
4. Check the stock in transit.
Make sure all the details are removed using the Movement type 201 issued against a
cost center or by some other movement types which is acceptable.
010000200405 00300001200212
8. This will delete the entries from the table. Likewise delete the entries
Corresponding to the batches from the above mentioned tables.
• MCHA-Batches.
• MCHB- Batch stock.
• MCHBH- Batch stock history
• MARDH- Material Master Storage Location Segment: History
Prerequisite.
2. Tables mentioned in the table’s details for the stock of the material and batch
details.
2. Reverse the material document created during the 201 movement type. This
will bring the material back to stock with out batches.
If you are come across with any problems after the deletion of the batch. Most of the
common errors and its solutions are given below.
1. Batches are removed, after that we found a stock in transit is there stock with any other
stock types.
In this case we have to restore the batches against the stock in transit. After that only we
can do any receipt or consumption of the material possible.
FUNCTION DB_INSERT_TABLE .
*"--------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(TABLENAME) LIKE DD02L-TABNAME
*" EXPORTING
*" REFERENCE(SQLCODE) LIKE SY-SUBRC
*" TABLES
*" INTTAB
*" EXCEPTIONS
*" DB_ERROR
*" DUPLICATE_KEY
*" WRONG_PARAM
*" INTERNAL_ERROR
*"--------------------------------------------------------------------
DATA: DBCNT LIKE SY-DBCNT.
ENDFUNCTION.
Insert the batch details to the history tables and the material master storage location
segment history table.
9. OSS Notes
Different OSS Notes can be applied incase if the system is showing any of these errors
Symptom
When maintaining a material master record, you change the base unit of measure or the
batch management requirement indicator or the valuation category. The system then tells
you that this change is not possible since stocks still exist. However, no stocks are shown
for the material in the stock overview.
Other terms
Transactions: MM01, MM02; program SAPMM03M
Fields: MARA-MEINS, MARA-XCHPF, MARC-XCHPF, MBEW-BWTTY
The reason for checking previous period stocks is that postings can also be made to the
previous period when entering goods movements. This would result in inconsistencies if
the base unit of measure had meanwhile been changed.
Solution
Please check whether stocks still exist for the previous period by displaying, for example,
the plant stock view or storage location stock view of the material. You do this by
selecting "Extras -> Previous period -> Prev. pd SLoc. stock or Prev. pd plant stock".
If previous period stocks exist, you can make a withdrawal posting as follows:
1. Post the same amount to current period stock (for example, using movement
type 561) so that previous period stock and current period stock are identical.
2. Make a withdrawal posting in the previous period for the stock together with
posting date (for example, using movement type 562).
You can now try again to change the base unit of measure or the batch management
requirement indicator.
Since the posting of the previous period values to zero is identical with posting to the
stocks of the current period, you should reverse the above stock postings (i.e. the stock
from the previous period should be booked in again) to make sure that the stock values
from the previous and the current periods correspond to the state before the change.
Please note, however, that the postings are then carried out using the changed master data
from the current period (e.g. account determination, etc.)!
Other Notes.
11. 1.000 ME2O:Incorrect stock qty for materials not batch managed
Application Area: IS-AFS- Last Changed On:
Note Number: 754146
MM-PUR 13.07.2004
Priority: Correction with medium Release Status: Released
Category: Program error
priority for Customer
12. 1.000 Transfer posting with restricted batches
Application Area: SCM-ECT- Last Changed On:
Note Number: 750873
LIM-PI 05.07.2004
Priority: Correction with medium Release Status: Released
Category: Program error
priority for Customer
Batch management in MM