VCHR_PO_HRC_VW

(SQL View)
Index Back

Vchr PO Header Prompt


SELECT a.business_unit , a.po_id , a.po_dt , b.vendor_name_short , b.vendor_id , b.name1 , a.vndr_loc , SUM(c.merchandise_amt) , a.currency_cd FROM ps_po_hdr_fs a , ps_vendor b , PS_PO_LINE_SHIP_FS c WHERE a.vendor_setid = b.setid AND a.vendor_id = b.vendor_id AND ((a.po_status = 'D') OR ((a.chng_ord_batch > 0) AND a.po_status = 'D')) AND a.ers_action = 'N' AND a.match_status_po IN ('T','P','N') AND a.in_process_flg = 'N' AND a.mid_roll_status = 'N' AND a.business_unit = c.business_unit AND a.po_id = c.po_id AND c.match_status_ln_po IN ('N', 'P') AND A.BUDGET_HDR_STATUS = 'V' AND A.BUDGET_HDR_STS_NP = 'V' AND A.CC_USE_FLAG IN ('N',' ') AND EXISTS ( SELECT 'X' FROM PS_PO_LINE_DIST_FS E WHERE E.BUSINESS_UNIT = C.BUSINESS_UNIT AND E.PO_ID = C.PO_ID AND E.LINE_NBR = C.LINE_NBR AND E.DST_ACCT_TYPE = 'DST' AND E.KK_CLOSE_FLAG <> 'Y') AND EXISTS ( SELECT 'X' FROM PS_PO_LINE_FS PO_LN WHERE PO_LN.BUSINESS_UNIT = C.BUSINESS_UNIT AND PO_LN.PO_ID = C.PO_ID AND PO_LN.LINE_NBR = C.LINE_NBR) AND NOT EXISTS ( SELECT 'X' FROM PS_RECV_LN_SHIP_FS F WHERE F.BUSINESS_UNIT_PO = A.BUSINESS_UNIT AND F.PO_ID = A.PO_ID AND F.SERIAL_CONTROL = 'Y' AND F.SERIAL_STATUS = 'I' AND F.recv_ship_status <> 'X') GROUP BY a.business_unit, a.po_id, a.po_dt, b.vendor_name_short, b.vendor_id, b.name1, a.vndr_loc, a.currency_cd

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 BUSINESS_UNIT_PO Character(5) VARCHAR2(5) NOT NULL PO Business Unit
2 PO_ID Character(10) VARCHAR2(10) NOT NULL Purchase Order
3 PO_DT Date(10) DATE Date
4 VENDOR_NAME_SHORT Character(14) VARCHAR2(14) NOT NULL Short Vendor Name
5 VENDOR_ID Character(10) VARCHAR2(10) NOT NULL Vendor Identifier
6 NAME1 Character(40) VARCHAR2(40) NOT NULL Name 1
7 VNDR_LOC Character(10) VARCHAR2(10) NOT NULL Vendor Location
8 GROSS_AMT Signed Number(28,3) DECIMAL(26,3) NOT NULL Gross Invoice Amount
9 TXN_CURRENCY_CD Character(3) VARCHAR2(3) NOT NULL Transaction Currency