<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>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: OPM Recipe Details -->
 <REPORTS_ROW>
  <GUID>F7DCF5975D094268E0538638C80A5DC3</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>select
ood.organization_code,
msiv.segment1,
msiv.inventory_item_status_code,
msiv.description,
msiv.weight_uom_code,
cat.ca_code,
grv.recipe_no,
grv.recipe_description,
grv.recipe_version,
gsv_r.meaning recipe_status,
frh.routing_no,
grvr.preference validity_rule_preference,
grvr.start_date validity_rule_from_date,
gsv_v.meaning validity_rule_status,
grvr.std_qty validity_rule_qty,
grvr.detail_uom validity_rule_uom,
ffmb.total_output_qty,
ffmb.yield_uom total_output_uom,
ff.product_line_no,
ff.product_item,
ff.product_qty,
ff.product_uom,
aa.step_no,
coalesce(
(select grrs.step_qty from gmd_recipe_routing_steps grrs where grv.recipe_id=grrs.recipe_id and aa.routingstep_id=grrs.routingstep_id),
aa.step_qty*decode(grv.calculate_step_quantity,1,1,nvl(
case
when frh.routing_uom=ffmb.yield_uom then ffmb.total_output_qty
else
(
select
case
when min(inv_convert.inv_um_convert(fmd.inventory_item_id,9,fmd.qty,fmd.detail_uom,frh.routing_uom,null,null))&gt;=0 and sum(inv_convert.inv_um_convert(fmd.inventory_item_id,9,fmd.qty,fmd.detail_uom,frh.routing_uom,null,null))&gt;0 then sum(inv_convert.inv_um_convert(fmd.inventory_item_id,9,fmd.qty,fmd.detail_uom,frh.routing_uom,null,null))
when inv_convert.inv_um_convert(0,9,ffmb.total_output_qty,ffmb.yield_uom,frh.routing_uom,null,null)&gt;=0 then inv_convert.inv_um_convert(0,9,ffmb.total_output_qty,ffmb.yield_uom,frh.routing_uom,null,null)
end
from
fm_matl_dtl fmd
where
grv.formula_id=fmd.formula_id and
fmd.line_type in (1,2)
)
end/nullif(frh.routing_qty,0),1))
) step_qty,
aa.step_qty_uom,
aa.resource_code,
aa.proc_qty,
aa.proc_uom,
aa.res_usage,
aa.res_uom
from
gmd_recipes_vl grv,
org_organization_definitions ood,
gmd_recipe_validity_rules grvr,
mtl_system_items_vl msiv,
gmd_status_vl gsv_r,
gmd_status_vl gsv_v,
fm_rout_hdr frh,
fm_form_mst_b ffmb,
(
select
mic.organization_id,
mic.inventory_item_id,
mcbk.concatenated_segments ca_code
from
mtl_item_categories mic,
mtl_categories_b_kfv mcbk,
mtl_category_sets_vl mcsv
where
mic.category_id=mcbk.category_id and
mic.category_set_id=mcsv.category_set_id and
mcsv.category_set_name=:p_category_set
) cat,
(
select
fmd.formula_id,
fmd.line_no product_line_no,
msiv_prod.concatenated_segments product_item,
fmd.qty product_qty,
fmd.detail_uom product_uom
from
fm_matl_dtl fmd,
mtl_system_items_vl msiv_prod
where
fmd.line_type=1 and
fmd.inventory_item_id=msiv_prod.inventory_item_id and
fmd.organization_id=msiv_prod.organization_id
) ff,
(
select
frd.routing_id,
frd.routingstep_id,
frd.routingstep_no step_no,
frd.step_qty,
gov.process_qty_uom step_qty_uom,
gor.resources resource_code,
gor.process_qty proc_qty,
gor.resource_process_uom proc_uom,
gor.resource_usage res_usage,
gor.resource_usage_uom res_uom
from
gmd_operation_resources gor,
gmd_operation_activities goa,
gmd_operations_vl gov,
fm_rout_dtl frd
where
gov.oprn_id=frd.oprn_id and
gov.oprn_id=goa.oprn_id and
gor.oprn_line_id=goa.oprn_line_id
) aa
where
1=1 and
ood.organization_id in (select xroa.id from xxen_report_org_access xroa where xroa.access_type=&apos;INV&apos;) and
grv.owner_organization_id=ood.organization_id and
grv.recipe_id=grvr.recipe_id and
grvr.organization_id=ood.organization_id and
msiv.inventory_item_id=grvr.inventory_item_id and
msiv.organization_id=grvr.organization_id and
gsv_r.status_code(+)=grv.recipe_status and
gsv_v.status_code(+)=grvr.validity_rule_status and
grv.routing_id=frh.routing_id(+) and
grv.formula_id=ffmb.formula_id and
grv.formula_id=ff.formula_id(+) and
grv.routing_id=aa.routing_id(+) and
grvr.organization_id=cat.organization_id(+) and
grvr.inventory_item_id=cat.inventory_item_id(+) and
grv.recipe_status&lt;&gt;&apos;1000&apos;
order by
ood.organization_code,
grv.recipe_no</SQL_TEXT>
  <VERSION_COMMENTS>Step Qty shows the step quantity of the Recipe Details form, and new columns Total Output Qty and Total Output Uom from the formula.</VERSION_COMMENTS>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>OPM Recipe Details</REPORT_NAME>
    <DESCRIPTION>OPM (Process Manufacturing) recipe details combining recipe status, validity rules, preferences, formula product quantity and routing step / resource quantities. Supports data cleaning before cost roll up. Optionally shows an item category code via the Category Set parameter.

Step Qty and Total Output Qty are the values of the Recipe Details form: the step quantity is the recipe&apos;s own where the recipe sets one, otherwise the routing step quantity scaled by the formula&apos;s total output over the routing quantity.</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>R12 only</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_category_set</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>ood.organization_code=:p_org_code</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>OPM Organization Code</LOV_NAME>
    <LOV_GUID>53860F993F687167E0630100007F1025</LOV_GUID>
    <LOV_QUERY_DSP>select
ood.organization_code value,
ood.organization_name description
from
org_organization_definitions ood,
mtl_parameters mp
where
ood.organization_id=mp.organization_id and
mp.process_enabled_flag=&apos;Y&apos; and
mp.organization_id&lt;&gt;mp.master_organization_id and
mp.organization_id in (select xroa.id from xxen_report_org_access xroa where xroa.access_type=&apos;INV&apos;) and
nvl(ood.disable_date,sysdate)&gt;=sysdate
order by
ood.organization_code</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Organization Code</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>grv.recipe_no=:p_recipe_no</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <LOV_QUERY_DSP>select distinct
grv.recipe_no value,
grv.recipe_description description
from
gmd_recipes_vl grv,
org_organization_definitions ood
where
grv.owner_organization_id=ood.organization_id and
grv.recipe_status&lt;&gt;&apos;1000&apos; and
(:$flex$.organization_code is null or xxen_util.contains(:$flex$.organization_code,ood.organization_code)=&apos;Y&apos;) and
ood.organization_id in (select xroa.id from xxen_report_org_access xroa where xroa.access_type=&apos;INV&apos;)
order by
grv.recipe_no</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Recipe</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>msiv.concatenated_segments=:p_item</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>OPM Item Number</LOV_NAME>
    <LOV_GUID>53860F993F697167E0630100007F1025</LOV_GUID>
    <LOV_QUERY_DSP>select distinct
msiv.concatenated_segments value,
msiv.description
from
mtl_system_items_vl msiv,
mtl_parameters mp
where
msiv.organization_id=mp.organization_id and
mp.process_enabled_flag=&apos;Y&apos; and
(xxen_util.contains(:$flex$.organization_code,mp.organization_code)=&apos;Y&apos; or
(:$flex$.organization_code is null and mp.organization_id in (select xroa.id from xxen_report_org_access xroa where xroa.access_type=&apos;INV&apos;)))
order by
msiv.concatenated_segments</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Item</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>4</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>grv.recipe_status=:p_recipe_status</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>OPM Status Code</LOV_NAME>
    <LOV_GUID>1A5739C5DE270375E0630100007F5142</LOV_GUID>
    <LOV_QUERY_DSP>select
gsv.status_code value,
gsv.description
from
gmd_status_vl gsv
order by
to_number(gsv.status_code)</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Recipe Status</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>:p_category_set</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Category Set</LOV_NAME>
    <LOV_GUID>8E2FF36EDECA79D2E0530100007F1FF2</LOV_GUID>
    <LOV_QUERY_DSP>select distinct
mcsv.category_set_name value,
mcsv.description
from
mtl_category_sets_vl mcsv
where
:$flex$.organization_code is null or
mcsv.category_set_id in (select mic.category_set_id from mtl_parameters mp, mtl_item_categories mic where xxen_util.contains(:$flex$.organization_code,mp.organization_code)=&apos;Y&apos; and mp.organization_id=mic.organization_id)
order by
mcsv.category_set_name</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Category Set</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>
