SELECT pla.*
FROM po_headers_all pha,
po_lines_all pla,
po_line_locations_all plla,
po_distributions_all pda,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh,
ap_invoice_lines_all aila,
ap_invoices_all aia,
ap_invoice_distributions_all aida,
ap_invoice_payments_all aip,
ap_payment_schedules_all aps
WHERE pha.po_header_id = 130896
AND pha.po_header_id = pla.po_header_id
AND pla.po_line_id = plla.po_line_id
AND plla.LINE_LOCATION_ID = pda.LINE_LOCATION_ID
AND pha.po_header_id = rsl.po_header_id
AND pla.po_line_id = rsl.po_line_id
AND rsl.shipment_header_id = rsh.shipment_header_id
AND pha.po_header_id = aila.po_header_id
AND pla.po_line_id = aila.po_line_id
AND aila.invoice_id = aia.invoice_id
AND aila.invoice_id = aida.invoice_id
AND aila.LINE_NUMBER = aida.Invoice_LINE_NUMBER
AND aia.invoice_id = aip.invoice_id
AND aip.invoice_id = aps.invoice_id
AND aip.payment_num = aps.payment_num
FROM po_headers_all pha,
po_lines_all pla,
po_line_locations_all plla,
po_distributions_all pda,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh,
ap_invoice_lines_all aila,
ap_invoices_all aia,
ap_invoice_distributions_all aida,
ap_invoice_payments_all aip,
ap_payment_schedules_all aps
WHERE pha.po_header_id = 130896
AND pha.po_header_id = pla.po_header_id
AND pla.po_line_id = plla.po_line_id
AND plla.LINE_LOCATION_ID = pda.LINE_LOCATION_ID
AND pha.po_header_id = rsl.po_header_id
AND pla.po_line_id = rsl.po_line_id
AND rsl.shipment_header_id = rsh.shipment_header_id
AND pha.po_header_id = aila.po_header_id
AND pla.po_line_id = aila.po_line_id
AND aila.invoice_id = aia.invoice_id
AND aila.invoice_id = aida.invoice_id
AND aila.LINE_NUMBER = aida.Invoice_LINE_NUMBER
AND aia.invoice_id = aip.invoice_id
AND aip.invoice_id = aps.invoice_id
AND aip.payment_num = aps.payment_num