Second, the batch master
2.1 Batch Master Data
When you enable batch management for material, you can use batch feature, in SAP systems, batch and materials are the same as the primary data, but also an organized framework, organizational structure batches include: material, plant, storage location. Can use transaction code MSC3N to view the batch master data,
Batch master data includes organizational structure, and basic data 1 , the data base 2 , classification, material data, change the view, the following major elements:
-
Basic data 1
Production date, shelf life expiration date, assessment type, vendor, supplier batch, the last receipt (ie the latest date of receipt) ......
-
Basic data 2
Text description, reserved for date fields ......
-
classification
Class A, category, feature, characteristic values
-
Material Data
Identifies the total shelf life, remaining shelf life, during ......
-
change
Change history, change documents
2.2 Creating batch master data
Create a batch master data in the following three ways:
1) Transaction code MSC1N (created manually)
2) goods movement (created automatically)
101 receipt purchase order
501 no purchase order receipt
561 Initial Stock
……
3) Production Order / Work Order
Create a new batch of three ways to configure path: SPRO-> Logistics - General -> Batch Management -> Create a new batch
Wherein the movement of goods to create a new batch and a new batch is manually created configuration defines the generation and checking new batch manner.
Batch master data is dependent on the material master data, be sure to specify a material when creating batch master data.
2.3 batch number
Batch master number to the internal and external to the two encoding number, the batch number may be numbers and characters. In IMG path SPRO-> Logistics - General -> Batch Management -> assigned batch number of the program to exit the batch number configuration mode, and encoding range encoding range,
SAP system offers four batches user exit number range, enhanced to SAPLV01Z ,
The following two users for automatically dispensing outlet Batch number:
Ø EXIT_SAPLV01Z_001 ;
Ø EXIT_SAPLV01Z_002 ;
The following two user for manual dispensing outlet Batch number:
Ø EXIT_SAPLV01Z_003 ;
Ø EXIT_SAPLV01Z_004 ;
Application of these four user exit not discussed in detail, encountered in the work treat specific conditions.
Custom export numbers range segment. Enhanced to SAPLV01Z
SAPLV01Z includes two outlets, namely: EXIT_SAPLV01Z_001 and EXIT_SAPLV01Z_002
SAP provides six examples.
1. Copy the production order number to the batch number.
2. Copy the sales order number to the batch number.
3. batch number assigned by material type.
4. Material according to batch number number allocated.
The batch number comprises date.
6. The plant comprises a number of batch number.
1.2.3.4 can be achieved by EXIT_SAPLV01Z_001.
1.2.5.6 can be achieved by EXIT_SAPLV01Z_002.
Example: Date of increase in number.
CMOD: create enhanced
Code Example:
-
DATA NUM(10) TYPE C.
-
CLEAR:NUM.
-
IF X_BNCOM-MTART =
'FERT'.
-
-
CONCATENATE
'The
SY-DATE +
3
(
5
) NEW_CHARG +
6
(
4
) INTO NUM.
-
NEW_CHARG = NUM.
-
-
ELSEIF X_BNCOM-MTART =
'SPIRIT'
.
-
CONCATENATE
'R'
AND Datum +
3
(
5
) NEW_CHARG +
6
(
4
) black NUM.
-
NEW_CHARG = NUM.
-
endif.
-
You can press the material type.
Actual Projects:
Enhanced by batch export for external batch to batch No. writing code rule
Enhanced export program: EXIT_SAPLV01Z_003. , EXIT_SAPLV01Z_004
Each batch factory defined set of encoding rules, the coding rule is: In ( 4 ) + month ( 2 ) + 1999 ( 2 ) + 4 -bit serial number, there are two cases when defining the following encoding rules:
1. Depending on the plant (MARC-WERKS) = "HD *" encoding rules: Year (4) + month (2) + Day (2) + 4-bit serial number, four serial number to increase material code (MARC-MATNR ) is determined to find the latest batch material code number (MCHA-CHARG), then the original batch number incremented by 1 above, if four serial number 9999 is the number on the next batch of 0001.
2. Other factories encoding rules: year (4) + month (2) + Day (2) + 4-bit serial number, serial number automatically increments from 0001 based on daily date.
20,120,808 Add:
Transfer Order in the processing company (Z009) during storage (movement type 101), a library required to follow the original batch number, you can not use the new batch number, and this requirement is currently normal procurement batch orders when there is enhanced storage the conflict, it is necessary to adjust the current batch is enhanced logic receipt, the receipt order type Z009 automatically generates corresponding masked logic batch.