You are on page 1of 23

Physical Inventory General Process

Purpose
The purpose of this page is to present the main steps of Physical Inventory Process, also highlighting Tables, Transactions,
Customizing Settings and Examples.

Overview
 1. General
 1.1 Description
 1.2 Physical Inventory Processes
 1.3 Tables and PI Indicators
 1.4 Warehouse Management
 2. Main Physical Inventory
 2.1 Online transactions
 2.1.1 Create physical inventory document (MI01)
 2.1.2 Entering the Physical Inventory Count (MI04)
 2.1.3 Post inventory differences (MI07)
 2.1.4 Change and delete PI documents (MI02)
 2.1.4.1 Changing PI documents
 2.1.4.2 Delete PI document
 2.1.5 Others
 2.1.6 Customizing
 2.2 Batch-Input
 2.2.1 General
 2.3 PI reporting
 2.4 PI archiving
 2.5 Others
 3. Cycle Counting
 3.1 General Procedure
 3.1.1 General Steps Required for Cycle Counting
 3.2 RMCBIN00 (transaction MIBC): ABC Analysis for Cycle Counting
 3.3 RM07ICN1 (transaction MICN): Batch Input 'Create Phys. Inv.Docs. for CC'
 4. Inventory sampling
 4.1 Inventory sampling processes
 4.1.1 Select stock management level
 4.1.2 Stock population
 4.1.3 Stratification
 4.1.4 Random selection
 4.1.5 Creation of PI documents
 4.1.6 Update
 4.1.7 Extrapolation
 4.2 Example
 4.3 Notes
 5. Physical Inventory - Special features
 5.1 Serial Numbers
1. General
The Physical Inventory (PI) as a whole is divided into three parts, from which one includes the main PI process, another is
the cycle-counting process and the third is the inventory sampling process.
The cycle-counting and the inventory sampling processes are only special ways to create PI documents, afterwards the
main PI processes are used.

1.1 Description
Every company must carry out a physical inventory of its warehouse stocks at least once per fiscal year to balance its
inventory. Various procedures can be implemented for this.

The SAP System supports the following physical inventory procedures:

 periodic inventory:

In a periodic inventory, all stocks of the company are physically counted on the balance sheet key date. In this case, every
material must be counted.

 continuous inventory:

With the continuous inventory procedure, stocks are counted continuously during the entire fiscal year. In this case, it is
important to ensure that every material is physically counted at least once during the year. You can use the same
transactions for 'continuous inventory' as for 'periodic inventory'. The only difference is, that you count a material more than
one time per fiscal year.

 cycle counting:

Cycle counting is a method of physical inventory where inventory is counted at regular intervals within a fiscal year. These
intervals (or cycles) depend on the cycle counting indicator set for the materials

 inventory sampling:

In inventory sampling, randomly selected stocks of the company are physically counted on the balance sheet key date. If the
variances between the result of the count and the book inventory balance are small enough, it is presumed that the book
inventory balances for the other stocks are correct.

A PI document can only be created for the current FI year and for the previous FI year. The criterion in which FI year
the PI document will be created depends on the (planned) count date.
Please note, that as with a usual material posting, the PI difference for the previous FI year can only be posted until
the first period of the new FI year.

1.2 Physical Inventory Processes


1. Create physical inventory document
2. Entering the Physical Inventory Count
 Recount
3. Post inventory differences
1.3 Tables and PI indicators
The related database tables for the PI documents are

IKPF physical inventory document header-data

ISEG physical inventory document segments

Key-fields are

MANDT Client

IBLNR Physical inventory document number

GJAHR Fiscal year

(ZEILI Line number) only ISEG

In every stock table there are indicators for the PI process. These are used to monitor the PI status.

For example:

MARD:

SPERR Physical inventory blocking indicator:

'' No physical inventory defined for material

'X' Due to phys. inv., material is blocked for movements

'A' Physical inventory not yet completed for material

--> No physical inventory possible, if SPERR = 'X' or 'A'.

KZILL Physical inventory indicator for whse stock in current year

KZILQ Phys. inventory ind. f. stock in qual. insp. in current year

KZILE Physical inventory indicator for restricted-use stock

KZILS Physical inventory indicator for blocked stock

KZVLL Physical inventory indicator for stock in previous year

KZVLQ Phys. inventory ind. f. stock in qual. insp. in prev. period

KZVLE Physical inventory ind. for restricted-use stock, prev.pd

KZVLS Phys. inventory indicator for blocked stock in prev. Period

...
DLINL Date of last physical inventory for unrestricted-use stock

...

MDJIN Fiscal year of current physical inventory indicator

For all these fields:

If the physical inventory still has to be taken in the current year:

 Physical inventory still has to be taken: _ _ _


 Physical inventory still has to be completed: _ X _
 Posting block is set in active document: X _

If the physical inv. has already been taken in the current year:

 Physical inventory has been taken: _ _ X


 Physical inventory is active again: X X _
 Posting block is set in active document: X X X

--> No physical inventory possible, if 'X' 'XX_' '_XX' or 'XXX'

1.3 Warehouse Management


The PI process in the warehouse management is totally different from the PI process in materials management. Also a MM
PI document can not be created for a storage location for which one the warehouse management is active.

With transaction LI21 (Clearing of differences in inventory management), the PI differences in warehouse management will
be posted with our function 'MB_CREATE_GOODSMOVEMENT' (before release 4.5 with call transaction MB11).
The movement types 711 - 718 will be used to post the differences.

In the customizing for the movement types (table T156-XINVB) you can set an indicator, that during the posting an PI
document will be created in the background.

Attention:
This indicator will only work for the movement types 711-718 and should not be used for other movement types.

2. Main Physical Inventory


The main PI can also be divided into

 the online transactions to create and process PI documents


 the batch-input transactions to create PI documents
 the PI reporting

2.1 Online transactions


MI01 Create physical inventory document
MI02 Change physical inventory document

MI03 Display physical inventory document

MI04 Entering the Physical Inventory Count

MI05 Change count

MI06 Display count

MI07 Post inventory differences

MI08 Post Count and differences (MI04 + MI07)

MI09 Enter count without reference to a document (MI01 + MI04)

MI10 Post document, Count and Differences(MI01 + MI04 + MI07)

MI11 Recount

2.1.1 Create physical inventory document (MI01)

 Physical inventory can be carried out both for a company's own stock and for special stock. Inventory for a company's stock
and for special stocks (such as, consignment stock at customer, external consignment stock from vendor or returnable
packaging) must be taken separately (in different physical inventory documents).
 Physical inventory takes place at storage location level. A separate physical inventory document is created for every storage
location.
 If no storage location segment exists for a material, this means that no goods movement has ever taken place for the
material in the storage location. The material, therefore, has never had any stock at the storage location and does not exist
at stock management level in the storage location. It is therefore not possible to carry out a physical inventory for the
material in this storage location.
 A material for which a goods movement has taken place and for which the stock balance is currently zero. A physical
inventory must be carried out in this case.
 Posting block:
Indicates that no goods movements involving the materials listed in the physical inventory document can be posted until the
count results are posted.
 Freeze book inventory:
This indicator has the effect that the current book inventory balance is recorded in the physical inventory document. The
system compares the counted stock with the frozen book inventory balance to determine any inventory differences.
The program reads the actual warehouse stock (table MARD, MCHB, MSKU, ...) and writes this in ISEG-BUCHM.
 a physical inventory can be carried out for the following stock types:
 1 unrestricted-use stock in the warehouse
 2 quality inspection stock
 4 blocked stock

If you want to create a physical inventory document for a material, the system checks the PI indicators.
Example:
Physical inventory for a (non batch management) material
--> system analysis storage location data in table MARD.
--> No physical inventory possible, if 'X' 'XX_' '_XX' or 'XXX'.

2.1.2 Entering the Physical Inventory Count (MI04)


You have to enter the count results for each item in a physical inventory document.

 The posting block is automatically cancelled when you post the counting results for the physical inventory document.
 If there was no 'Freeze book inventory' before, the system calculates the current book quantity and updates ISEG-
BUCHM with this quantity.
--> Physical inventory difference = ISEG-MENGE - ISEG-BUCHM
 Physical inventory indicator will be updated:
Example:
Create a physical inventory document
MARD-SPERR = 'X'
MARD-KZILL = 'XX_'
Count the material:
MARD-SPERR = 'A'
MARD-KZILL = 'X'.

==> After entering the count results: You are able to post goods movements for this material. (no posting block)

Determination of the PI difference


--> note 202834 Determ. of book quantity within physical inventory

2.1.3 Post inventory differences (MI07)

 When you post the physical inventory difference, the system creates a material document that records the adjusted stock
balances and an accounting document that contains the necessary account activities.
 Movement types in material document:

701: GR phys.inv.: unrestricted stock (stock type 1) (positive phys.inv. dif. for unrestricted stock)
702: GI phys.inv.: unrestricted stock (stock type 1) (negative phys.inv. dif. for unrestricted stock)
703: GR phys.inv.: quality insp. (stock type 2) (positive phys.inv. dif. for quality insp.)
704: GI phys.inv.: quality insp. (stock type 2) (negative phys.inv. diff. for quality insp.)
707: GR phys.inv.: blocked stock (stock type 4)(positive phys.inv. diff. for blocked stock)
708: GI phys.inv.: blocked stock (stock type 4)(negative phys.inv. diff. for blocked stock)

 Physical inventory indicator will be updated:


Example:
Create a physical inventory document
MARD-SPERR = 'X'
MARD-KZILL = 'X X _'
Count the material:
MARD-SPERR = 'A'
MARD-KZILL = '_ X _'
Post inv.differences
MARD-SPERR = ' '
MARD-KZILL = '_ _ X'

2.1.4 Change and delete PI documents (MI02)


2.1.4.1 Changing PI documents
If the PI documents is not already counted, you can change in the PI document

 The planned count date


 The document date
 The posting block indicator
 The freeze inventory indicator
 The inventory number
 The inventory reference
 The stock type

2.1.4.2 Delete PI document


You can delete the whole PI document with transaction MI02, when you enter the transaction and then press the garbage
bag or you can set the delete indicator for each item!

The logic behind the deletion:


If the difference for an PI document is already posted, the delete indicator will be set. Otherwise the whole document will be
deleted from the database.

2.1.5 Others
You can use

MI08 Post Count and differences (MI04 + MI07)

MI09 Enter count without reference to a document (MI01 + MI04)

MI10 Post document, Count and Differences (MI01 + MI04 + MI07)

instead of MI01, MI04 and MI07.

2.1.6 Customizing
Transaction SPRO:

> Materials Management > Inventory Management and Physical Inventory--> Physical Inventory:

 Field selection for physical inventory:


Field ISEG-GRUND (Reason for inventory diff.) can be changed to:
Input, required, display, hide, highlighted.
 Default values for physical inventory:
Default values (at plant level) for stock type, batch in background, alternative unit of measure, reason for difference
 Settings for physical inventory
 Activate 'Change document'
 Adjust book inv. Balance
 When the indicator "Adjust book inventory balance" is set, the system checks whether the goods movement would have
affected the book inventory balance if the goods movement had been posted earlier. If this is the case, the book inventory
balance in the physical inventory document and the inventory difference are adjusted by the amount of the goods
movement.
Example:
Material XYZ, plant 1000, storage location 0001.
 1. Receive or Issue quantity to maintain a balance of 1000 PCs.
 2. Transaction MI01 -> Create a physical inventory document with "Freeze" book inventory
 3. Transaction MI04 -> Enter a "Count" quantity of 80 PCs.
 4. Transaction MI03 -> Display the item details -> You should see
920 PCs (Diff. Quantity) = 1000 PCs (Book quantity) - 80 PCs (Count quantity)
 5. Transaction MB1A -> Post date = Count date - 2 days, quantity = 900 PCs.
You will see message M7 145. Enter to continue. Post the goods issue.
 6. Transaction MI03 -> Display the item details -> You should see
20 PCs (Diff. Quantity) = 100 PCs (Book quantity) - 80 PCs (Count quantity)
The "book quantity" was automatically adjusted in the physical inventory document.
 Serial numbers
 Whether existing serial numbers should be displayed as input help in the dialog box for entering serial numbers, when
entering an inventory count:
Indicator Display serial numbers
 Whether, and with how many lines, serial numbers should be printed, when printing physical inventory documents.
Indicator Inventory document printout with serial numbers
 How many lines should be printed for serial numbers per physical inventory document item when printing physical inventory
documents.
Indicator Number of printed serial numbers lines
 Default values for batch input
 Maintain copy rules for reference documents
 You can decide whether the positions in MI07 are pre-selected or not.
 Allow freezing for book inventory balanced in storage location
 Define tolerances for physical inventory differences

Internal tables

During debugging you will find information in these tables:

YISEG physical inventory document segments (for checks)

XISEG physical inventory document segments (filled with data from YISEG. Used to update the physical inv.doc. on database).

IKPF physical inventory header

YDM07I Fields: Dialog Control for Module Pool SAPMM07I (physical inventory)

YVM07I Fields for Update Control of Module Pool SAPMM07I (physical inventory)

Breakpoints

 MM07IFB0:
In form 'beleg_buchen' you can set a breakpoint to see how the system will create/update the inventory document and
material document.
FORM BELEG_BUCHEN.
...
IF DIFFERENZ = X. <== MI07: Post a difference and create a material document
CALL FUNCTION 'MB_CREATE_INVENTORY_DIFFERENCE'
EXPORTING BUDAT = IKPF-BUDAT
BLDAT = IKPF-BLDAT
MONAT = IKPF-MONAT
MTM07I = TM07I
CTCODE = L_TCODE
SPERRE = INV_SHARED
IMPORTING MBLNR = MKPF-MBLNR
TABLES MDM07I = YDM07I
MISEG = XISEG
MVM07I = YVM07I
M156W = X156W
MLGISEG = LGISEG
MLGDM07I = LGDM07I
MLGVM07I = LGVM07I
...
CALL FUNCTION 'MB_UPDATE_INVENTORY_DOCUMENT' IN UPDATE TASK
EXPORTING <== Update/create physical inv.doc.
L_TM07I = TM07I
TABLES
XCM07I = XCM07I
XIKPF = XIKPF
XISEG = XISEG
XVM07I = XVM07I
ZIKPF = ZIKPF
ZISEG = ZISEG
OLD_ISEG = OLD_ISEG1
XMARV = XMARV.

2.2 Batch-Input
MI31 (Batch Input: Create Physical Inventory Document without Special Stock)

MIK1 (Batch Input: Create Physical Inventory Documents for Vendor Consignment)

MIE1 (Batch Input: Create Physical Inventory Documents for Sales Order)

MIQ1 (Batch Input: Create Physical Inventory Documents for Project)

MIM1 (Batch Input: Create Physical Inventory Documents for Ret. Transp. Pack.)

MIW1 (Batch Input: Create Physical Inventory Documents for Consignment at Customer)

MIV1 (Batch Input: Create Physical Inventory Documents for Ret. Pack. at Customer)

MIO1 (Batch Input: Create Physical Inventory Documents for Mat. Prov. to Vendor)
MICN (Batch Input: Create Physical Inventory Documents for Cycle Counting)

MI32 Batch Input: Block Material

MI33 Batch Input: Freeze Book Inv.Balance

MI34 Batch Input: Enter Count

MI35 Batch Input: Post Zero Stock Balance

MI37 Batch Input: Post Differences

MI38 Batch Input: Count and Differences

MI39 Batch Input: Document and Count

MI40 Batch Input: Doc., Count and Diff.

2.2.1 General
With the above mentioned batch-input programs, you can select the materials for which pyhsical inventory documents
should be created.

The selection criteria are:

 material number
 plant
 (storage location)
 material type
 material group
 storage bin description
 deletion indicator

also

 materials with/without zero stock


 materials with negative stock
 FI year with the planed count date

Depending on the PI indicators, the program selects materials for which one PI documents will be created.

2.3 PI reporting
MI20 List of Inventory Difference

MI24 Physical Inventory Difference List

MI21 Print Physical Inventory Document


MI22 Physical Inventory Document for Material

MI23 Physical Inventory Data for Material

MIDO Physical Inventory Overview

MI12 Changes to Physical Inventory Document

The PI reports are used to give an overview of the current PI status.


Also within the reports MI20 and MI24, the customer is able to process (counting, posting) PI documents.

2.4 PI archiving
MI9A Analyze archived phy. inv. docs

MI9R Archive phys. inv. documents

MIAD Delete Phys. Inv. Documents

MIAL Inventory Documents: Read Archive

MIAR Archive Phys. Inv. Documents

MIAV Manage Phys. Inv. Doc. Archive

2.5 Others
Also PI documents can be handled with BAPI's, please refer to the general documentation for the PI BAPI's (transaction
BAPI).

3. Cycle Counting
Cycle counting is a method of physical inventory where inventory is counted at regular intervals within a fiscal year. These
intervals (or cycles) depend on the cycle counting indicator set for the materials.
Cycle Counting allows fast-moving items to be counted more frequently than slow-moving items, for example.

3.1 General Procedure


Mark all materials that are to be included in cycle counting with a cycle counting indicator in the material master record
(storage data). The cycle counting indicator is used to group the materials together into various cycle counting categories
(for example, A, B, C, and D). The time intervals at which the materials are counted are defined for each category.

You can mark the materials as follows:

 manually in the material master record (storage data)


 automatically using ABC analysis
To perform an ABC analysis, use program RMCBIN00. In this analysis, the system assigns the materials to the individual
categories according to consumption or requirements. You can also specify whether this analysis is to consider only the
materials with cycle counting indicator or all materials. The cycle counting indicator can be updated automatically while the
ABC analysis is run.
For the planning of cycle counting, run program RM07ICN1 at regular intervals. This program checks all cycle counting
materials to determine whether a physical inventory is due to be carried out.
If a material needs to be counted, use the program to create a batch input session for creating physical inventory
documents.

3.1.1 General Steps Required for Cycle Counting

 Marking Materials for Cycle Counting:


In the material master record (storage data), maintain the cycle counting indicator for all materials to be included in cycle
counting
 Physical inventory indicator for cycle counting: MARC-ABCIN
Indicates that the given material is subject to the cycle counting method of inventory.
 CC fixed: MARC-CCFIX
 Specifies that the cycle counting indicator cannot be changed for cycle counting by an ABC analysis.

TIP: Both fields are in table MARC (-> you set CC on plant level). To display all Materials for CC, you have to use SE16 for
table MARC and select all entries with MARC-ABCIN not equal ' '.

Customizing (Transaction OMCO): Table T159C

1. Define the allowed cycle counting indicators in the plant.


2. Number of physical inventories per fiscal year:
At least one physical inventory count per year has to be performed.
3. Float time (workdays):
Number of workdays by which the planned count date may vary from current date.
Example: for a plant the float time is 5 days. A physical inventory has been planned for a material for June, 1.
On expiration of the float time (after June, 6) the physical inventory has not been carried out. The material will be included in
the log in the next cycle counting run.
4. Percentage of performance measure for cycle counting indicator.

3.2 RMCBIN00 (transaction MIBC): ABC Analysis for Cycle Counting


The analysis takes into account the consumption (usage) or the requirements values of the selected materials for the
desired time period. You can decide whether you want to analyze:

 Only materials that have a cycle counting indicator


 All materials (including materials that have no cycle counting indicator)
During the analysis, you can have the system automatically update the cycle counting indicator in the material master record
for the selected materials.

The report issues a list with the following information for each material:

 Material number with short description


 The cycle counting indicator obtained as a result of the analysis
 Previous cycle counting indicator

Choose Edit -> Double-line to also display the consumption or requirements values for each line.

Example:
In the given plant, 200 materials are subject to the cycle counting physical inventory procedure. In Customizing for Inventory
Management, the following percentage allocation has been defined for the plant:

 A materials: 50%
 B materials: 25%
 C materials: 15%
 D materials: 10%
In the cycle counting analysis, the materials are sorted by consumption. After completion of the analysis, the cycle counting
indicator is assigned as follows:
 The first 3 materials (sorted in descending order according to consumption) represent 50% of the consumption and have the
indicator A.
 The next 12 materials represent 25% of the consumption and have the indicator B.
 The next 49 materials represent 15% of the consumption and have the indicator C.
 The remaining 136 materials represent the rest (10%) of the consumption and have the indicator D.

Coding:
Main coding is include RMCBINCC_AL.

1. Select all materials, using view MCON

form materialien_in_tab.
...
select * from mcon into table int_mcon
where werks = werks
and mtart in mtart
and abcin ne space
and lvorm = space.
...

2. Get consumption or requirement values of selected materials

...
form menge_in_tab.
if xverbr ne space.
loop at wertetab.
perform verbrauch_lesen. . <-- Requirement: call function 'VERBRAUCH_SUMMIEREN'
modify wertetab.
endloop.
else.
clear int_t438a.
refresh int_t438a.
select * from t438a into table int_t438a.
loop at wertetab.
perform bedarf_lesen <-- Consumption: call function 'MCB_SELECT_REQUIREMENTS'
modify wertetab.
endloop.
endif.
endform.
...

3. ABC-Analysis

...
form analyse_durchfuehren.
...
*-------- Materialien nach Wert sortiert
sort wertetab by k_wert descending. <-- Sort by value
*-------- Vergabe der ABCIN-Kz. Entscheidend ist kum. %-Satz vor Add.
*-------- bei CCFIX = true: kein Ueberschreiben ABCIN
ad_summe = 0.
loop at wertetab.
if wertetab-ccfix = true.
wertetab-abcin_neu = wertetab-abcin.
wertetab-hlp_abcin_neu = wertetab-abcin.
else.
loop at int_t159c.
if ad_summe le int_t159c-k_ccdev <-- Set CC-indicator depending on %
and not int_t159c-k_ccdev is initial.
wertetab-abcin_neu = int_t159c-abcin.
wertetab-hlp_abcin_neu = int_t159c-abcin.
exit.
endif.
endloop.
endif.
wertetab-prozent = ( wertetab-k_wert / gesamtwert ) * 100.
ad_summe = ad_summe + wertetab-prozent.
if ad_summe > ad_summe_max. " Rundungsfehler korrigieren
ad_summe = ad_summe_max.
endif.
wertetab-k_prozent = ad_summe.
modify wertetab.
endloop.

endform.

3.3 RM07ICN1 (transaction MICN): Batch Input 'Create Phys.


Inv.Docs. for CC'
This report only takes materials with cycle counting indicators into account. The system issues a list containing the following
data:

 It lists all stock management units for which no physical inventory documents can be created.
 It then lists the stock management units for which a physical inventory is already active, but has not been completed within
the predefined float time and therefore must be completed urgently. These stock management units are not included when
the batch input session is created because active physical inventory documents already exist.
In addition, the list contains all materials for which cycle counting is required within the planned interval (specified interval for
the planned count date). If a physical inventory had already been due prior to the planned interval, the planned count date
would be highlighted.

The planned count date is calculated as follows:

Date of last physical inventory

MARD-DLINL (Storage Location Data for Material)

MCHB-CHDLL (Batch Stocks),

MSLB-LBDLL (Special Stocks with Vendor)

MKOL-KODLL (Special Stocks from Vendor)

MSKA-KADLL (Sales Order Stock),

MSKU-KUDLL (Special Stocks with Customer)

MSPR-PRDLL (Project Stock)

+
Physical inventory interval (in workdays) for cycle counting
T159C-ININV
=
Planned count date

TIP:
If there was no physical inventory for the material (--> date of last physical inventory is initial), the report takes the creation
date (field ERSDA in tables above).

The physical inventory interval is defined for each cycle counting indicator in customizing.
Process the batch input session to create the physical inventory documents. Carry out the physical inventory. When the
inventory differences are posted, the actual count date is recorded in the physical inventory data of the material as the date
of the last physical inventory.

Coding:

1. Select materials: (RM07ICN)


The views V_MMIM_LN, V_MMIM_LB, V_MMIM_LC are used to select materials from database.
2. Check date: (RM07ICN1)
In form 'Inventurzyklus_pruefen' the planned count date is calculated

...
READ TABLE XT159C WITH KEY T159C_KEY BINARY SEARCH.
...
ABS_DLINL = ABS_DLINL + XT159C-ININV.
...

4. Inventory sampling
This component reduces the time and cost of a physical inventory considerably by counting only the stock of individual
materials and carrying out an extrapolation to arrive at an estimated count result for all units of stock managed in the ERP
System (stock management units).

The more materials a company has, the more costly it is to carry out a physical inventory by counting all stocks. The
principle of extrapolation during sample taking is also used in quality inspection in the ERP System: only one particular
sample is inspected. The result is then applied to the entire quantity.

To infer the counts for all stock management units by extrapolating the count results for individual units, the following
prerequisites must be fulfilled:

The size of the stock management units included in the physical inventory must be large enough.
The selection of stock management units to be counted must be "representative".
Statistical procedures are used for carrying out inventory sampling:

A sample to be counted is randomly selected from the stock management units subject to physical inventory. The size of the
sample depends on the degree of probability (probable degree of confidence) with which the extrapolated value inferred
from individual counts is expected to be valid for all stock management units included in inventory sampling.
On the basis of the posted count results, the system carries out an extrapolation for all the stock management units included
in the physical inventory.
The inventory sampling is considered successful, if there is only a small deviation between the extrapolated value and the
book value and a high probability that the extrapolation result contains only a minor error.
If an inventory sampling is successful, it is assumed that the estimated deviations from the book inventory balances are so
small that they can be neglected. As in the case of a "standard" physical inventory, only the stock of the elements actually
counted is adjusted. The stock of the remaining stock management units remains unchanged.

If an inventory sampling is not successful, a complete physical inventory must be carried out for the stock management units
not counted.

Inventory sampling can be carried out in the areas of Inventory Management and Warehouse Management. The steps
required to carry out an inventory sampling are the same in both areas. The only difference is the selection of the objects
included in the physical inventory:

Inventory Management:
The physical inventory is carried out through selection of the materials by plant, storage location, material type, and stock
type.

In Warehouse Management:
The physical inventory is carried out through selection of the storage bins by warehouse number and storage type.

MIS1 Create Inventory Sampling - R/3

MIS2 Change Inventory Sampling

MIS3 Display Inventory Sampling

MIS4 Create Inventory Sampling - R/2

MIS5 Create Inventory Sampling - Other systems

Report RM07SBTC can be used to process the inventory sampling in the background.

Main program: SAPMM07S.

The statistical parameters are (default values):


Probable degree of certainty 95,00 %
max. rel. deviation allowed 2,00 %
max. rel. statist. error allowed 1,00 %

The SAP Inventory sampling process use the mean-value estimation.

4.1 Inventory sampling processes


1. Select stock management level
2. Stock population
3. Stratification
4. Random selection
5. Creation of PI documents
6. Update
7. Extrapolation

4.1.1 Select stock management level


In this step, the stock management levels (plant and storage location or storage number and storage type), for which the
inventory sampling will be created are selected.
The table SBSE (Stock Mngmt Levels for Inventory Sampling) will be filled with this information.

4.1.2 Stock population


(Form S1_LAGERGESAMTHEIT)
In this step, the materials or storage bins that are participating in the inventory sampling process will be determined.
The table SLGH (Elements of Stock Population) will be filled.

4.1.3 Stratification
(Form P2_SCHICHTEINTEILUNG)
Depending on the value, the participating elements will be sorted into classes and strati.
The table SSCH (Strata of Inventory Sampling) will be populated.

4.1.4 Random selection


(Form P3_ZUFALLSAUSWAHL)
With a randomizer, the elements that have to be counted will be determined.
These elements will be marked in table SLGH. XSPEL stands for sampling element, XVERR stands for element in the
complete count area.

4.1.5 Creation of PI documents


The PI documents will be created and are processed in the same manner as other PI documents.

4.1.6 Update
(Form P4_AKTUALISIERUNG)
Counted and difference posted PI documents will be detected and stored in table SLGH.
Probably subsequent random selection has to be made (P4_NACHERHEBUNG).

4.1.7 Extrapolation
(Form P5_HOCHRECHNUNG and P5_GESAMTFEHLER_BERECHNEN)
With the parameters and the posted PI differences, the systems determines, if the status of the inventory sampling is
successful.

4.2 Example
A simple example for the functionality:

There are 10 materials for which you want to perform an inventory sampling

Material Value

1 1

2 2

3 3

4 4

5 5

6 6

7 7

8 8

9 9

10 10

The mean value for these materials are 55/10 = 5,5

In the step of the stratification, the customer receives two strati:


Stratus 1 from 0 - 5
Stratus 2 from 6 - 10

In the first stratus the mean value is 3, in the second stratus the mean value is 8.

In the random selection, the following materials will be selected:

XSPEL

Stratus 1: 1 1 --> X
2 2

3 3 --> X

4 4

5 5 --> X

Stratus 2: 6 6

7 7

8 8 --> X

9 9

10 10 --> X

Now you enter the PI count for these materials:

Material Value after PI

1 1

3 4

5 4

8 8

10 6

After the update the extrapolation will be executed:

XSPEL New Value

Stratus 1: 1 1 --> X 1

2 2

6 3 --> X 4

7 4

8 5 --> X 4

Stratus 2: 6 6

7 7

8 8 --> X 8
9 9

10 10 --> X 6

--> Mean value of the random selected materials:

Stratus 1 --> 3
Stratus 2 --> 7
Total --> 5

The maximal rel. deviation is


5,5 <> 5 --> 9%

The inventory sampling is not successful.

4.3 Notes
The SAP inventory sampling process is testified by Arthur Andersen.
Important notes describing the functionality of the inventory sampling process are:

086111 General note on the inventory sampling procedure


205519 Extrapolation and relative statistical error
216372 Inventory sampling in WM:Special features/document
336896 Certification of the inventory sampling
351013 Stratum to which stock element belongs not clear

5. Physical Inventory - Special features


5.1 Serial numbers
From Release 4.6A, you can enter serial numbers during physical inventory for materials with serial number requirement,
immediately when entering the inventory count.
This is possible for the following transactions:

 When entering the inventory count (MI04)


 When entering the inventory count without reference to a document (MI09)
 When posting the count and differences in one step (MI08)
 When creating an inventory document, entering the count and posting differences in one step (MI10)
 When changing the inventory count (MI05)

When you enter or change an inventory count, you can edit the serial numbers entered for each item from the collective
processing or overview screen by choosing Edit -> Change serial number. Position your cursor on the line number whose
serial numbers you want to change.
You can display the serial numbers when displaying a physical inventory document item. To do this, choose Goto -> Serial
number.

Note the following:

 It is not possible to first enter the serial numbers and then to derive the counted stock from their number.
 The inspection lot comparison (stock type 2) with serial numbers is not supported.

Serial number inventory is performed for all materials with serial number requirement. For this, you must maintain the
following settings:

 In the material master record, a serial number profile must be entered containing the serialization procedure MMSL
(Maintain goods receipt and goods issue document), with the indicator for Serial number usage configured in such a way
that serial numbers must be assigned.
 The stock check indicator in the serial number profile should be configured in such a way that an error message is displayed
in the event of inconsistencies in inventory management.

Example
If you perform a physical inventory for a material without serial numbers, the system compares the counted quantity with the
book quantity. If these quantities are the same, there is no physical inventory difference. This could be different for materials
with serial numbers:

Case 1: No quantity difference

Material 4711, 3 PC counted, book quantity 3 PC:

Counted serial numbers Serial numbers in ERP stock

1 1

2 4

3 3

Post inventory difference (MI07, MI08, MI10): There will be no material document created, because the there is no quantity
difference, but serial number 4 will be assigned to the material and serial number 2 will be unassigned from material 4711.

Case 2: Positive quantity difference


Material 4711, 3 PC counted, book quantity 2 PC:

Counted serial numbers Serial numbers in ERP stock

1 1

2 2

A material document will be created, because a positive physical inventory difference exits (--> 1 PC). Moreover serial
number 3 has to be assigned to material 4711.

Case 3: Negative quantity difference


Material 4711, 2 PC counted, book quantity 3 PC:

Counted serial numbers Serial numbers in ERP stock

1 1
Counted serial numbers Serial numbers in ERP stock

2 2

A material document will be created, because a negative physical inventory difference exits (--> -1 PC). Moreover serial
number 3 has to be unassigned to material 4711.

Case 4: Combination of case 1 and 2/3


Material 4711, 2 PC counted, book quantity 3 PC:

Counted serial numbers Serial numbers in ERP stock

1 1

4 2

A material document will be created, because a negative physical inventory difference exits (--> -1 PC). Moreover serial
numbers 2 and 3 have to be unassigned to material 4711, while serial number 4 has to be assigned to material 4711.

Program
Database tables
As you saw in the example the system has to save the counted serial numbers and the serial numbers in the R/3-stock. We
use table SER07 to save this information:
[Table SER07 belongs to application 'serial number management'.]

Field Short text

MANDT Client (KEY-field)

OBKNR Object list number (KEY-field)

IBLNR Physical inventory document

ZEILI Line number

MJAHR Fiscal year

OLTPI Object List Feature - Physical Inventory

WERK Plant

LAGERORT Storage location

CHARGE Batch number

BSTAR Stock type (physical inventory


ANZSN Number of serial numbers

DATUM Date

With the object list number you will find all serial numbers for a physical inventory document in table OBJK.

Field OLTPI could have to contents:

 1: Serial numbers in R/3 stock


 2: Counted serial numbers

This means there will be two lines (they are called 'object lists') in tables SER07 for each item in a physical inventory
document. These lines will be used to compare the serial numbers in stock and the counted ones at the time you post the
physical inventory differences.

Source Code
The source code in MM-IM has the task to determine, that a material requires serial numbers. In this case the system has to
ensure, that after entering the counted quantity a popup appears, where the serial numbers have to entered. Additionally the
serial numbers of the R/3-stock have to be saved.

Form 'SERIALNUMBER_HANDLING'
You will find the important part of the serial numbers source code in include MM07IFS1. The main form is named
'SERIALNUMBER_HANDLING'. The program will call this form for almost every transaction in the physical inventory. In this
form you can see what the program will do for each transaction:

As you can see all important physical inventory transactions will use the form 'SERIALNUMBER_HANDLING':
MI01, MI02, MI04, MI05, MI07, MI08, MI09, MI10 and MI11.

For each transaction there is a block of coding where forms are called to perform the needed steps. These are the forms:

 SERIALNUMBER_COUNT
 SERIALNUMBER_POST
 SERIALNUMBER_BOOK_INVENTORY
 SERIALNUMBER_OBLIGATORY_CHECK
 SERIALNUMBER_RENUMBER
 SERIALNUMBER_DIFFERENCE
 SERIALNUMBER_DELETE
 SERIALNUMBER_NEW_POSITIONS
 SERIALNUMBER_STATUS_UPDATE
 SERIALNUMBER_STOCK_TYPE