1570: po_line_locations_all pll
1571: where poh.po_header_id = pol.po_header_id
1572: and pll.po_header_id = pol.po_header_id
1573: and pll.po_line_id = pol.po_line_id
1574: and pll.shipment_type = 'STANDARD'
1575: and pll.line_location_id = p_reference_id ;
1576:
1577: elsif (p_reference = 'PO_DISTRIBUTION_ID' ) then
1578: select poh.vendor_id into l_vendor_id
1585: and pll.po_line_id = pol.po_line_id
1586: and pod.po_header_id = pll.po_header_id
1587: and pod.po_line_id = pll.po_line_id
1588: and pod.line_location_id = pll.line_location_id
1589: and pll.shipment_type = 'STANDARD'
1590: and pod.po_distribution_id = p_reference_id;
1591: Else
1592: select poh.vendor_id into l_vendor_id
1593: from po_headers_all poh,
1599: and pll.po_line_id = pol.po_line_id
1600: and rct.po_header_id = pll.po_header_id
1601: and rct.po_line_id = pll.po_line_id
1602: and rct.po_line_location_id = pll.line_location_id
1603: and pll.shipment_type = 'STANDARD'
1604: and rct.transaction_id = p_reference_id;
1605: End if;
1606: Return l_vendor_id;
1607: Exception