IN_DMD_OP_VW(SQL View) |
Index Back |
---|---|
Overpegged Orders10/05/04 SR/ISC: Created |
SELECT ID.SOURCE_BUS_UNIT %Concat X.PEG_KEY_SEPARATOR %Concat ID.ORDER_NO , ID.DEMAND_SOURCE %Concat X.PEG_KEY_SEPARATOR %Concat %NUMTOCHAR(ID.ORDER_INT_LINE_NO) %Concat X.PEG_KEY_SEPARATOR %Concat %NUMTOCHAR(ID.SCHED_LINE_NBR) %Concat X.PEG_KEY_SEPARATOR %Concat %NUMTOCHAR(ID.DEMAND_LINE_NO) , %DatePart(ID.SCHED_DTTM) , ID.QTY_REQUESTED_BASE - ID.QTY_BACKORDER_BASE , SUM(IP.QTY_PEGGED) , ID.BUSINESS_UNIT , MST.UNIT_MEASURE_STD , IP.DMD_ORDER_TYPE FROM PS_IN_PEGGING IP , PS_IN_DEMAND_HASH IDH , PS_IN_DEMAND ID , PS_INSTALLATION_IN X , PS_MASTER_ITEM_TBL MST , PS_BU_ITEMS_INV A , PS_SET_CNTRL_REC C WHERE IP.DEMAND_HASH = IDH.HASH_KEY AND IP.DMD_ORDER_TYPE IN ('030', '070', '090') AND IP.PEG_STATUS = '10' AND IDH.BUSINESS_UNIT = ID.BUSINESS_UNIT AND IDH.DEMAND_SOURCE = ID.DEMAND_SOURCE AND IDH.SOURCE_BUS_UNIT = ID.SOURCE_BUS_UNIT AND IDH.ORDER_NO = ID.ORDER_NO AND IDH.ORDER_INT_LINE_NO = ID.ORDER_INT_LINE_NO AND IDH.SCHED_LINE_NBR = ID.SCHED_LINE_NBR AND IDH.INV_ITEM_ID = ID.INV_ITEM_ID AND IDH.DEMAND_LINE_NO = ID.DEMAND_LINE_NO AND ID.QTY_REQUESTED_BASE - ID.QTY_ALLOC_BASE - ID.QTY_BACKORDER_BASE > 0 AND A.BUSINESS_UNIT = C.SETCNTRLVALUE AND C.RECNAME = 'MASTER_ITEM_TBL' AND MST.SETID = C.SETID AND A.INV_ITEM_ID = MST.INV_ITEM_ID AND ID.BUSINESS_UNIT = C.SETCNTRLVALUE AND IDH.INV_ITEM_ID = MST.INV_ITEM_ID GROUP BY ID.SOURCE_BUS_UNIT, ID.ORDER_NO, ID.DEMAND_SOURCE, ID.ORDER_INT_LINE_NO, ID.SCHED_LINE_NBR, ID.DEMAND_LINE_NO, ID.SCHED_DTTM, X.PEG_KEY_SEPARATOR, ID.QTY_REQUESTED_BASE, ID.QTY_ALLOC_BASE, ID.QTY_BACKORDER_BASE , ID.BUSINESS_UNIT , MST.UNIT_MEASURE_STD, IP.DMD_ORDER_TYPE |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | DMD_ORDER_KEY | Character(25) | VARCHAR2(25) NOT NULL | Used to store the various Order Number formats in 1 field |
2 | DMD_LINE_KEY | Character(25) | VARCHAR2(25) NOT NULL | Used to Store the concatenation of Line, Demand, Sched, Kit, etc in 1 field. |
3 | SCHED_DATE | Date(10) | DATE | Schedule Date |
4 | QTY_OPEN | Number(16,4) | DECIMAL(15,4) NOT NULL | Open Quantity |
5 | QTY_PEGGED | Signed Number(17,4) | DECIMAL(15,4) NOT NULL | 06/16/04 EGS: Created. |
6 | BUSINESS_UNIT_IN | Character(5) | VARCHAR2(5) NOT NULL | Inventory Unit |
7 | UNIT_MEASURE_STD | Character(3) | VARCHAR2(3) NOT NULL | Standard Unit of Measure |
8 | DMD_ORDER_TYPE | Character(4) | VARCHAR2(4) NOT NULL |
Used by Pegging Maintenance/Inquiry
030=Transfer Demand 070=Stock Request 090=Sales Order 110=Work Order Inventory 115=WO Non-Inventory 900=Work Order |