GME OPM Outside Processing

Description
Categories: BI Publisher, Manufacturing
Columns: Batch Id, Batch No, Status, Sched Start Date, Sched Cmplt Date, Product, Uom, Scheduled Qty, Qty Completed ...
Application: Process Manufacturing Process Execution
Source: OPM Outside Processing Report (XML)
Short Name: GMEOSP
DB package:
            SELECT gbh.batch_id batch_id,
                   gbh.batch_no batch_no,
                   gl.meaning status,
                   gbh.plan_start_date sched_start_date,
                   gbh.plan_cmplt_date sched_cmplt_date,
                   msib.concatenated_segments product,
                   gmd.dtl_um uom,
                   gmd.plan_qty scheduled_qty,
                   gmd.actual_qty qty_completed       
              FROM gme_batch_header gbh,
                   gme_material_details gmd,
                   wip_entities we,
                   mtl_system_items_kfv msib,
                   gem_lookups gl
             WHERE (:p_batch_from IS NULL OR
                    (:p_batch_from IS NOT NULL AND 
                    gbh.batch_no >= :p_batch_from))
               AND (:p_batch_to IS NULL OR
                   (:p_batch_to IS NOT NULL AND 
                    gbh.batch_no <= :p_batch_to))
               AND gbh.organization_id = :p_organization_id     
               AND gbh.batch_id = gmd.batch_id
               AND (:p_product_from IS NULL OR
                    (:p_product_from IS NOT NULL AND 
                     msib.concatenated_segments >= :p_product_from))
               AND (:p_product_to IS NULL OR
                   (:p_product_to IS NOT NULL AND 
                    msib.concatenated_segments <= :p_product_to))
               AND  msib.organization_id = :p_organization_id     
               AND (:p_batch_status IS NULL OR
                   (:p_batch_status IS NOT NULL AND
                    gbh.batch_status = :p_batch_status))
               AND gbh.batch_id = we.wip_entity_id
               AND we.primary_item_id = gmd.inventory_item_id