Professional Documents
Culture Documents
Created by Haiko Emmerling, last modified by Fabio Almeida on Dec 11, 2015
Go to start of metadata
Purpose
The purpose of this page is to stock and batch determination can be used and
activated and to provide some technical information about both topics.
Overview
The first section provides an overview about the stock determination, including a
short summary of how this function can be used and how it can be activated, the
affected application components are listed and the source code is available. The
second section provides the same information about the batch determination.
Stock Determination
Use
unrestricted-use stock
vendor consignment stock (K)
pipeline material (P)
sales order stock (E)
project stock (Q)
In Customizing for the application you are using, assign a stock determination
rule to the business transaction/event.
Assign a stock determination group to the material in the material master
record.
Customizing
Where to find in Customizing:
==> Materials Management
==> Inventory management and Physical Inventory
==> Stock Determination:
==> Define Strategies for Stock Determination
(1)
==> Assign Stock Determination Rule in the Applications
==> Inventory Management
(2)
In order to work with stock determination, you must configure the following:
EXAMPLE:
- Create stock determination group G001 for plant 0001 using button 'New
Entries'
- Create stock determination rule R001 using button 'New Entries'
- Create entry in stock determination header table using button 'New Entries':
Plant
0001
G001
R001
first header entry
- Create entry in stock determination item table using button 'New Entries':
S
Storage location
Priority
0001
0002
0001
0002
(S= Indicates the stock that stock determination should suggest for withdrawal:
K = consignment stock
F = unrestricted stock
empty (blank) = consignment and unrestricted-use stock
502
RE receipt w/o PO
R001
Material Master
Assign the stock determination group to the required materials in the MRP 2 or
Plant data/storage 2 screen of the material master record.
EXAMPLE: Group G001 assigned to material DUHN.
Overview
Customizing:
1. Stock determination group:
R001
Priority
Storage loc.
Valuation type
F
0001
0002
0001
0002
Material Master: maintain Group 2 (in screen 'MRP2' or 'Plant data/storage 2')
for testmaterial 'DUHN'
Goods Movement
EXAMPLE:
1) Before goods movement:
MMBE:
Plant
0001
250,000
Storage loc.
0001
Vendor consignment in
170,000
0001
60,000
Vendor vend1
45,000
Vendor vend2
15,000
Storage loc.
0002
80,000
2.) Post a goods receipt reversal for material DUHN with movement type 502.
The stock determination will find:
a) Quantity = 100:
SLoc Batch
Val. Type
Available quantity
Vendor
0001
170,000
determ.quan.
100,000
0002
80,000
0001
45,000
VEND1
0001
15,000
VEND2
b) Quantity = 200:
SLoc Batch
Val. Type
Available quantity
Vendor
determ.quan.
0001
170,000
170,000
0002
80,000
30,00
0001
45,000
VEND1
0001
15,000
VEND2
Vendor
c) Quantity = 300:
SLoc Batch
Val. Type
Available quantity
0001
170,000
determ.quan.
170,000
0002
80,000
80,00
0001
45,000
VEND1
45,00
0001
15,000
VEND2
5,00
Integration
MM - IM (Inventory Management)
LE - WM (Warehouse Management)
PP - SFC (Production Orders)
PP - REM (Repetitive Manufacturing)
PP - KAB (Kanban)
LO - BM (Batch Management)
SD (Sales and Distribution)
In Customizing, you can define how stock determination interacts with the
settings of the Warehouse Management System and Batch Determination.
*---------------------------------------------------------------------*
*
FORM LAGERORTDATEN
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
FORM LAGERORTDATEN.
...
* @vsa_cd ende
IF MSEG-CHARG CA STERN OR MSEG-LGORT CA STERN.
det.is active
MESSAGE E116.
ELSE.
"NOTE 180691
PERFORM RETAIL_ARTICLE_SPLIT_CHECK.
"NOTE 180691
ENDIF.
IF MSEG-CHARG CA STERN.
IF DM07M-KZECH IS INITIAL.
IF NOT ( MSEG-SOBKZ EQ SPACE OR
MSEG-SOBKZ EQ O
OR
MSEG-SOBKZ EQ V
OR
MSEG-SOBKZ EQ W
OR
MSEG-SOBKZ EQ E
OR
MSEG-SOBKZ EQ Q
OR
MSEG-SOBKZ EQ K
OR ).
MESSAGE E116.
ENDIF.
IF DM07M-CHSMM IS INITIAL AND NOT MSEG-SOBKZ IS INITIAL
AND DM07M-RULES IS INITIAL.
MESSAGE E116.
ENDIF.
ENDIF.
ELSEIF NOT ( mseg-sobkz EQ space OR
are
mseg-sobkz EQ K
OR
allowed for
mseg-sobkz EQ E
OR
LGORT=*
will
mseg-sobkz EQ Q
).
M7116.
MESSAGE E116.
ENDIF.
XLAUS = X.
DATA X_LGORT LIKE MSEG-LGORT.
X_LGORT = MSEG-LGORT.
Cause
IF X_LGORT CA STERN.
CLEAR MSEG-LGORT.
ENDIF.
IF NOT DM07M-EPRIO IS INITIAL AND DM07M-FAUSW+13(1) = MINUS.
DM07M-FAUSW+13(1) = PUNKT.
ENDIF.
*------ Chargenfindung ber L_IM_BATCH_DETERMINATION_INT
IF MSEG-CHARG CA STERN AND DM07M-KZECH EQ STERN
AND NOT VM07M-XCHPF IS INITIAL.
PERFORM CHARGENBESTIMMUNG_WM_PP.
*------ Chargenfindung ber VB_BATCH_DETERMINATION
ELSEIF MSEG-CHARG CA STERN AND NOT DM07M-CHSMM IS INITIAL
AND NOT VM07M-XCHPF IS INITIAL.
PERFORM CHARGENFINDUNG USING F.
*------ Bestandsfindung ber BF_STOCK_DETERMINATION
ELSEIF NOT DM07M-EPRIO IS INITIAL AND
EPRIO='G001'
-> EXAMPLE:-
-> -SHKZG = H
... MM07MFL0_LAGERORTDATEN
...
Batch Determination
Use
Purpose
A posting is required for all goods movements in Inventory Management in order
to record changes to the quantity and value of stock. You can only use batch
determination for goods issues. Below, you will find some business transactions
during which a goods issue takes place:
To trigger batch determination for goods issues in the older MB* transactions,
enter an asterisk ( * ) in field Batch. In the transaction MIGO the stock
determination icon should be used.
Customizing
You have to make the settings for Batch Determination in Customizing for Batch
Management.
(1)
(3)
(5)
If you wish to use the plant and the material as selection criteria for batch
determination, you should work with 023.
SAP Recommendation: Customer should not change the condition tables
contained in the standard version.
MvT
batch
502
RE receipt w/o PO
Search Check
ME0001
Summary
20 23 Plant/Material
30 22 Movement Type/Material
40 21 Movement Type/Plant
50 21 Movement Type
=> The batch determination will start with the movement type/plant/material
entries.
Material Master
(customizing
- Plant/Material
- Movement Type/Material
- Movement Type/Plant
- Movement Type
You have to choose one of these access sequences. In our example, we choose
'Movement Type/Plant/Material'. On the next screen you have to enter:
- movement type
- plant
- material
After ENTER all customized data for strategy type ME01 will be displayed.
(customizing step 3)
TIP:
If you use a material with classification, you should use the button 'Selection
criteria'. You get a Popup where you can enter the class and afterwards the
values for the class characteristic. During a goods movement, the batch
determination will determine only batches with these class characteristic values.
(MBC1: create search strategy, MBC2: change search strategy, MBC3: display
search strategy)
*---------------------------------------------------------------------*
*
FORM LAGERORTDATEN
*---------------------------------------------------------------------*
*
*---------------------------------------------------------------------*
FORM LAGERORTDATEN.
...
* @vsa_cd ende
IF MSEG-CHARG CA STERN OR MSEG-LGORT CA STERN.
det.is active
"NOTE 180691
PERFORM RETAIL_ARTICLE_SPLIT_CHECK.
"NOTE 180691
ENDIF.
IF MSEG-CHARG CA STERN.
IF DM07M-KZECH IS INITIAL.
IF NOT ( MSEG-SOBKZ EQ SPACE OR
MSEG-SOBKZ EQ O
OR
MSEG-SOBKZ EQ V
OR
will
MSEG-SOBKZ EQ W
OR
MSEG-SOBKZ EQ E
OR
MSEG-SOBKZ EQ Q
OR
MSEG-SOBKZ EQ K
OR ).
Cause M7116.
MESSAGE E116.
ENDIF.
IF DM07M-CHSMM IS INITIAL AND NOT MSEG-SOBKZ IS INITIAL
AND DM07M-RULES IS INITIAL.
MESSAGE E116.
ENDIF.
ENDIF.
ELSEIF NOT ( mseg-sobkz EQ space OR
mseg-sobkz EQ K
OR
mseg-sobkz EQ E
OR
mseg-sobkz EQ Q
).
MESSAGE E116.
ENDIF.
XLAUS = X.
DATA X_LGORT LIKE MSEG-LGORT.
X_LGORT = MSEG-LGORT.
IF X_LGORT CA STERN.
CLEAR MSEG-LGORT.
ENDIF.
IF NOT DM07M-EPRIO IS INITIAL AND DM07M-FAUSW+13(1) = MINUS.
DM07M-FAUSW+13(1) = PUNKT.
ENDIF.
*------ Chargenfindung ber L_IM_BATCH_DETERMINATION_INT
IF MSEG-CHARG CA STERN AND DM07M-KZECH EQ STERN
AND NOT VM07M-XCHPF IS INITIAL.
PERFORM CHARGENBESTIMMUNG_WM_PP.
*------ Chargenfindung ber VB_BATCH_DETERMINATION
ELSEIF MSEG-CHARG CA STERN AND NOT DM07M-CHSMM IS INITIAL ->
EXAMPLE:-CHSMM='ME0001'
AND NOT VM07M-XCHPF IS INITIAL.
-XCHPF='X'
... (MM07MFL0)
LOOP AT YLGORT WHERE NOT XSELP IS INITIAL.
INDEX_Z = INDEX_Z + 1.
IF INDEX_Z = 1.
LIFNR = MSEG-LIFNR.
SOBKZ = MSEG-SOBKZ.
MOVE-CORRESPONDING YLGORT TO DM07M.
function 'VB_BATCH_DETERMINATION'