<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: INL Landed Unit Cost Trend -->
 <REPORTS_ROW>
  <GUID>63675B183CE24A299AF2289D405FAF41</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>select
y.*,
y.unit_landed_cost-y.previous_unit_landed_cost unit_landed_cost_change,
round(100*(y.unit_landed_cost-y.previous_unit_landed_cost)/nullif(y.previous_unit_landed_cost,0),2) unit_landed_cost_change_pct
from
(
select
haouv.name operating_unit,
mp.organization_code,
msiv.concatenated_segments item,
msiv.description item_description,
ish.ship_date shipment_date,
ish.ship_num shipment_number,
isl.ship_line_num shipment_line,
aps.vendor_name supplier,
(select ftv.territory_short_name from fnd_territories_vl ftv where nvl(rsl.country_of_origin_code,plla.country_of_origin_code)=ftv.territory_code) country_of_origin,
pha.segment1 po_number,
pla.line_num po_line,
isl.primary_qty quantity,
isl.primary_uom_code uom,
pha.currency_code po_currency,
plla.price_override po_unit_price,
gl.currency_code,
z.item_current/nullif(isl.primary_qty,0) unit_item_cost,
z.charges_current/nullif(isl.primary_qty,0) unit_charges,
z.taxes_current/nullif(isl.primary_qty,0) unit_taxes,
(z.item_estimated+z.charges_estimated+z.taxes_estimated)/nullif(isl.primary_qty,0) estimated_unit_landed_cost,
(z.item_current+z.charges_current+z.taxes_current)/nullif(isl.primary_qty,0) unit_landed_cost,
lag((z.item_current+z.charges_current+z.taxes_current)/nullif(isl.primary_qty,0)) over (partition by ish.organization_id, isl.inventory_item_id order by ish.ship_date, ish.ship_num, isl.ship_line_num) previous_unit_landed_cost,
round(100*(z.charges_current+z.taxes_current)/nullif(z.item_current,0),2) landed_cost_uplift_percent,
z.item_current+z.charges_current+z.taxes_current landed_cost
from
(
select
ia.ship_header_id,
nvl(isl.parent_ship_line_id,isl.ship_line_id) ship_line_id,
sum(case when ia.adjustment_num=0 and ia.from_parent_table_name=&apos;INL_SHIP_LINES&apos; then ia.allocation_amt else 0 end) item_estimated,
sum(case when ia.adjustment_num=0 and ia.from_parent_table_name=&apos;INL_CHARGE_LINES&apos; then ia.allocation_amt else 0 end) charges_estimated,
sum(case when ia.adjustment_num=0 and ia.from_parent_table_name=&apos;INL_TAX_LINES&apos; then ia.allocation_amt else 0 end) taxes_estimated,
sum(case when ia.adjustment_num=ish.adjustment_num and ia.from_parent_table_name=&apos;INL_SHIP_LINES&apos; then ia.allocation_amt else 0 end) item_current,
sum(case when ia.adjustment_num=ish.adjustment_num and ia.from_parent_table_name=&apos;INL_CHARGE_LINES&apos; then ia.allocation_amt else 0 end) charges_current,
sum(case when ia.adjustment_num=ish.adjustment_num and ia.from_parent_table_name=&apos;INL_TAX_LINES&apos; then ia.allocation_amt else 0 end) taxes_current
from
inl_ship_headers_all ish,
inl_allocations ia,
inl_ship_lines_all isl
where
1=1 and
2=2 and
ish.simulation_id is null and
ish.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) and
ish.ship_header_id=ia.ship_header_id and
ia.adjustment_num in (0,ish.adjustment_num) and
ia.landed_cost_flag=&apos;Y&apos; and
ia.ship_line_id=isl.ship_line_id
group by
ia.ship_header_id,
nvl(isl.parent_ship_line_id,isl.ship_line_id)
) z,
inl_ship_headers_all ish,
inl_ship_lines_all isl,
inl_ship_line_groups islg,
hr_all_organization_units_vl haouv,
mtl_parameters mp,
org_organization_definitions ood,
gl_ledgers gl,
mtl_system_items_vl msiv,
ap_suppliers aps,
po_line_locations_all plla,
po_lines_all pla,
po_headers_all pha,
rcv_shipment_lines rsl
where
3=3 and
z.ship_header_id=ish.ship_header_id and
z.ship_line_id=isl.ship_line_id and
isl.ship_line_group_id=islg.ship_line_group_id and
ish.org_id=haouv.organization_id and
ish.organization_id=mp.organization_id and
ish.organization_id=ood.organization_id and
ood.set_of_books_id=gl.ledger_id and
isl.inventory_item_id=msiv.inventory_item_id and
ish.organization_id=msiv.organization_id and
islg.party_id=aps.party_id(+) and
decode(isl.ship_line_src_type_code,&apos;PO&apos;,isl.ship_line_source_id)=plla.line_location_id(+) and
plla.po_line_id=pla.po_line_id(+) and
plla.po_header_id=pha.po_header_id(+) and
isl.ship_line_id=rsl.lcm_shipment_line_id(+)
) y
order by
y.operating_unit,
y.organization_code,
y.item,
y.shipment_date,
y.shipment_number,
y.shipment_line</SQL_TEXT>
  <VERSION_COMMENTS>Initial version</VERSION_COMMENTS>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>INL Landed Unit Cost Trend</REPORT_NAME>
    <DESCRIPTION>Unit landed cost per item over its landed cost shipments, broken down into item cost, charges and taxes, with the change against the item&apos;s previous shipment in the same organization.

Unit amounts are the current landed cost allocations in functional currency divided by the shipment line&apos;s primary quantity, Estimated Unit Landed Cost the first calculation. The previous shipment is taken from the shipments within the parameter selection.</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>2=2</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>3=3</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>ish.org_id in (select haouv.organization_id from hr_all_organization_units_vl haouv where haouv.name=:operating_unit)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>HR Operating Unit</LOV_NAME>
    <LOV_GUID>8E2FF36EDEB979D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
hou.name value,
null description
from
hr_operating_units hou
where
sysdate between hou.date_from and nvl(hou.date_to,sysdate) and
(:$flex$.ledger is null or hou.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
hou.organization_id in (select xroa.id from xxen_report_org_access xroa where xroa.access_type=&apos;OU&apos;)
order by
hou.name</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Operating Unit</PARAMETER_NAME>
      <DESCRIPTION>Operating unit of the landed cost shipment.</DESCRIPTION>
     </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>ish.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 xroa.id from xxen_report_org_access xroa where xroa.access_type=&apos;INV&apos;) or
not exists (select null from xxen_report_org_access xroa where xroa.access_type=&apos;INV&apos;) and
ood.operating_unit in (select xroa.id from xxen_report_org_access xroa where xroa.access_type=&apos;OU&apos;)
) 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>
      <DESCRIPTION>Inventory organization receiving the goods.</DESCRIPTION>
     </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>ish.ship_date&gt;=:shipment_date_from</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Shipment Date From</PARAMETER_NAME>
      <DESCRIPTION>Landed cost shipment date from.</DESCRIPTION>
     </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>ish.ship_date&lt;:shipment_date_to+1</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>last_day(:$flex$.shipment_date_from)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Shipment Date To</PARAMETER_NAME>
      <DESCRIPTION>Landed cost shipment date to.</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>isl.ship_line_group_id in (select islg.ship_line_group_id from inl_ship_line_groups islg, ap_suppliers aps where islg.party_id=aps.party_id and aps.vendor_name=:supplier)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>AP Supplier</LOV_NAME>
    <LOV_GUID>B9847D20A0E4742FE0538931640A6379</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select
aps.vendor_name value,
aps.segment1 description
from
ap_suppliers aps
where
(:$flex$.operating_unit is null or aps.vendor_id in (select assa.vendor_id from hr_all_organization_units_vl haouv, ap_supplier_sites_all assa where xxen_util.contains(:$flex$.operating_unit,haouv.name)=&apos;Y&apos; and haouv.organization_id=assa.org_id)) and
(:$flex$.organization_code is null or aps.vendor_id in (select assa.vendor_id from org_organization_definitions ood, ap_supplier_sites_all assa where xxen_util.contains(:$flex$.organization_code,ood.organization_code)=&apos;Y&apos; and ood.operating_unit=assa.org_id))
order by
aps.vendor_name,
aps.vendor_id</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Supplier</PARAMETER_NAME>
      <DESCRIPTION>Supplier of the goods.</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>6</SORT_ORDER>
    <DISPLAY_SEQUENCE>60</DISPLAY_SEQUENCE>
    <ANCHOR>2=2</ANCHOR>
    <SQL_TEXT>isl.inventory_item_id in (select msiv.inventory_item_id from mtl_system_items_vl msiv where ish.organization_id=msiv.organization_id and msiv.concatenated_segments=:item)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV Item</LOV_NAME>
    <LOV_GUID>8E2FF36EDEF179D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <FILTER_BEFORE_DISPLAY_DSP>Y</FILTER_BEFORE_DISPLAY_DSP>
    <LOV_QUERY_DSP>select
msiv.concatenated_segments value,
msiv.description||&apos; (&apos;||mp.organization_code||&apos;)&apos; description
from
mtl_system_items_vl msiv,
mtl_parameters mp
where
(
:$flex$.organization_code is null and (
fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;) is null and msiv.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
msiv.organization_id=fnd_profile.value(&apos;MFG_ORGANIZATION_ID&apos;)
) or
xxen_util.contains(:$flex$.organization_code,mp.organization_code)=&apos;Y&apos;
) and
msiv.organization_id=mp.organization_id
order by
mp.organization_code,
msiv.concatenated_segments</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Item</PARAMETER_NAME>
      <DESCRIPTION>Item received on the shipment line.</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>7</SORT_ORDER>
    <DISPLAY_SEQUENCE>70</DISPLAY_SEQUENCE>
    <ANCHOR>3=3</ANCHOR>
    <SQL_TEXT>nvl(rsl.country_of_origin_code,plla.country_of_origin_code) in (select ftv.territory_code from fnd_territories_vl ftv where ftv.territory_short_name=:country_of_origin)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>Country</LOV_NAME>
    <LOV_GUID>8E2FF36EDE8379D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
ftv.territory_short_name value,
ftv.territory_code||&apos;: &apos;||ftv.description description
from
fnd_territories_vl ftv
order by
ftv.territory_short_name</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Country of Origin</PARAMETER_NAME>
      <DESCRIPTION>Country of origin of the goods, from the receipt line, else the PO shipment.</DESCRIPTION>
     </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>
