All tables
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
ColumnTypeNullableMeaning
indexintegerNOPrimary key unique identifier
compcodestringNOInternal company identifier
returnnointegerNOUnique document number for the return
returndatedatetimeNODate the material was returned
issuenointegerYESThe original Issue Slip/Job Card number
jobnointegerYESAssociated Job number (often 0 if unused)
mrpnointegerYESMaterial Requirement Planning number
rmcodestringYESPhysical raw material identifier
chnointegerYESChallan number or sub-identifier
returnwtnumberYESThe weight of the returned end piece
remarksstringYESDescriptive notes
usernamestringYESUser who recorded the return
useraddstringYESUser who added the record
addtimestringYESTimestamp of record creation
usermodstringYESUser who last modified the record
modtimestringYESTimestamp of last modification
printflagstringYESFlag indicating if document was printed
gpnostringYESGate Pass number
gpdatestringYESGate Pass date
authflagstringYESAuthorization status
reasonstringYESReason for return
locationstringYESPhysical storage location
ReturnTypestringYESClassification 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`).