Professional Documents
Culture Documents
PO Line Detail
PO Line Detail
line_num,
haou.name org_name,
pha.segment1 PO_Number ,
pha.type_lookup_code PO_TYPE,
pha.creation_date,
pha.comments Descriptions,
aps.vendor_name,
papf.full_name,
pha.authorization_status,
pha.currency_code,
--pla.line_num,
plt.line_type,
msib.segment1 item,
pla.item_description,
kfv.CONCATENATED_SEGMENTS PO_Category,
pla.quantity,
pla.unit_price,
(pla.quantity * pla.unit_price) extended_price,
pll.need_by_date,
pll.promised_date,
mp.organization_code SHIP_TO_ORG,
hla.LOCATION_CODE Ship_to_location_code,
prh.segment1 requisition_number
where 1=1
and pha.po_header_id = pla.po_header_id
and pla.po_header_id = pll.po_header_id
and pha.vendor_id = aps.vendor_id
and pha.agent_id = papf.person_id
and pla.category_id = kfv.category_id
AND prh.requisition_header_id = prl.requisition_header_id
AND prd.requisition_line_id = prl.requisition_line_id
AND prd.distribution_id (+) = pda.req_distribution_id
AND pda.po_header_id = pha.po_header_id
and haou.organization_id = pha.org_id
and msib.inventory_item_id (+) = pla.item_id
and pll.SHIP_TO_ORGANIZATION_ID = mp.organization_id
and pla.line_type_id = plt.line_type_id
and pll.SHIP_TO_LOCATION_ID = hla.LOCATION_ID
and pha.segment1 = 'XX00009774'
and PHA.org_id in (001,002)
and aps.vendor_name like '%XXXX%'
and trunc (pha.creation_date) >= trunc (sysdate-90);