ATP_S_POSTG3_VW

(SQL View)
Index Back

ATP Supply -- PO Staged View 2

View used to fetch quantity staged to Inventory for purchase orders received through Purchasing. It will also include receipts made in Purchasing without a purchase order. This view will be used in the ATP calculation and will look at table STAGED_ITEM_INV only.

SELECT s.business_unit , s.inv_item_id , 'POSTG2' , 'S' , 'PO' , s.po_id , l.line_nbr , v.name1 , SUM(s.qty_base) , p.peg_status FROM ps_staged_item_inv s , PS_RECV_LN_SHIP l , ps_recv_hdr h , ps_vendor v ,ps_in_pegging p WHERE s.trans_source = '01' AND s.sf_kanban_id = ' ' AND l.business_unit = s.source_bus_unit AND l.receiver_id = s.receiver_id AND l.recv_ln_nbr = s.recv_ln_nbr AND l.recv_ship_seq_nbr = s.recv_ship_seq_nbr AND h.business_unit = l.business_unit AND h.receiver_id = l.receiver_id AND v.setid = h.vendor_setid AND v.vendor_id = h.vendor_id AND (s.demand_hash = p.demand_hash OR s.supply_hash = p.supply_hash) GROUP BY s.business_unit, s.inv_item_id, s.po_id, l.line_nbr, v.name1, p.peg_status

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 INV_ITEM_ID Character(18) VARCHAR2(18) NOT NULL Item ID
3 ATP_SOURCE Character(6) VARCHAR2(6) NOT NULL This field is used in the ATP and Availability calculation to determine where the particular source or demand was fetched from. It will store the up-to-6 character mnemonic used in the associated view that fetched the data. For example, if ATP_S_PO_VW was used to fetch purchase order information, this field will contain "PO". If view ATP_D_PROMIS_VW was used to fetch promised demand information, this field will contain "PROMIS".
4 AVAIL_TYPE Character(1) VARCHAR2(1) NOT NULL Availability Type
D=Demand
S=Supply
5 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
6 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
7 ORDER_INT_LINE_NO Number(5,0) INTEGER NOT NULL Order Line
8 SHIP_CUST_NAME1 Character(40) VARCHAR2(40) NOT NULL Ship To Name
9 QTY_REQUESTED Signed Number(17,4) DECIMAL(15,4) NOT NULL Qty Requested
10 PEG_STATUS Character(2) VARCHAR2(2) NOT NULL 07/21/04 EGS: Created
10=Open
20=Completed
30=Canceled
40=Not Pegged