Wednesday, June 6, 2012

SQL Query for WIP JOBS associated to a sales order

Query1:
--------
SELECT


ooh.order_number

,msib.segment1

,mr.reservation_quantity

, we.wip_entity_name wip_job_name

, wdj.scheduled_start_date wip_start_date

, wdj.scheduled_completion_date wip_completion_date

, wdj.attribute10 job_type

FROM oe_order_headers_all ooh

, oe_order_lines_all ool

, mtl_reservations mr

, wip_discrete_jobs wdj

, wip_entities we

,mtl_system_items_b msib

WHERE ooh.header_id = ool.header_id

AND ooh.org_id = 160

-- AND ool.item_type_code IN ('CONFIG', 'STANDARD')

AND mr.demand_source_line_id = ool.line_id

AND mr.supply_source_type_id = 5

AND mr.supply_source_header_id = we.wip_entity_id

AND we.wip_entity_id = wdj.wip_entity_id

AND ool.ship_from_org_id = we.organization_id

AND ool.ship_from_org_id=msib.organization_id

AND mr.inventory_item_id=msib.inventory_item_id

AND we.organization_id = wdj.organization_id

2 comments:

Sridevi Koduru said...

I am Sridevi Koduru, Senior Oracle Apps Trainer With 8 Yrs Exp on Oracle Apps and 13 Yrs IT Exp Providing Online Training on Oracle Apps Technical, Oracle Apps Financial Functional, Oracle Apps SCM, Oracle Apps HRMS, Oracle Financial for Indian Localization, SQL, PL/SQL and D2K. I have Provided Training for 500+ Professionals Most of them are Working in Real Time now.

Contact for (One to One Personal Online Training) on Oracle Apps Technical, Oracle Apps Financial Functional, Oracle Financial for Indian Localization, Oracle Apps SCM, Oracle Apps HRMS, SQL, PL/SQL and D2K at training@oracleappstechnical.com or sridevikoduru@oracleappstechnical.com | +91-9581017828 | http://www.oracleappstechnical.com

Linkedin profile - http://in.linkedin.com/pub/sridevi-koduru/8b/76a/9b8/

VMR Naidu Dudala said...

Hi,
Could you please let me know the pub or interface tables to crate WIP job by validating Sales order deatils from .csv file.

i need to split the lines depends on quantity also.

your help is highly appreciated.