IN_XRS_OP_VW

(SQL View)
Index Back

Overpegged Orders

11/08/04 SR/ISC: Created

SELECT ID.BUSINESS_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(IP.SUP_DTTM) , ID.QTY_REQUESTED_BASE - ID.QTY_BACKORDER_BASE , SUM(IP.QTY_PEGGED) , ID.DESTIN_BU , MST.UNIT_MEASURE_STD , IP.SUP_ORDER_TYPE FROM PS_IN_PEGGING IP , PS_IN_DEMAND_HASH IPH , PS_IN_DEMAND ID , PS_INSTALLATION_IN X , PSXLATITEM XL2 , PS_MASTER_ITEM_TBL MST , PS_BU_ITEMS_INV A , PS_SET_CNTRL_REC C WHERE IP.SUPPLY_HASH = IPH.HASH_KEY AND IP.SUP_ORDER_TYPE = '035' AND IP.PEG_STATUS = '10' AND IPH.BUSINESS_UNIT = ID.BUSINESS_UNIT AND IPH.ORDER_NO = ID.ORDER_NO AND IPH.ORDER_INT_LINE_NO = ID.ORDER_INT_LINE_NO AND IPH.SCHED_LINE_NBR = ID.SCHED_LINE_NBR AND IPH.INV_ITEM_ID = ID.INV_ITEM_ID AND IPH.DEMAND_LINE_NO = ID.DEMAND_LINE_NO AND XL2.FIELDVALUE = IP.SUP_ORDER_TYPE AND XL2.FIELDNAME = 'SUP_ORDER_TYPE' AND XL2.EFF_STATUS = 'A' 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.DESTIN_BU = C.SETCNTRLVALUE AND ID.INV_ITEM_ID = A.INV_ITEM_ID GROUP BY ID.BUSINESS_UNIT, ID.ORDER_NO, ID.DEMAND_SOURCE, ID.SOURCE_BUS_UNIT, ID.ORDER_INT_LINE_NO, ID.SCHED_LINE_NBR, ID.INV_ITEM_ID, ID.DEMAND_LINE_NO, IP.SUP_DTTM, ID.QTY_REQUESTED_BASE, ID.QTY_BACKORDER_BASE, X.PEG_KEY_SEPARATOR, IP.SUP_ORDER_TYPE, ID.DESTIN_BU, MST.UNIT_MEASURE_STD

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SUP_ORDER_KEY Character(25) VARCHAR2(25) NOT NULL Used to store the various Order Number formats in 1 field
2 SUP_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 SUP_ORDER_TYPE Character(4) VARCHAR2(4) NOT NULL Used by Pegging Maintenance/Inquiry
010=Purchase
020=Production
035=Transfer Supply
100=Requisition