tables · table
oprmas
The oprmas table serves as the central Operation Master in the database. Its primary role is to define and categorize all possible manufacturing and industrial processes (operations) such as "CNC Turning," "Surface Grinding," "Annealing," and "Acid Cleaning."
Row count
289
Last entry
—
Source
tables
Columns
8| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | NO | Primary Key |
compcode | string | YES | Company Code |
oprcode | string | YES | Operation Unique Code |
oprname | string | YES | Operation Name |
username | string | YES | Created/Modified By |
maccode | string | YES | Default Machine Code |
stationcode | string | YES | Work Station Code |
opsc | string | YES | Operation Shorthand |
Full documentation
### 1) Overview The `oprmas` table serves as the central **Operation Master** in the database. Its primary role is to define and categorize all possible manufacturing and industrial processes (operations) such as "CNC Turning," "Surface Grinding," "Annealing," and "Acid Cleaning." It acts as a lookup table that maps alphanumeric operation codes (`oprcode`) to descriptive names (`oprname`) and associates them with specific machines or work stations. This table is critically referenced across production logs, dispatch details, quality inspections, and subcontracting (job work) modules to provide human-readable context to process steps. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | NO | Primary Key | 0, 1, 2... | Internal system ID. | | **compcode** | string | YES | Company Code | "DAS", "BAM", etc. | Used to filter data by specific business units. | | **oprcode** | string | YES | Operation Unique Code | "CNC1", "CLEAN", "ANN" | Primary unique identifier for an operation type. | | **oprname** | string | YES | Operation Name | "SURFACE GRINDING" | Human-readable label used in reports and UI. | | **username** | string | YES | Created/Modified By | "system", "design" | Audit trail of the user who managed the record. | | **maccode** | string | YES | Default Machine Code | "CUT" | Links an operation to a specific machine category. | | **stationcode** | string | YES | Work Station Code | "CNC", "nzp" | Physical location or functional station for the process. | | **opsc** | string | YES | Operation Shorthand | "AN", "BK", "CF" | Likely a legacy or specific internal shorthand code. | ### 3) Relationships & Join Map The `oprmas` table is a fundamental reference entity. To retrieve descriptive operation names, it should be joined with production and item configuration tables using the composite key `compcode` and `oprcode`. #### Primary Joins (Authorized by SCHEMA_MAP) * **dbo.itemopr**: Maps specific items to their routing steps. * `oprmas.compcode = itemopr.compcode` AND `oprmas.oprcode = itemopr.oprcode` * **dbo.MachineOperation**: Defines which operations can be performed on specific machines. * `oprmas.compcode = MachineOperation.compcode` AND `oprmas.oprcode = MachineOperation.oprcode` * **dbo.RMproduct1 / dbo.product2**: Production transaction tables recording completed work. * `oprmas.compcode = RMproduct1.compcode` AND `oprmas.oprcode = RMproduct1.oprcode` * **dbo.invdespdtl**: Invoice/Dispatch details showing the specific operation being billed (Job Work). * `oprmas.compcode = invdespdtl.compcode` AND `oprmas.oprcode = invdespdtl.oprcode` * **dbo.job / dbo.jobdtl**: Subcontracting (Job Work) tracking. * `oprmas.compcode = job.compcode` AND `oprmas.oprcode = job.oprcode` * **dbo.operatormas**: Associates specific operators with their primary operation codes. * `oprmas.compcode = operatormas.compcode` AND `oprmas.oprcode = operatormas.oprcode` * **dbo.vitemopr**: Vendor-specific rates for specific operations. * `oprmas.compcode = vitemopr.compcode` AND `oprmas.oprcode = vitemopr.oprcode` #### Contextual Usage (Stored Procedures) Based on `REFERENCE_JSON`, this table is frequently joined inside reports such as `jobwork_audit`, `nickelconsumption_det_itemwise`, and `ProductionOEEIst` to provide `oprname` for analytical output.