SELECT hou.NAME operating_unit_name,
rct.trx_number sales_invoice_number,
ooh.order_number,
rc.customer_name,
rsa.NAME sales_person_name,
msi.segment1 item_number,
mln.lot_number,
msi.primary_unit_of_measure primary_uom,
ool.ordered_quantity primary_quantity,
msi.secondary_uom_code secondary_uom,
ool.ordered_quantity2 secondary_quantity,
msi.organization_id inventory_org_id,
ool.org_id,
rctl.extended_amount amount
FROM oe_order_headers_all ooh,
oe_order_lines_all ool,
hr_operating_units hou,
ra_customer_trx_all rct,
ra_customer_trx_lines_all rctl,
ra_customers rc,
ra_salesreps_all rsa,
mtl_system_items_b msi,
mtl_lot_numbers mln
WHERE ooh.header_id = ool.header_id
AND hou.organization_id = ool.org_id
AND ool.reference_customer_trx_line_id = rctl.customer_trx_line_id
AND rct.sold_to_customer_id = rc.customer_id
AND ooh.salesrep_id = rsa.salesrep_id
AND mln.inventory_item_id = msi.inventory_item_id
AND mln.organization_id = msi.organization_id
No comments:
Post a Comment