09/28/04 EGS: Created.

IN_DMD_PRO_DPVW

(SQL View)
Index Back

SELECT B.BUSINESS_UNIT , B.DEMAND_SOURCE , B.SOURCE_BUS_UNIT , B.ORDER_NO , B.ORDER_INT_LINE_NO , B.SCHED_LINE_NBR , B.INV_ITEM_ID , B.DEMAND_LINE_NO , C.BUSINESS_UNIT , C.PRODUCTION_ID , C.MG_OUTPUT_TYPE , C.MG_OUTPUT_ITEM , C.OP_SEQUENCE , C.MG_OUTPUT_QTY_CODE , D.HASH_KEY , '020' , C.MG_OUTPUT_SCHD_QTY , BB.QTY_PEGGED , SUM(E.QTY_PEGGED) - BB.QTY_PEGGED , C.MG_OUTPUT_SCHD_QTY , BB.QTY_RECEIVED , BB.QTY_COMPLETE , C.COMPLETED_QTY , 'Y' , SPH.NEW_END_DATE , SPH.NEW_END_TIME , %Dttm(SPH.NEW_END_DATE, SPH.NEW_END_TIME) , BB.HARD_PEG , BB.PEG_STATUS , BB.DT_TIMESTAMP FROM PS_IN_DEMAND_HASH B , PS_IN_PEGGING BB , PS_SF_OUTPUT_LIST C , PS_SF_PRDNID_HEADR SPH , PS_SF_OUTPUT_HASH D , PS_IN_PEGGING E WHERE B.HASH_KEY = BB.DEMAND_HASH AND BB.DMD_ORDER_TYPE IN ('030', '070', '090') AND D.HASH_KEY = BB.SUPPLY_HASH AND BB.SUP_ORDER_TYPE = '020' AND C.BUSINESS_UNIT = D.BUSINESS_UNIT AND C.PRODUCTION_ID = D.PRODUCTION_ID AND C.MG_OUTPUT_TYPE = D.MG_OUTPUT_TYPE AND C.MG_OUTPUT_ITEM = D.MG_OUTPUT_ITEM AND C.OP_SEQUENCE = D.OP_SEQUENCE AND C.MG_OUTPUT_QTY_CODE = D.MG_OUTPUT_QTY_CODE AND SPH.BUSINESS_UNIT = C.BUSINESS_UNIT AND SPH.PRODUCTION_ID = C.PRODUCTION_ID AND E.SUPPLY_HASH = BB.SUPPLY_HASH AND E.SUP_ORDER_TYPE = '020' AND ((E.PEG_STATUS < '30' AND BB.PEG_STATUS < '30') OR BB.PEG_STATUS = '30') GROUP BY B.BUSINESS_UNIT , B.ORDER_NO, B.DEMAND_SOURCE, B.SOURCE_BUS_UNIT, B.ORDER_INT_LINE_NO, B.SCHED_LINE_NBR, B.INV_ITEM_ID , B.DEMAND_LINE_NO, C.BUSINESS_UNIT, C.PRODUCTION_ID, C.MG_OUTPUT_TYPE, C.MG_OUTPUT_ITEM, C.OP_SEQUENCE, C.MG_OUTPUT_QTY_CODE, D.HASH_KEY, C.MG_OUTPUT_SCHD_QTY, C.COMPLETED_QTY, BB.QTY_PEGGED, BB.QTY_RECEIVED, BB.QTY_COMPLETE, SPH.NEW_END_DATE, SPH.NEW_END_TIME, BB.HARD_PEG, BB.PEG_STATUS, BB.DT_TIMESTAMP

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT_IN Character(5) VARCHAR2(5) NOT NULL Inventory Unit
2 DEMAND_SOURCE Character(2) VARCHAR2(2) NOT NULL Demand Source
IN=Material Request
OM=Sales Order
PL=Planning Requisition
PO=Purchase Order
PR=Purchasing Requisition
RT=Material Return
SF=Production Request
WM=Work Order
3 SOURCE_BUS_UNIT Character(5) VARCHAR2(5) NOT NULL Source Bus Unit
4 ORDER_NO Character(10) VARCHAR2(10) NOT NULL Identifies a customer order number that appears as a reference on a receivables pending item. Date Initials Issue Description 022701 mv SP2 (F-CJORGENS-3) CSR Desktop
5 ORDER_INT_LINE_NO Number(5,0) INTEGER NOT NULL Order Line
6 SCHED_LINE_NBR Number(6,0) INTEGER NOT NULL Schedule Line Number
7 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
8 DEMAND_LINE_NO Number(4,0) SMALLINT NOT NULL Demand Line No
9 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
10 PRODUCTION_ID Character(10) VARCHAR2(10) NOT NULL Production ID
11 MG_OUTPUT_TYPE Character(2) VARCHAR2(2) NOT NULL 10/22/98 (CN#EN800-6.0) LAJ...Created Stores the output item type on a Bill of Materials. The type could represent either a co-product (primary or secondary) or a by-product (waste or recycle). 11/23/98 (CN#SF800-13) JNW added teardown xlat
CP=Primary
CS=Co-Product
RB=Recycle
TD=Teardown
WB=Waste
12 MG_OUTPUT_ITEM Character(18) VARCHAR2(18) NOT NULL 04/10/00 (Internet Architecture) SCC: Uppercase label Id. 10/22/98 (CN#EN800-6.0) LAJ...Created Stores the output item number on a Bill of Materials. This item may be either a co-product or a by-product on the BOM. The output type field determines which one it represents. There should always be at least one output item on the BOM at all times; this output item is the same as the BOMs item id.
13 OP_SEQUENCE Number(4,0) SMALLINT NOT NULL Operation Sequence
14 MG_OUTPUT_QTY_CODE Character(3) VARCHAR2(3) NOT NULL 01/28/98 (CN#EN800-6.0) LAJ...Created Stores the quantity code for an output item on a Bill of Materials. It was created with the same values as qty_code, but by separating these two fields, it allows greater flexibility in the future.
ASY=Assembly
ORD=Order
15 PEG_HASH Character(28) VARCHAR2(28) NOT NULL 07/29/04 EGS: Created
16 PEG_ORDER_TYPE Character(4) VARCHAR2(4) NOT NULL Used by Pegging Maintenance/Inquiry
010=Purchase
020=Production
030=Transfer Demand
035=Transfer Supply
070=Stock Request
090=Sales Order
100=Requisition
110=WO Inventory
115=WO Non-Inventory
17 QTY_AVAILABLE Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Available
18 QTY_PEGGED Signed Number(17,4) DECIMAL(15,4) NOT NULL 06/16/04 EGS: Created.
19 BAD_PEG_QTY Signed Number(17,4) DECIMAL(15,4) NOT NULL Bad Pegged Quantity
20 QTY_ORDER Signed Number(17,4) DECIMAL(15,4) NOT NULL 06/21/04 EGS: Created
21 QTY_RECEIVED Number(16,4) DECIMAL(15,4) NOT NULL Received Qty
22 QTY_COMPLETE_PEG Number(16,4) DECIMAL(15,4) NOT NULL Quantity Complete
23 QTY_COMPLETE Number(16,4) DECIMAL(15,4) NOT NULL Quantity Complete
24 PEG_FLAG Character(1) VARCHAR2(1) NOT NULL 06/17/04 EGS: Created.
25 SCHED_DATE Date(10) DATE Schedule Date
26 SCHED_TIME Time(15) TIMESTAMP Schedule Time
27 SCHED_DTTM DateTime(26) TIMESTAMP 08/16/01 JNW (CN#PL900-1.0): Added
28 HARD_PEG Character(1) VARCHAR2(1) NOT NULL 09/01/04 EGS: Created
29 PEG_STATUS Character(2) VARCHAR2(2) NOT NULL 07/21/04 EGS: Created
10=Open
20=Completed
30=Canceled
40=Not Pegged
30 DT_TIMESTAMP DateTime(26) TIMESTAMP Date Timestamp