po_requisition_headers_all --请购单头
po_requisition_headers_all --请购单行
po_vendors --供应商
po_vendor_sites_all --供应商地址
po_vendor_contacts --供应商联系人
po_requisition_headers_v --请购单view
po_headers_v --采购单view
PO_REQUISITION_LINES_INQ_V --请购单行
比如,对于一个请购单, 请购买的地址不会在请购单的头,而在行,原因是:
一个请购单可以有多个行,每个行可以由不同单位购买,比较灵活.
PO01A报表的语句:(请购单,目前只有部门代号那个栏位没有找到)
select
prh.segment1 prhsegment1,
upper(to_char(prh.creation_date,'dd-mon-yy')) creation_date,
papf.full_name,
hl1.location_code devliver_to,
msi.segment1,
prl.line_num,
prl.item_description,
prl.unit_meas_lookup_code,
prl.quantity,
prl.need_by_date,
hout.name,
prl.*
from po_requisition_headers_all prh,
po_requisition_lines_all prl,
per_all_people_f papf,
mtl_system_items msi,
hr_locations_all_tl hl1,
hr_all_organization_units_tl hout
where prh.preparer_id = papf.person_id
and prh.requisition_header_id=prl.requisition_header_id
and prh.segment1=10600014
and prh.preparer_id = papf.person_id
and msi.inventory_item_id=prl.item_id
and msi.organization_id = prl.destination_organization_id
AND hl1.location_id = prl.deliver_to_location_id
and hout.organization_id=prl.org_id