All tables
tables · table

machineitem

The machineitem table serves as a configuration or mapping table within the ERP system, specifically linking items (parts) to the machines where they are manufactured. It defines production parameters such as daily production capacity (ProdPerDay) and machine setup time (SetTime) for specific item-machine-operation combinations. It is primarily used in production planning, OEE (Overall Equipment Effectiveness) calculations, and process-next-operation logic.

Row count
13
Last entry
Source
tables

Columns

7
ColumnTypeNullableMeaning
indexintegerNOPrimary key/Internal record index
compcodestringNOCompany Code
mccodestringNOMachine Code
itemcodestringNOItem or Part Code
ProdPerDaystringYESStandard production units per day
SetTimenumberYESTime required to set up the machine for this item
oprcodestringYESSpecific operation code performed on the machine

Full documentation

### 1) Overview
 The `machineitem` table serves as a configuration or mapping table within the ERP system, specifically linking items (parts) to the machines where they are manufactured. It defines production parameters such as daily production capacity (`ProdPerDay`) and machine setup time (`SetTime`) for specific item-machine-operation combinations. It is primarily used in production planning, OEE (Overall Equipment Effectiveness) calculations, and process-next-operation logic.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | NO | Primary key/Internal record index | Incremental integers | `PRIMARY KEY` |
 | **compcode** | string | NO | Company Code | e.g., "DAS" | `JOIN`, `WHERE` |
 | **mccode** | string | NO | Machine Code | e.g., "CLG15", "KJ400" | `JOIN` (to dbo.machine) |
 | **itemcode** | string | NO | Item or Part Code | e.g., "CP-024", "ROTOR" | `JOIN` (to dbo.itemmas) |
 | **ProdPerDay** | string | YES | Standard production units per day | Numeric values as strings | `Calculation` |
 | **SetTime** | number | YES | Time required to set up the machine for this item | e.g., 0.0, 1.5 | `Planning` |
 | **oprcode** | string | YES | Specific operation code performed on the machine | e.g., "FORGING" | `JOIN` (to dbo.oprmas) |
 
 ### 3) Relationships & Join Map
 
 The `machineitem` table acts as a bridge between the item master, machine master, and operational logic.
 
 #### Natural Joins (Based on SCHEMA_MAP):
 * **dbo.machine**: Join via `(compcode, mccode)` to retrieve machine details like name, group, or location.
 * **dbo.itemmas / dbo.saleitemmas**: Join via `(compcode, itemcode)` to get part names, weights, or categories.
 * **dbo.oprmas**: Join via `(compcode, oprcode)` to identify the specific process name (e.g., Drilling, CNC).
 * **dbo.MachineOperation**: Join via `(compcode, mccode, oprcode)` to validate valid operations for specific equipment.
 * **dbo.itemopr**: Join via `(compcode, itemcode, oprcode)` to correlate machine assignments with the standard item operation routing.
 
 #### Likely Joins (Inferred from context):
 * **dbo.mactypemas**: Linked indirectly via `dbo.machine.macgroup` to aggregate data by machine type (as seen in stored procedure `OnProcesNextOprQtyHz`).
 * **dbo.product2**: Likely joins on `(compcode, itemcode, mccode)` to compare actual production outputs against the theoretical `ProdPerDay`.