DCM_PO_RECV_VW

(SQL View)
Index Back

PO Qty Received view

View of Received PO Quantities

SELECT a.business_unit , a.po_id , a.line_nbr , a.sched_nbr , SUM(b.qty_sh_recvd) FROM PS_PO_LINE_SHIP a , ps_recv_ln_ship b WHERE a.business_unit = b.business_unit_po AND a.po_id = b.po_id AND a.line_nbr = b.line_nbr AND a.sched_nbr = b.sched_nbr AND b.recv_ship_status <> 'X' GROUP BY a.business_unit, a.po_id, a.line_nbr , a.sched_nbr UNION SELECT a.business_unit , a.po_id , a.line_nbr , a.sched_nbr , 0 FROM PS_PO_LINE_SHIP a WHERE NOT EXISTS ( SELECT 'x' FROM ps_recv_ln_ship b WHERE b.business_unit_po = a.business_unit AND b.po_id = a.po_id AND b.line_nbr = a.line_nbr AND b.sched_nbr = a.sched_nbr AND b.recv_ship_status <> 'X')

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
2 PO_ID Character(10) VARCHAR2(10) NOT NULL Purchase Order
3 LINE_NBR Number(5,0) INTEGER NOT NULL Line Number: 11/24/08 - Added TARGET label [PC product]
4 SCHED_NBR Number(3,0) SMALLINT NOT NULL Schedule Number
5 QTY_RECEIVED Number(16,4) DECIMAL(15,4) NOT NULL Received Qty