tables · table
rmreturnendpcsinhouse
The rmreturnendpcsinhouse table is a transaction ledger used to track the return of "End Pieces" (remnant raw material) from the production floor back to the warehouse or in-house storage. This table is critical for calculating material yields and maintaining accurate Job Card balances. It captures the specific weight of returned raw material associated with an issue document (issueno) and a material planning number (mrpno).
Row count
6,657
Last entry
2026-01-13
Source
tables
Columns
23| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | NO | Primary key unique identifier |
compcode | string | NO | Internal company identifier |
returnno | integer | NO | Unique document number for the return |
returndate | datetime | NO | Date the material was returned |
issueno | integer | YES | The original Issue Slip/Job Card number |
jobno | integer | YES | Associated Job number (often 0 if unused) |
mrpno | integer | YES | Material Requirement Planning number |
rmcode | string | YES | Physical raw material identifier |
chno | integer | YES | Challan number or sub-identifier |
returnwt | number | YES | The weight of the returned end piece |
remarks | string | YES | Descriptive notes |
username | string | YES | User who recorded the return |
useradd | string | YES | User who added the record |
addtime | string | YES | Timestamp of record creation |
usermod | string | YES | User who last modified the record |
modtime | string | YES | Timestamp of last modification |
printflag | string | YES | Flag indicating if document was printed |
gpno | string | YES | Gate Pass number |
gpdate | string | YES | Gate Pass date |
authflag | string | YES | Authorization status |
reason | string | YES | Reason for return |
location | string | YES | Physical storage location |
ReturnType | string | YES | Classification of return |
Full documentation
### 1) Overview The `rmreturnendpcsinhouse` table is a transaction ledger used to track the return of "End Pieces" (remnant raw material) from the production floor back to the warehouse or in-house storage. This table is critical for calculating material yields and maintaining accurate Job Card balances. It captures the specific weight of returned raw material associated with an issue document (`issueno`) and a material planning number (`mrpno`). Usage context from stored procedures: * Used in **Job Card Pendency** reports to calculate `EndPcsWT` to determine remaining job card balance. * Included in **Raw Material Requirement Generation** (`RMREQGen`) to adjust available stock. * Featured in **Scrap and Actual Yield** reports (`ScrapCalculationReport_actual`) where end pieces are treated as non-consumed weight. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | NO | Primary key unique identifier | | PK | | **compcode** | string | NO | Internal company identifier | e.g., "DAS", "RF2" | Join key to `company` | | **returnno** | integer | NO | Unique document number for the return | | Document reference | | **returndate** | datetime | NO | Date the material was returned | | Temporal filtering | | **issueno** | integer | YES | The original Issue Slip/Job Card number | | Join to `mchdr`, `rmmchdr` | | **jobno** | integer | YES | Associated Job number (often 0 if unused) | | Join to `job` | | **mrpno** | integer | YES | Material Requirement Planning number | | Join to `rmincoming`, `rmmrphdr` | | **rmcode** | string | YES | Physical raw material identifier | e.g., "ROD39.50" | Join to `rmmas` | | **chno** | integer | YES | Challan number or sub-identifier | | Reference | | **returnwt** | number | YES | The weight of the returned end piece | | Aggregates (SUM) | | **remarks** | string | YES | Descriptive notes | e.g., "END PCS" | | | **username** | string | YES | User who recorded the return | | Audit | | **useradd** | string | YES | User who added the record | | Audit | | **addtime** | string | YES | Timestamp of record creation | | Audit | | **usermod** | string | YES | User who last modified the record | | Audit | | **modtime** | string | YES | Timestamp of last modification | | Audit | | **printflag** | string | YES | Flag indicating if document was printed | | | | **gpno** | string | YES | Gate Pass number | | Reference | | **gpdate** | string | YES | Gate Pass date | | Reference | | **authflag** | string | YES | Authorization status | "Y", "N" | Filter | | **reason** | string | YES | Reason for return | | | | **location** | string | YES | Physical storage location | | Join to `location` | | **ReturnType** | string | YES | Classification of return | | | ### 3) Relationships & Join Map The table serves as a bridge between production consumption and inventory management. #### Primary Joins (Authoritative): * **Raw Material Master:** `rmreturnendpcsinhouse.rmcode` -> `rmmas.rmcode` (and `compcode`). Used to retrieve material names and grades. * **Machine Issue Header:** `rmreturnendpcsinhouse.issueno` -> `mchdr.issueno` (and `compcode`). Used to associate returns with specific machine issuance. * **Material Planning:** `rmreturnendpcsinhouse.mrpno` -> `rmmrphdr.mrpno` (and `compcode`). Used to track material lifecycle by MRP lot. * **Job Processing:** `rmreturnendpcsinhouse.jobno` -> `job.jobno` (and `compcode`). #### Likely Joins (Inferred from usage): * **Production:** `rmreturnendpcsinhouse.issueno` -> `product2.issueno`. Used to calculate net consumption: `(IssueWt - ProdWt - EndPcsWt)`. * **Location Master:** `rmreturnendpcsinhouse.location` -> `location.location` (and `compcode`).