sridhar notes

download sridhar notes

If you can't read please download the document

Transcript of sridhar notes

SELECT ooha.order_number ord#, oola.line_number || '.' || oola.shipment_number line#, msi.segment1 Part#,SUBSTR (hou.NAME, 1, 10) op_unt, oola.subinventory subinv, oola.ordered_quantity scd_qty, oola.last_update_date, fu.user_name csr, ooha.attribute12 ppr# ooha.status "header_status",oola.line_status linestatus FROM apps.oe_order_headers_all ooha, apps.oe_order_lines_all oola, apps.hr_organization_units hou, apps.fnd_user fu,apps.mtl_system_items msi WHERE hou.organization_id = ooha.org_id AND ooha.header_id = oola.header_id AND ooha.created_by = fu.user_id AND msi.inventory_item_id = oola.inventory_item_id AND msi.organization_id = oola.ship_from_org_id AND oola.source_type_code 'EXTERNAL' AND NOT EXISTS ( SELECT NULL FROM apps.wsh_deliverables_v wdv WHERE wdv.source_line_id = oola.line_id AND wdv.released_status_name = 'Staged/Pick Confirmed') AND NOT EXISTS ( SELECT NULL FROM apps.mrp_sales_order_updates mso WHERE sales_order_id = oola.line_id AND mso.new_schedule_quan tity = oola.ordered_quantity AND mso.new_schedule_date = oola.schedule_ship_date) AND NVL (oola.open_flag, 'Y') = 'Y' AND ooha.booked_flag = 'Y' AND ooha.open_flag = 'Y' AND oola.line_id IN ( SELECT oola.line_id FROM apps.mtl_system_items msi, apps.ra_customers rc, apps.oe_transaction_types_tl ottth, apps.oe_transaction_types_all otta, apps.oe_order_lines_all oola, apps.oe_order_headers_all ooha WHERE msi.organization_id = oola.ship_from_org_id AND msi.inventory_item_id = oola.inventory_item_id AND rc.customer_id = ooha.sold_to_org_id AND ottth.transaction_type_id = oola.line_type_id AND otta.transaction_type_id = ottth.transaction_type_id --AND oola.schedule_ship_date IS NOT NULL -- Auto PPR -- Rama Raju 07-JUL-06 above line commented, below line added to show SSD is null AND NVL (oola.schedule_ship_date, SYSDATE) < SYSDATE + 365 AND TRUNC (ooha.booked_date) < TRUNC (SYSDATE) - 1 AND TRUNC (oola.last_update_date) < TRUNC (SYSDATE) - 1 AND NVL (oola.fulfilled_flag, 'N') 'Y' AND oola.open_flag = 'Y' AND oola.header_id = ooha.header_id AND ooha.open_flag = 'Y' AND ooha.booked_flag = 'Y' AND ( oola.item_type_code = 'STANDARD' OR oola.item_type_code = 'CONFIG'

) AND oola.flow_status_code NOT IN ('CLOSED', 'CANCELLED') AND (oola.ordered_quantity - NVL (oola.shipped_quantity, 0)) > 0 AND (otta.attribute3 = 'Y' OR NVL (ooha.order_source_id, 0) = 10 ) AND otta.order_category_code IN ('ORDER', 'MIXED') AND (oola.cancelled_flag != 'Y' OR oola.cancelled_flag IS NULL ) AND (ooha.cancelled_flag != 'Y' OR ooha.cancelled_flag IS NULL )) AND ooha.attribute12 IS NULL ORDER BY 3, 1, 2