tables · table
rmtype
The rmtype table is a master reference table used to categorize raw materials by their physical form or shape (e.g., Bar, Sheet, Tube, Round). This classification is critical for inventory management, procurement, and manufacturing specifications. It operates at the company level, allowing different configurations for distinct company entities (compcode).
Row count
15
Last entry
—
Source
tables
Columns
5| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Internal primary key for row identification. |
compcode | string | No | Unique identifier for the company/organization unit. |
rmtype | string | No | The descriptive name of the Raw Material Type. |
rmtypeshort | string | Yes | A 1-2 character abbreviated code for the material type. |
shortcode | string | Yes | An alternative short identifier (Likely reserved for future use or legacy integration). |
Full documentation
### 1) Overview The `rmtype` table is a master reference table used to categorize raw materials by their physical form or shape (e.g., Bar, Sheet, Tube, Round). This classification is critical for inventory management, procurement, and manufacturing specifications. It operates at the company level, allowing different configurations for distinct company entities (`compcode`). ### 2) Column dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Internal primary key for row identification. | Auto-incrementing integers | `ORDER BY index` | | **compcode** | string | No | Unique identifier for the company/organization unit. | "DAS", "PDS" | `WHERE compcode = 'DAS'` | | **rmtype** | string | No | The descriptive name of the Raw Material Type. | "BAR", "SHEET", "TUBE", "ROUND", "ROD", etc. | `JOIN itemmas ON ...rmtype = ...rmtype` | | **rmtypeshort** | string | Yes | A 1-2 character abbreviated code for the material type. | "B", "SH", "T", "R", "RD" | Used in UI or compact reports. | | **shortcode** | string | Yes | An alternative short identifier (Likely reserved for future use or legacy integration). | Null in provided data. | Filter or secondary grouping. | ### 3) Relationships & join map The `rmtype` table serves as a validation and lookup source for material shapes across the engineering and inspection modules. #### Logical Joins * **dbo.itemmas**: Joins on `rmtype` and `compcode`. This allows the system to link specific items to their material shape classification. * **dbo.pdiinspectionhdr**: Joins on `rmtype` and `compcode`. Used to reference the material type during Pre-Despatch Inspection or incoming material quality checks. * **dbo.saleitemmas**: Likely joins via `RMTypeCOde` (Likely mapping to `rmtype` or `rmtypeshort`). * **Company Configuration Tables**: Joins via `compcode` to filter material types available for specific company logic. #### Join Examples ```sql -- Fetching item details along with their full RM Type description SELECT i.itemcode, i.itemname, r.rmtype, r.rmtypeshort FROM dbo.itemmas i INNER JOIN dbo.rmtype r ON i.rmtype = r.rmtype AND i.compcode = r.compcode; -- Filtering inspection reports for a specific material shape SELECT h.irno, h.itemcode, r.rmtype FROM dbo.pdiinspectionhdr h INNER JOIN dbo.rmtype r ON h.rmtype = r.rmtype AND h.compcode = r.compcode WHERE r.rmtype = 'BAR'; ```