IN_PEG_DMD_PRVW

(SQL View)
Index Back

Pegging Table

06/16/04 EGS: Created.

SELECT A.BUSINESS_UNIT , A.DEMAND_SOURCE , A.SOURCE_BUS_UNIT , A.ORDER_NO , A.ORDER_INT_LINE_NO , A.SCHED_LINE_NBR , A.INV_ITEM_ID , A.DEMAND_LINE_NO , D.BUSINESS_UNIT , D.PRODUCTION_ID , D.MG_OUTPUT_TYPE , D.OP_SEQUENCE , D.MG_OUTPUT_QTY_CODE , B.SUP_ORDER_TYPE , B.SUPPLY_HASH , D.BUSINESS_UNIT %Concat X.PEG_KEY_SEPARATOR %Concat D.PRODUCTION_ID , D.MG_OUTPUT_ITEM , D.MG_OUTPUT_SCHD_QTY - D.COMPLETED_QTY , B.QTY_PEGGED , B.QTY_RECEIVED , B.QTY_COMPLETE , 'Y' , E.NEW_END_DATE , B.PEG_STATUS , B.OPRID , B.DT_TIMESTAMP , B.HARD_PEG , %DatePart(F.SCHED_DTTM) FROM PS_IN_DEMAND_HASH A , PS_IN_PEGGING B , PS_SF_OUTPUT_HASH C , PS_SF_OUTPUT_LIST D , PS_SF_PRDNID_HEADR E , PS_IN_DEMAND F , PS_INSTALLATION_IN X WHERE A.HASH_KEY = B.DEMAND_HASH AND B.SUPPLY_HASH = C.HASH_KEY AND B.SUP_ORDER_TYPE = '020' AND D.BUSINESS_UNIT = C.BUSINESS_UNIT AND D.PRODUCTION_ID = C.PRODUCTION_ID AND D.MG_OUTPUT_TYPE = C.MG_OUTPUT_TYPE AND D.MG_OUTPUT_ITEM = C.MG_OUTPUT_ITEM AND D.OP_SEQUENCE = C.OP_SEQUENCE AND D.MG_OUTPUT_QTY_CODE = C.MG_OUTPUT_QTY_CODE AND D.BUSINESS_UNIT = E.BUSINESS_UNIT AND D.PRODUCTION_ID = E.PRODUCTION_ID AND F.BUSINESS_UNIT = A.BUSINESS_UNIT AND F.DEMAND_SOURCE = A.DEMAND_SOURCE AND F.SOURCE_BUS_UNIT = A.SOURCE_BUS_UNIT AND F.ORDER_NO = A.ORDER_NO AND F.ORDER_INT_LINE_NO = A.ORDER_INT_LINE_NO AND F.SCHED_LINE_NBR = A.SCHED_LINE_NBR AND F.INV_ITEM_ID = A.INV_ITEM_ID AND F.DEMAND_LINE_NO = A.DEMAND_LINE_NO

# 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 OP_SEQUENCE Number(4,0) SMALLINT NOT NULL Operation Sequence
13 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
14 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
15 PEG_HASH Character(28) VARCHAR2(28) NOT NULL 07/29/04 EGS: Created
16 PEG_ORDER_KEY Character(30) VARCHAR2(30) NOT NULL Used to store the various Order Number formats in 1 field
17 PEG_LINE_KEY Character(30) VARCHAR2(30) NOT NULL Used to Store the concatenation of Line, Demand, Sched, Kit, etc in 1 field.
18 QTY_AVAILABLE Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Available
19 QTY_PEGGED Signed Number(17,4) DECIMAL(15,4) NOT NULL 06/16/04 EGS: Created.
20 QTY_RECEIVED Number(16,4) DECIMAL(15,4) NOT NULL Received Qty
21 QTY_COMPLETE Number(16,4) DECIMAL(15,4) NOT NULL Quantity Complete
22 PEG_FLAG Character(1) VARCHAR2(1) NOT NULL 06/17/04 EGS: Created.
23 SCHED_DATE Date(10) DATE Schedule Date
24 PEG_STATUS Character(2) VARCHAR2(2) NOT NULL 07/21/04 EGS: Created
10=Open
20=Completed
30=Canceled
40=Not Pegged

Default Value: 10

25 OPRID Character(30) VARCHAR2(30) NOT NULL A user's ID (see PSOPRDEFN).
26 DT_TIMESTAMP DateTime(26) TIMESTAMP Date Timestamp
27 HARD_PEG Character(1) VARCHAR2(1) NOT NULL 09/01/04 EGS: Created
28 DEMAND_DATE Date(10) DATE Demand Date