--采购接收日期----------
select pha.segment1,
rcv.transaction_type,
max(rcv.creation_date) "Max Receipt_date"
from apps.rcv_transactions rcv,
apps.po_headers_all pha,
apps.po_lines_all pla
where pha.po_header_id = rcv.po_header_id
and pla.po_line_id = rcv.po_line_id
and pla.po_header_id = pha.po_header_id
and rcv.transaction_type = 'RECEIVE'
and (pha.segment1 = '&PO_NUM'
-----------------------------------------------------