IN_WO_PRC_VW

(SQL View)
Index Back

Previously canceled Pegs

11/05/04 SR/ISC: Created

SELECT IDH.BUSINESS_UNIT %Concat X.PEG_KEY_SEPARATOR %Concat IDH.WO_ID , %NUMTOCHAR(IDH.WO_TASK_ID) %Concat X.PEG_KEY_SEPARATOR %Concat %NUMTOCHAR(IDH.RES_LN_NBR) , %DatePart(IP.DMD_DTTM) , ID.QTY_SCHEDULED , SUM(IP.QTY_PEGGED) ,ID.BUSINESS_UNIT_IN , ID.UNIT_MEASURE_STD , IP.DMD_ORDER_TYPE FROM PS_IN_PEGGING IP , PS_WM_WO_MAT_HASH IDH , PS_WM_WO_SCHED_MAT ID , PS_INSTALLATION_IN X WHERE IP.DEMAND_HASH = IDH.HASH_KEY AND IP.DMD_ORDER_TYPE = '110' AND IDH.BUSINESS_UNIT = ID.BUSINESS_UNIT AND IDH.WO_ID = ID.WO_ID AND IDH.WO_TASK_ID = ID.WO_TASK_ID AND IDH.RES_LN_NBR = ID.RES_LN_NBR AND ID.QTY_SCHEDULED > 0 AND WO_COMMIT_FLAG < '3' AND IP.PEG_STATUS = '10' AND EXISTS ( SELECT 'X' FROM PS_IN_PEGGING IP2 , PS_WM_WO_MAT_HASH IDH2 WHERE IP2.DEMAND_HASH = IDH2.HASH_KEY AND IP2.DMD_ORDER_TYPE = '110' AND IP2.PEG_STATUS = '30' AND IDH2.BUSINESS_UNIT = ID.BUSINESS_UNIT AND IDH2.WO_ID = ID.WO_ID AND IDH2.WO_TASK_ID = ID.WO_TASK_ID AND IDH2.RES_LN_NBR = ID.RES_LN_NBR) GROUP BY IDH.BUSINESS_UNIT, IDH.WO_ID, IDH.WO_TASK_ID, IDH.RES_LN_NBR , IP.DMD_DTTM, ID.QTY_SCHEDULED, IP.DMD_DTTM, X.PEG_KEY_SEPARATOR, ID.BUSINESS_UNIT_IN , ID.UNIT_MEASURE_STD, ID.QTY_SCHEDULED , 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