Customer Invoice from SO

Select a.order_number, d.trx_number CUSTOMER_INVOICE, c.name, a.invoice_to_org_id,  a.flow_status_code,
b.ordered_item , b.inventory_item_id, b.invoice_interface_status_code,
b.invoiced_quantity, b.flow_status_code

From apps. oe_order_headers_all a,
     apps. oe_order_lines_all b,
     apps. HR_ALL_ORGANIZATION_UNITS c,
     apps. RA_CUSTOMER_TRX_ALL d

Where
b.header_id = a.header_id
AND a.org_id=c.organization_id
AND a.org_id=d.org_id
AND a.order_number='10090178'  //Saes Order Number
AND c.name LIKE 'XXX%UK%' //Name of Operating Unit
AND d.ct_reference= to_char(a.order_number)

Comments

Post new comment

A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.
All Rights Reserved. Copyright 2008-11 OracleUG.com.