<ROOT>
 <APPS_INITIALIZE_DATA>
  <USER_NAME>ENGINATICS</USER_NAME>
  <RESPONSIBILITY_KEY>SYSTEM_ADMINISTRATOR</RESPONSIBILITY_KEY>
  <APPLICATION_SHORT_NAME>SYSADMIN</APPLICATION_SHORT_NAME>
 </APPS_INITIALIZE_DATA>
<LOVS>
<!-- loader xml for Enginatics Blitz Report lov: INV Organization Code -->
 <LOVS_ROW>
  <GUID>8E2FF36EDEB279D2E0530100007F1FF2</GUID>
  <LOV_NAME>INV Organization Code</LOV_NAME>
  <VALIDATE_FROM_LIST>Y</VALIDATE_FROM_LIST>
  <LOV_QUERY>select
ood.organization_code value,
ood.organization_name||&apos; (&apos;||ftv.territory_short_name||&apos;, &apos;||hla.town_or_city||decode(mp.organization_id,mp.master_organization_id,null,&apos;, &apos;||mp0.organization_code)||&apos;)&apos; description
from
org_organization_definitions ood,
mtl_parameters mp,
mtl_parameters mp0,
hr_all_organization_units haou,
hr_locations_all hla,
fnd_territories_vl ftv
where
ood.organization_id=mp.organization_id and
mp.organization_id&lt;&gt;mp.master_organization_id and
(
ood.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id) or
not exists (select null from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id) and
ood.operating_unit in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat union select fnd_global.org_id from dual where fnd_release.major_version=11)
) and
(:$flex$.operating_unit is null or ood.operating_unit in (select haouv.organization_id from hr_all_organization_units_vl haouv where xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos;)) and
(:$flex$.ledger is null or ood.set_of_books_id in (select gl.ledger_id from gl_ledgers gl where xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos;)) and
nvl(ood.disable_date,sysdate)&gt;=sysdate and
mp.master_organization_id=mp0.organization_id and
ood.organization_id=haou.organization_id(+) and
haou.location_id=hla.location_id(+) and
hla.country=ftv.territory_code(+)
order by
ood.organization_code</LOV_QUERY>
  <LOV_TRANSLATIONS>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <DESCRIPTION>جميع أكواد تنظيم المخزون النشط باستثناء المؤسسات الرئيسية ، مقيدة بعرض الوصول إلى مؤسسة المستخدم الحالي</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <DESCRIPTION>Alle aktiven Inventar-Organisationscodes mit Ausnahme von Master-Organisationen, beschränkt auf die Org-Zugriffsansicht des aktuellen Benutzers</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <DESCRIPTION>Todos los códigos de organización de inventario activos, excluyendo las organizaciones maestras, restringidos a la vista de acceso a la organización del usuario actual</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <DESCRIPTION>Tous les codes d&apos;organisation de l&apos;inventaire actif, à l&apos;exclusion des organisations maîtresses, limités à la vue d&apos;accès à l&apos;organisation de l&apos;utilisateur actuel</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <DESCRIPTION>Tutti i codici di organizzazione dell&apos;inventario attivi, escluse le organizzazioni master, limitati alla vista di accesso all&apos;org dell&apos;utente corrente</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <DESCRIPTION>すべてのアクティブなインベントリの組織コードは、マスター組織を除いて、現在のユーザーの組織のアクセスビューに制限されます。</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <DESCRIPTION>현재 사용자의 조직 액세스보기로 제한되는 마스터 조직을 제외한 모든 활성 재고 조직 코드</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <DESCRIPTION>Todos os códigos ativos de organização de inventário, excluindo organizações mestre, restritos à visão de acesso org do usuário atual</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <DESCRIPTION>Все активные инвентаризационные организационные коды, исключая основные организации, ограниченные текущим представлением доступа пользователя к оргструктуре.</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <DESCRIPTION>Alla aktiva lagerorganisationskoder exklusive huvudorganisationer, begränsade till den aktuella användarens organisationsåtkomstvy</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <DESCRIPTION>Ana organizasyonlar hariç tüm aktif envanter organizasyon kodları, mevcut kullanıcının organizasyon erişim görünümü ile sınırlıdır</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <DESCRIPTION>All active inventory organization codes excluding master organizations, restricted to the current user&apos;s org access view</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
   <LOV_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <DESCRIPTION>所有活动的清单组织代码，不包括主组织，仅限于当前用户的组织访问视图。</DESCRIPTION>
   </LOV_TRANSLATIONS_ROW>
  </LOV_TRANSLATIONS>
 </LOVS_ROW>
</LOVS>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: ECC Process Manufacturing, Outside Processing Batch -->
 <REPORTS_ROW>
  <GUID>EEE75CEB4A6A6AD8E05362FB09051F8B</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>select
x.*
from
(
 SELECT * FROM (  SELECT ECC_SPEC_ID, ECC_OP_SPEC_ID, JOB, STEP_ID, BATCH_NO, BATCH_STATUS, LANGUAGE,
BATCH_PLAN_START_DATE, BATCH_ACTUAL_START_DATE, BATCH_PLAN_CMPLT_DATE, ORGANIZATION_ID, ORGANIZATION_CODE, ORGANIZATION_NAME,
FORMULA_NO, FORMULA_VERSION, RECIPE_NO, RECIPE_VERSION, ROUTING_NO, ROUTING_VERSION,  ROUTING_CLASS, OPRN_NO, ACTIVITY, BATCHSTEP_NO, PLAN_START_DATE, PLAN_CMPLT_DATE,
ACTUAL_START_DATE, RESOURCES, RESOURCE_DESCRIPTION, RESOURCE_TYPE,
RSR_ACTUAL_START_DATE, RSR_ACTUAL_CMPLT_DATE, SUPPLIER, SUPPLIER_TBL, BUYER_NAME, PURCHASE_ORDER_STATUS, PURCHASE_ORDER_NUMBER, REQUISITION_NUMBER,
LINE_NUMBER, CANCEL_FLAG, NEED_BY_DATE, PROMISE_DATE, PENDING_QUANTITY, QUANTITY_ORDERED, QUANTITY_DELIVERED, QUANTITY_CANCELLED, PO_LINE_UOM, LINE_ITEM, OSP_ITEM,
OSP_OPERATION, OSP_OPERATION_FLAG, STARTING_TODAY, COMPLETING_TODAY, STARTING_TOMORROW, COMPLETING_TOMORROW, STARTING_BY, FINISHING_BY, OPERATION_DELAY_DURATION,
OPERATION_DELAYED, STEP_STATUS, STEP_CODE, DELAYED_RECEIPTS, PO_RECEIPT_DELAY, OPERATION_START_DELAY, OPERATION_COMPLETION_DELAY, UPCOMING, UPCOMING_CODE, WIP_OPERATIONS,
WIP_OPERATIONS_CODE, START_DELAY_FLAG, START_DELAY, COMPLETION_DELAY_FLAG
  FROM ( SELECT
   TO_CHAR(gbh.batch_id || &apos;-&apos; || gbs.batchstep_id || &apos;-&apos; || crm.resources || &apos;-&apos; || gbh.organization_id || &apos;-&apos; || wip_osp.rec_key || &apos;-OSP&apos;) ecc_spec_id,
   TO_CHAR(gbh.batch_id || &apos;-&apos; || gbs.batchstep_id || &apos;-&apos; || gbh.organization_id || &apos;-OP&apos;) ecc_op_spec_id,
   gbs.batch_id job,
   gbs.batchstep_id step_id,
   gbh.batch_no batch_no,
   status_lkp.meaning batch_status,
   status_lkp.language LANGUAGE,
   gbh.plan_start_date batch_plan_start_date,
   gbh.actual_start_date batch_actual_start_date,
   gbh.plan_cmplt_date batch_plan_cmplt_date,
   gbh.organization_id organization_id,
   mp.organization_code organization_code,
   haout.name organization_name,
   ffm.FORMULA_NO FORMULA_NO,
   ffm.FORMULA_VERS formula_version,
   rcp.RECIPE_NO,
   rcp.RECIPE_VERSION,
   routing.routing_no &quot;ROUTING_NO&quot;,
   routing.routing_vers &quot;ROUTING_VERSION&quot;,
   routing.routing_class &quot;ROUTING_CLASS&quot;,
   gmdoprn.oprn_no,
   gbsa.activity activity,
   gbs.batchstep_no batchstep_no,
   gbs.plan_start_date PLAN_START_DATE,
   gbs.plan_cmplt_date plan_cmplt_date,
   gbs.actual_start_date actual_start_date,
   crm.resources resources,
   crm.resource_desc resource_description,
   crc.resource_class_desc resource_type,
   gbsr.actual_start_date Rsr_actual_start_date,
   gbsr.actual_cmplt_date Rsr_actual_cmplt_date,
   NVL(wip_osp.vendor_name, nonelk.meaning) supplier,
   wip_osp.vendor_name supplier_tbl,
   NVL(wip_osp.buyer_name, &apos;None&apos;) buyer_name,
   wip_osp.approval_status_code purchase_order_status,
   wip_osp.po_number purchase_order_number,
   wip_osp.req_number requisition_number,
   wip_osp.line_number line_number,
   DECODE(wip_osp.cancel_flag, &apos;Y&apos;, 1, 2) cancel_flag,
   wip_osp.old_need_by_date need_by_date,
   wip_osp.old_promised_date promise_date,
   wip_osp.assembly_qty_pending pending_quantity ,
   wip_osp.quantity_ordered,
   wip_osp.quantity_delivered,
   wip_osp.quantity_cancelled,
   wip_osp.assembly_primary_uom po_line_uom ,
   wip_osp.osp_res_po_line_item line_item,
   wip_osp.osp_res_po_line_item OSP_ITEM,
   CASE
      WHEN
         wip_osp.po_number IS NULL
         AND wip_osp.req_number IS NULL
      THEN
         nolk.meaning
      ELSE
         yeslk.meaning
   END
   osp_operation,
   CASE
      WHEN
         wip_osp.po_number IS NULL
         AND wip_osp.req_number IS NULL
      THEN
         nolk.lookup_code
      ELSE
         yeslk.lookup_code
   END
   osp_operation_flag,
   CASE
      WHEN
         TRUNC(gbs.plan_start_date) = TRUNC(SYSDATE)
      THEN
         1
      ELSE
         0
   END
   starting_today,
   CASE
      WHEN
         TRUNC(gbs.plan_cmplt_date) = TRUNC(SYSDATE)
      THEN
         1
      ELSE
         0
   END
   Completing_Today,
   CASE
      WHEN
         TRUNC(gbs.plan_start_date) = TRUNC(SYSDATE + 1)
      THEN
         1
      ELSE
         0
   END
   starting_tomorrow,
   CASE
      WHEN
         TRUNC(gbs.plan_cmplt_date) = TRUNC(SYSDATE + 1)
      THEN
         1
      ELSE
         0
   END
   Completing_Tomorrow,
   (
      gbs.plan_start_date - SYSDATE
   )
   starting_by,
   (
      gbs.plan_cmplt_date - SYSDATE
   )
   finishing_by,
   CASE
      WHEN
         gbs.actual_cmplt_date IS NOT NULL
         AND gbs.actual_cmplt_date &gt; (gbs.plan_cmplt_date )
      THEN
         CASE
            WHEN
               (gbs.actual_cmplt_date - (gbs.plan_cmplt_date )) &gt; 0
            THEN
				(gbs.actual_cmplt_date - (gbs.plan_cmplt_date ))
            ELSE
               0
         END
         WHEN
            gbs.actual_cmplt_date IS NULL
            AND
            ( gbs.plan_cmplt_date) &lt; sysdate
         THEN
            CASE
               WHEN
                  (sysdate - (gbs.plan_cmplt_date )) &gt; 0
               THEN
				  (sysdate - (gbs.plan_cmplt_date ))
               ELSE
                  0
            END
            WHEN
               gbs.actual_start_date IS NOT NULL
               AND gbs.actual_start_date &gt; (gbs.plan_start_date )
            THEN
               CASE
                  WHEN
                     (gbs.actual_start_date - (gbs.plan_start_date )) &gt; 0
                  THEN
					 (gbs.actual_start_date - (gbs.plan_start_date ))
                  ELSE
                     0
               END
               WHEN
                  gbs.actual_start_date IS NULL
                  AND
                  (gbs.plan_start_date) &lt; sysdate
               THEN
                  CASE
                     WHEN
                        (sysdate - (gbs.plan_start_date )) &gt; 0
                     THEN
						(sysdate - (gbs.plan_start_date ))
                     ELSE
                        0
                  END
                  ELSE
                     0
   END
   operation_delay_duration,
   CASE
      WHEN
         gbs.actual_cmplt_date IS NOT NULL
         AND gbs.actual_cmplt_date &gt; (gbs.plan_cmplt_date )
      THEN
         CASE
            WHEN
               (gbs.actual_cmplt_date - (gbs.plan_cmplt_date )) &gt; 0
            THEN
               1
            ELSE
               0
         END
         WHEN
            gbs.actual_cmplt_date IS NULL
            AND
            (gbs.plan_cmplt_date) &lt; sysdate
         THEN
            CASE
               WHEN
                  (sysdate - (gbs.plan_cmplt_date )) &gt; 0
               THEN
                  1
               ELSE
                  0
            END
            WHEN
               gbs.actual_start_date IS NOT NULL
               AND gbs.actual_start_date &gt; (gbs.plan_start_date )
            THEN
               CASE
                  WHEN
                     (gbs.actual_start_date - (gbs.plan_start_date )) &gt; 0
                  THEN
                     1
                  ELSE
                     0
               END
               WHEN
                  gbs.actual_start_date IS NULL
                  AND
                  (gbs.plan_start_date) &lt; sysdate
               THEN
                  CASE
                     WHEN
                        (sysdate - (gbs.plan_start_date )) &gt; 0
                     THEN
                        1
                     ELSE
                        0
                  END
                  ELSE
                     0
   END
   operation_delayed ,
   step_status_lkp.meaning step_status,
   step_status_lkp.lookup_code step_code,
   delayed_receipts,
   CASE WHEN delayed_receipts =1 THEN &apos;YES&apos; ELSE &apos;NO&apos; END po_receipt_delay,
   	gbs.operation_start_delay,
	gbs.operation_completion_delay,
    CASE WHEN step_status_lkp.lookup_code = 1 AND status_lkp.lookup_code IN (1,2)
		THEN 1 ELSE 0 END upcoming,
	CASE WHEN step_status_lkp.lookup_code = 1 AND status_lkp.lookup_code IN (1,2)
		THEN &apos;YES&apos;   ELSE &apos;NO&apos;  END upcoming_code,
	CASE WHEN step_status_lkp.lookup_code = 2 AND status_lkp.lookup_code IN (1,2)
		THEN 1 ELSE 0 END WIP_operations,
	CASE WHEN step_status_lkp.lookup_code = 2 AND status_lkp.lookup_code IN (1,2)
		THEN &apos;YES&apos;   ELSE &apos;NO&apos;  END WIP_operations_code,
	CASE WHEN step_status_lkp.lookup_code IN (1,2) AND status_lkp.lookup_code IN (1,2) AND gbs.operation_start_delay &gt; 0
		THEN 1   ELSE 0  END Start_delay_flag,
	CASE WHEN step_status_lkp.lookup_code IN (1,2) AND status_lkp.lookup_code IN (1,2) AND gbs.operation_start_delay &gt; 0
		THEN &apos;YES&apos;   ELSE &apos;NO&apos;  END Start_delay,
	CASE WHEN step_status_lkp.lookup_code IN (2,3) AND status_lkp.lookup_code IN (1,2) AND gbs.operation_completion_delay &gt; 0
		THEN 1  ELSE 0  END completion_delay_flag 
FROM
   wip_entities we,
   gme_batch_header gbh,
   FM_FORM_MST ffm,
   GMD_RECIPES_B rcp,
   fm_rout_hdr routing,
   cr_rsrc_mst_tl crmt,
   cr_rsrc_cls crc,
   cr_rsrc_mst_b crm,
   gme_batch_step_resources gbsr,
   gme_batch_step_activities gbsa,
   mtl_parameters mp,
   hr_all_organization_units_tl haout,
   (
      SELECT
         ml1.meaning,
         ml1.lookup_code,
         ml1.language
      FROM
         fnd_lookup_values ml1
      WHERE
         ml1.lookup_type = &apos;GME_BATCH_STATUS&apos;
         AND ml1.view_application_id = 553
         AND ml1.security_group_id = 0
   )
   status_lkp,
   (
      SELECT
         f.meaning,
         f.lookup_code,
         f.language
      FROM
         fnd_lookup_values f
      WHERE
         f.lookup_type = &apos;GME_STEP_STATUS&apos;
         AND f.view_application_id = 553
         AND f.security_group_id = 0
   )
   step_status_lkp,
   (
      SELECT
         wip_osp1.rec_key,
         wip_osp1.approval_status_code,
         wip_osp1.po_number,
         wip_osp1.req_number,
         wip_osp1.cancel_flag,
         wip_osp1.old_need_by_date,
         wip_osp1.old_promised_date,
         wip_osp1.CANCEL_FLAG_PL,
         wip_osp1.QUANTITY_RECEIVED,
         wip_osp1.QUANTITY,
         wip_osp1.QUANTITY_CANCELLED_PL,
         wip_osp1.CLOSED_CODE,
         wip_osp1.assembly_qty_pending,
         wip_osp1.quantity_ordered,
         wip_osp1.quantity_delivered,
         wip_osp1.quantity_cancelled,
         wip_osp1.assembly_primary_uom,
         wip_osp1.organization_id,
         wip_osp1.wip_entity_id,
         wip_osp1.operation_seq_num,
         wip_osp1.vendor_name,
		 wip_osp1.buyer_name,
         wip_osp1.po_item_number osp_res_po_line_item,
         wip_osp1.line_number,
         wip_osp1.resource_seq_num,
         CASE WHEN
			(NVL(wip_osp1.old_promised_date, wip_osp1.old_need_by_date) - SYSDATE) &lt; 0
			AND
			(NVL(wip_osp1.old_promised_date, wip_osp1.old_need_by_date) - SYSDATE) &lt; 0
			AND
			((wip_osp1.CANCEL_FLAG_PL IS NULL OR wip_osp1.CANCEL_FLAG_PL = &apos;N&apos;)
				AND(wip_osp1.QUANTITY_RECEIVED &lt; (wip_osp1.QUANTITY - wip_osp1.QUANTITY_CANCELLED_PL))
				AND NVL(wip_osp1.CLOSED_CODE, &apos;OPEN&apos;) &lt;&gt; &apos;FINALLY CLOSED&apos;)
		THEN
			1
		ELSE
			0
		END
		delayed_receipts
      FROM
         (
            SELECT
               /*+ leading(we) index(we)*/
               ph.segment1 po_number,
               ph.type_lookup_code po_req_type,
               ph.authorization_status approval_status_code,
               ps.need_by_date old_need_by_date,
               ps.promised_date old_promised_date,
               ps.CANCEL_FLAG CANCEL_FLAG_PL,
               ps.QUANTITY_RECEIVED QUANTITY_RECEIVED,
               ps.QUANTITY QUANTITY,
               ps.QUANTITY_CANCELLED QUANTITY_CANCELLED_PL,
               ps.CLOSED_CODE CLOSED_CODE,
               wip_osp.converttoprimarymoveqty( pl.item_id, pd.destination_organization_id,
			   greatest(pd.quantity_ordered - NVL(pd.quantity_delivered, 0) - NVL(pd.quantity_cancelled, 0), 0), pl.unit_meas_lookup_code, WIP_ECC_UTIL_PVT.get_primary_uom_code(we.organization_id, we.primary_item_id),
               (
                  SELECT
                     gbsr.plan_rsrc_usage
                  FROM
                     gme_batch_step_resources gbsr
                  WHERE
                     gbsr.batch_id = pd.wip_entity_id
                     AND gbsr.organization_id = pd.destination_organization_id
                     AND gbsr.batchstep_resource_id = pd.wip_resource_seq_num
               )) assembly_qty_pending,
               pd.quantity_ordered,
               pd.quantity_delivered,
               pd.quantity_cancelled,
               pd.po_header_id || &apos;-&apos; || pd.po_line_id || &apos;-&apos; || pd.po_distribution_id rec_key,
               WIP_ECC_UTIL_PVT.get_primary_uom_code(we.organization_id, we.primary_item_id) assembly_primary_uom,
               pd.wip_entity_id wip_entity_id,
               pd.destination_organization_id organization_id,
               pd.wip_operation_seq_num operation_seq_num,
               pd.wip_resource_seq_num resource_seq_num,
               NULL req_number,
               ps.cancel_flag cancel_flag,
               pl.line_num line_number,
               po_v.vendor_name vendor_name,
               WIP_ECC_UTIL_PVT.get_concatenated_segments(pd.destination_organization_id, pl.item_id ) po_item_number,
			   poag.agent_name buyer_name
            FROM
               wip_entities we,
               gme_batch_header gbh,
               po_distributions_all pd,
               po_line_locations_all ps,
               po_lines_all pl,
               po_headers_all ph,
               po_document_types_all_b pdt,
               ap_suppliers po_v,
			   po_agents_v poag
            WHERE
               pdt.document_type_code = &apos;PO&apos;
               AND ph.type_lookup_code = &apos;STANDARD&apos;
               AND ph.type_lookup_code = pdt.document_subtype
               AND ph.org_id = pdt.org_id
               AND pd.po_header_id = ph.po_header_id
               AND pd.po_line_id = pl.po_line_id
               AND pd.line_location_id = ps.line_location_id
               AND pd.wip_entity_id = we.wip_entity_id
               AND we.entity_type IN(9,10)
               AND we.wip_entity_id = gbh.batch_id
               AND we.organization_id = gbh.organization_id
               AND gbh.batch_status IN(1,2)
               AND ph.vendor_id = po_v.vendor_id( + )
			   AND ph.agent_id = poag.agent_id
            UNION ALL
            SELECT
               /*+ leading(we) index(we)*/
               ph.segment1 || &apos;-&apos; || pr.release_num,
               ph.type_lookup_code,
               pr.authorization_status,
               ps.need_by_date,
               ps.promised_date,
               ps.CANCEL_FLAG CANCLE_FLAG_PL,
               ps.QUANTITY_RECEIVED QUANTITY_RECEIVED,
               ps.QUANTITY QUANTITY,
               ps.QUANTITY_CANCELLED QUANTITY_CANCELLED_PL,
               ps.CLOSED_CODE CLOSED_CODE,
               wip_osp.converttoprimarymoveqty( pl.item_id, pd.destination_organization_id,
			   greatest(pd.quantity_ordered - NVL(pd.quantity_delivered, 0) - NVL(pd.quantity_cancelled, 0), 0), pl.unit_meas_lookup_code, WIP_ECC_UTIL_PVT.get_primary_uom_code(we.organization_id, we.primary_item_id),
               (
                  SELECT
                     gbsr.plan_rsrc_usage
                  FROM
                     gme_batch_step_resources gbsr
                  WHERE
                     gbsr.batch_id = pd.wip_entity_id
                     AND gbsr.organization_id = pd.destination_organization_id
                     AND gbsr.batchstep_resource_id = pd.wip_resource_seq_num
               )),
               pd.quantity_ordered,
               pd.quantity_delivered,
               pd.quantity_cancelled,
               pd.po_header_id || &apos;-&apos; || pd.po_line_id || &apos;-&apos; || pr.po_release_id || &apos;-&apos; || pd.po_distribution_id rec_key,
               WIP_ECC_UTIL_PVT.get_primary_uom_code(we.organization_id, we.primary_item_id),
               pd.wip_entity_id,
               pd.destination_organization_id,
               pd.wip_operation_seq_num,
               pd.wip_resource_seq_num,
               NULL,
               ps.cancel_flag,
               pl.line_num,
               po_v.vendor_name,
               WIP_ECC_UTIL_PVT.get_concatenated_segments(pd.destination_organization_id, pl.item_id ),
			   poag.agent_name buyer_name
            FROM
               wip_entities we,
               gme_batch_header gbh,
               po_distributions_all pd,
               po_line_locations_all ps,
               po_lines_all pl,
               po_document_types_all_b pdt,
               po_headers_all ph,
               po_releases_all pr,
               ap_suppliers po_v,
			   po_agents_v poag
            WHERE
               pdt.document_type_code = &apos;RELEASE&apos;
               AND ph.type_lookup_code = &apos;BLANKET&apos;
               AND pr.release_type = pdt.document_subtype
               AND pr.org_id = pdt.org_id
               AND pr.po_release_id = ps.po_release_id
               AND pr.po_header_id = ph.po_header_id
               AND pd.po_header_id = ph.po_header_id
               AND pd.po_line_id = pl.po_line_id
               AND pd.line_location_id = ps.line_location_id
               AND pd.wip_entity_id = we.wip_entity_id
               AND we.entity_type IN (9,10)
               AND we.wip_entity_id = gbh.batch_id
               AND we.organization_id = gbh.organization_id
               AND gbh.batch_status IN (1,2)
               AND ph.vendor_id = po_v.vendor_id( + )
			   AND ph.agent_id = poag.agent_id
            UNION ALL
            SELECT
               /*+ leading(we) index(we)*/
               NULL,
               &apos;REQUISITION&apos;,
               prh.authorization_status,
               prl.need_by_date,
               to_date(NULL),
               prl.cancel_flag CANCLE_FLAG_PL,
               0 QUANTITY_RECEIVED,
               prl.quantity QUANTITY,
               0 QUANTITY_CANCELLED_PL,
               NULL CLOSED_CODE,
               wip_osp.converttoprimarymoveqty( prl.item_id, prl.destination_organization_id, prl.quantity, prl.unit_meas_lookup_code, WIP_ECC_UTIL_PVT.get_primary_uom_code(we.organization_id, we.primary_item_id),
               (
                  SELECT
                     gbsr.plan_rsrc_usage
                  FROM
                     gme_batch_step_resources gbsr
                  WHERE
                     gbsr.batch_id = prl.wip_entity_id
                     AND gbsr.organization_id = prl.destination_organization_id
                     AND gbsr.batchstep_resource_id = prl.wip_resource_seq_num
               )),
               prl.quantity quantity_ordered,
               0 quantity_delivered,
               0 quantity_cancelled,
               prl.requisition_header_id || &apos;-&apos; || prl.requisition_line_id rec_key,
               WIP_ECC_UTIL_PVT.get_primary_uom_code(we.organization_id, we.primary_item_id),
               prl.wip_entity_id,
               prl.destination_organization_id,
               prl.wip_operation_seq_num,
               prl.wip_resource_seq_num,
               prh.segment1,
               prl.cancel_flag,
               prl.line_num,
               NVL(po_v.vendor_name, prl.suggested_vendor_name),
               WIP_ECC_UTIL_PVT.get_concatenated_segments(prl.destination_organization_id, prl.item_id ),
			   NULL
            FROM
               wip_entities we,
               gme_batch_header gbh,
               po_requisition_headers_all prh,
               po_requisition_lines_all prl,
               ap_suppliers po_v
            WHERE
               NOT EXISTS
               (
                  SELECT
                     1
                  FROM
                     po_line_locations_all pll
                  WHERE
                     prl.line_location_id = pll.line_location_id
               )
               AND prl.requisition_header_id = prh.requisition_header_id
               AND prl.wip_entity_id = we.wip_entity_id
               AND we.entity_type IN (9,10)
               AND we.wip_entity_id = gbh.batch_id
               AND we.organization_id = gbh.organization_id
               AND gbh.batch_status IN (1,2)
               AND prl.vendor_id = po_v.vendor_id( + )
         )
         wip_osp1
   )
   wip_osp,
   gmd_operations_b gmdoprn,
      (
   SELECT
   gbs_steps.*,
         CASE
      WHEN
         gbs_steps.actual_start_date IS NOT NULL
         AND gbs_steps.actual_start_date &gt; gbs_steps.plan_start_date
      THEN
         CASE
            WHEN
               (gbs_steps.actual_start_date - gbs_steps.plan_start_date) &gt; 0
            THEN (gbs_steps.actual_start_date - gbs_steps.plan_start_date)
            ELSE
               0
         END
         WHEN
            gbs_steps.actual_start_date IS NULL
            AND
            (gbs_steps.plan_start_date) &lt; sysdate
         THEN
            CASE
               WHEN (sysdate - gbs_steps.plan_start_date) &gt; 0
               THEN (sysdate - gbs_steps.plan_start_date)
               ELSE
                  0
			END
            ELSE
               0
   END
   operation_start_delay ,
   CASE
      WHEN
         gbs_steps.actual_cmplt_date IS NOT NULL
         AND gbs_steps.actual_cmplt_date &gt; (gbs_steps.plan_cmplt_date)
      THEN
         CASE
            WHEN
               (gbs_steps.actual_cmplt_date - gbs_steps.plan_cmplt_date) &gt; 0
            THEN
				(gbs_steps.actual_cmplt_date - gbs_steps.plan_cmplt_date)
            ELSE
               0
         END
         WHEN
            gbs_steps.actual_cmplt_date IS NULL AND (gbs_steps.plan_cmplt_date) &lt; sysdate
         THEN
            CASE
               WHEN
                (sysdate - gbs_steps.plan_cmplt_date) &gt; 0
               THEN
				(sysdate - gbs_steps.plan_cmplt_date)
               ELSE
                  0
            END
            ELSE
               0
   END
   operation_completion_delay
   FROM
   gme_batch_steps gbs_steps
   ) gbs,

   (
      SELECT
         meaning,
         lookup_code,
         language
      FROM
         fnd_lookup_values nonelk
      WHERE
         lookup_type = &apos;WIP_PO_NOT_CREATED&apos;
         AND view_application_id = 700
         AND lookup_code = &apos;1&apos;
         AND security_group_id = 0
   )
   nonelk,
   (
      SELECT
         meaning,
         lookup_code,
         language
      FROM
         fnd_lookup_values nolk
      WHERE
         lookup_type = &apos;GME_YES_NO&apos;
         AND view_application_id = 553
         AND lookup_code = &apos;0&apos;
         AND security_group_id = 0
   )
   nolk,
   (
      SELECT
         meaning,
         lookup_code,
         language
      FROM
         fnd_lookup_values yeslk
      WHERE
         lookup_type = &apos;GME_YES_NO&apos;
         AND view_application_id = 553
         AND lookup_code = &apos;1&apos;
         AND security_group_id = 0
   )
   yeslk
WHERE
   we.wip_entity_id = gbh.batch_id
   AND gbh.batch_id = gbs.batch_id
   AND mp.organization_id = gbh.organization_id
   AND haout.organization_id = mp.organization_id
   AND gbs.oprn_id = gmdoprn.oprn_id
   AND gbs.batchstep_id = gbsr.batchstep_id
   AND gbs.step_status = step_status_lkp.lookup_code
   AND gbh.formula_id = ffm.formula_id
   AND gbh.formula_id = rcp.formula_id
   AND gbh.routing_id = routing.routing_id
   AND gbsr.batchstep_activity_id = gbsa.batchstep_activity_id
   AND crm.resources = gbsr.resources
   AND crm.resources = crmt.resources
   AND crm.resource_class = crc.resource_class( + )
   AND gbh.batch_status = status_lkp.lookup_code( + )
   AND gbsr.organization_id = wip_osp.organization_id( + )
   AND gbsr.batch_id = wip_osp.wip_entity_id( + )
   AND gbsr.batchstep_resource_id = wip_osp.resource_seq_num( + )
   AND haout.language = crmt.language
   AND haout.language = status_lkp.language
   AND haout.language = nonelk.language
   AND haout.language = yeslk.language
   AND haout.language = nolk.language
   AND haout.language = step_status_lkp.language
	AND EXISTS (SELECT /*+ push_subq no_unnest */
        1
        FROM gme_batch_step_resources gbsrosp, cr_rsrc_dtl crdosp, cr_rsrc_mst crmosp
        WHERE gbsrosp.resources       = crdosp.resources
        AND   gbsrosp.organization_id = crdosp.organization_id
        AND   crdosp.resources        = crmosp.resources
        AND   gbsrosp.batchstep_id =    gbs.batchstep_id
        AND   crdosp.purchase_item_id IS NOT NULL
        AND   NVL(crmosp.outside_process_ind,0) = 1 )
)WHERE language in (&apos;US&apos;) ) PIVOT ( MAX(RESOURCE_TYPE) AS RESOURCE_TYPE,MAX(OSP_OPERATION) AS OSP_OPERATION,
		                                               MAX(BATCH_STATUS) AS BATCH_STATUS ,
													   MAX(SUPPLIER) AS SUPPLIER,
                                                       MAX(BUYER_NAME) AS BUYER_NAME,
													   MAX(ORGANIZATION_NAME) AS ORGANIZATION_NAME ,MAX(STEP_STATUS) AS STEP_STATUS
													  
FOR LANGUAGE IN (&apos;US&apos; &quot;US&quot;)) 
) x
where
2=2</SQL_TEXT>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <REPORT_NAME>ECC التصنيع التشغيلي, مجموعة المعالجة الخارجية</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: تحتوي مجموعة البيانات هذه على معلومات عن عمليات المعالجة الخارجية للتصنيع التشغيلي
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <REPORT_NAME>ECC Process Manufacturing, Produktionsauftr. Fremdbearbeitung</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Dieses DatenSet speichert Informationen über Fremdbearbeitungsvorgänge in der Prozessfertigung
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <REPORT_NAME>ECC Process Manufacturing, Lote de Procesamiento Externo</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Juego de datos con información sobre fabricación de procesos externos a las operaciones de procesamiento
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <REPORT_NAME>ECC Process Manufacturing, Batch de sous-traitance</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Ce jeu de données contient des informations sur les opérations de sous-traitance Process Manufacturing
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <REPORT_NAME>ECC Process Manufacturing, Lavorazione presso terzi: batch</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Questa serie di dati contiene informazioni sulle operazioni di lavorazione presso terzi di Process Manufacturing
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <REPORT_NAME>ECC Process Manufacturing, 外注加工バッチ</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: このデータ・セットにはプロセス製造外注加工工程に関する情報が含まれています
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <REPORT_NAME>ECC Process Manufacturing, 외주가공 뱃치</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: 이 데이터 세트에는 Process Manufacturing 외주가공 공정에 대한 정보가 포함되어 있습니다.
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <REPORT_NAME>ECC Непрерывное производство, Задание обработки на стороне</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: В этом наборе данных содержатся сведения об операциях обработки на стороне для непрерывного производства
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <REPORT_NAME>ECC Processtillverkning, Legotillverkning: Batch</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Den här datauppsättningen innehåller information om operationer för legotillverkning för processtillverkning
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <REPORT_NAME>ECC Süreç Üretimi, Fason Üretim İşlem Grubu</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: Bu veri kümesinde, proses yönetimi fason üretim işlemleri hakkında bilgiler saklanır
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>ECC Process Manufacturing, Outside Processing Batch</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: This data set holds information about process manufacturing outside processing operations.
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <REPORT_NAME>ECC Process Manufacturing, 外协加工批</REPORT_NAME>
    <DESCRIPTION>Imported from Enterprise Command Center
Description: 此数据集包含有关流程制造外协加工工序的信息
Dataset Key: gmo-ospdetails
Query Procedure: GMO_ECC_UTIL_PVT.GET_ECC_DATA_LOAD_INFO
Security Procedure: gmo_ecc_datasecurity_pkg_pub.GetFilterAttributeValues</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enterprise Command Center</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>x.organization_id in (select mp.organization_id from mtl_parameters mp where mp.organization_code=:organization_code)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Organization Code</LOV_NAME>
    <LOV_GUID>8E2FF36EDEB279D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
ood.organization_code value,
ood.organization_name||&apos; (&apos;||ftv.territory_short_name||&apos;, &apos;||hla.town_or_city||decode(mp.organization_id,mp.master_organization_id,null,&apos;, &apos;||mp0.organization_code)||&apos;)&apos; description
from
org_organization_definitions ood,
mtl_parameters mp,
mtl_parameters mp0,
hr_all_organization_units haou,
hr_locations_all hla,
fnd_territories_vl ftv
where
ood.organization_id=mp.organization_id and
mp.organization_id&lt;&gt;mp.master_organization_id and
(
ood.organization_id in (select oav.organization_id from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id) or
not exists (select null from org_access_view oav where oav.resp_application_id=fnd_global.resp_appl_id and oav.responsibility_id=fnd_global.resp_id) and
ood.operating_unit in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat union select fnd_global.org_id from dual where fnd_release.major_version=11)
) and
(:$flex$.operating_unit is null or ood.operating_unit in (select haouv.organization_id from hr_all_organization_units_vl haouv where xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos;)) and
(:$flex$.ledger is null or ood.set_of_books_id in (select gl.ledger_id from gl_ledgers gl where xxen_util.contains(:$flex$.ledger,gl.name)=&apos;Y&apos;)) and
nvl(ood.disable_date,sysdate)&gt;=sysdate and
mp.master_organization_id=mp0.organization_id and
ood.organization_id=haou.organization_id(+) and
haou.location_id=hla.location_id(+) and
hla.country=ftv.territory_code(+)
order by
ood.organization_code</LOV_QUERY_DSP>
    <DEFAULT_VALUE>select mp.organization_code from mtl_parameters mp where mp.organization_id=fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Organization Code</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
  </PARAMETERS>
  <TEMPLATES>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
