答案 0 :(得分:1)
采购订单通过分配链接到采购订单。也就是说,
po_requisition_distributions.distribution_id = po_distributions.req_distribution_id
这意味着,请购单行和采购订单之间不一定存在1:1的关系。因此,您可能需要的不仅仅是两个类别(链接到已批准/已链接到未批准),具体取决于您在所在位置使用eBS的方式。
以下是一个查询,可将PO申请与可能帮助您入门的PO相关联
SELECT porl.item_description,
hl.city,
poh.segment1 po#,
poh.authorization_status
FROM po_requisition_lines_all porl
INNER JOIN po_vendor_sites_all povs ON povs.vendor_site_id = porl.vendor_site_id
INNER JOIN hz_party_sites hps ON hps.party_site_id = povs.party_site_id
INNER JOIN hz_locations hl ON hl.location_id = hps.location_id
INNER JOIN po_req_distributions_all pord ON pord.requisition_line_id = porl.requisition_line_id
LEFT JOIN po_distributions_all pod ON pod.req_distribution_id = pord.distribution_id
LEFT JOIN po_headers_all poh ON poh.po_header_id = pod.po_header_id
WHERE porl.org_id = 321
AND hl.city IS NOT NULL
AND ROWNUM <= 10;