<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: INV Movement Statistics -->
 <REPORTS_ROW>
  <GUID>41D6D8190A87CF9BE06362FB0905CAA4</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>select distinct
x.*,
-- Report Title based on Movement Type and Report Option
case
when :p_report_option in (&apos;S/S&apos;,&apos;O/S&apos;) and x.movement_type=&apos;A&apos; then &apos;Arrival Movement Statistics Summary&apos;
when :p_report_option=&apos;S/D&apos; and x.movement_type=&apos;A&apos; then &apos;Arrival Movement Statistics Detail&apos;
when :p_report_option in (&apos;S/S&apos;,&apos;O/S&apos;) and x.movement_type=&apos;AA&apos; then &apos;Arrival Adjustment Movement Statistics Summary&apos;
when :p_report_option=&apos;S/D&apos; and x.movement_type=&apos;AA&apos; then &apos;Arrival Adjustment Movement Statistics Detail&apos;
when :p_report_option in (&apos;S/S&apos;,&apos;O/S&apos;) and x.movement_type=&apos;D&apos; then &apos;Dispatch Movement Statistics Summary&apos;
when :p_report_option=&apos;S/D&apos; and x.movement_type=&apos;D&apos; then &apos;Dispatch Movement Statistics Detail&apos;
when :p_report_option in (&apos;S/S&apos;,&apos;O/S&apos;) and x.movement_type=&apos;DA&apos; then &apos;Dispatch Adjustment Movement Statistics Summary&apos;
when :p_report_option=&apos;S/D&apos; and x.movement_type=&apos;DA&apos; then &apos;Dispatch Adjustment Movement Statistics Detail&apos;
end report_title,
-- Legal Entity Information
gllv.legal_entity_name,
hl.address_line_1 entity_address_line_1,
hl.address_line_2 entity_address_line_2,
hl.address_line_3 entity_address_line_3,
hl.telephone_number_1,
hl.telephone_number_2,
ppf.full_name contact_person_name,
inv_mgd_mvt_utils_pkg.get_org_vat_number(x.legal_entity_id,sysdate) vat_registration_number,
gllv.ledger_name set_of_books_name,
-- Tax Office Information
mstu.tax_office_name,
mstu.weight_uom_code standard_uom,
nvl(hlt.address_line_1,hzl.address1) tax_office_address_line_1,
nvl(hlt.address_line_2,hzl.address2) tax_office_address_line_2,
nvl(hlt.address_line_3,hzl.address3) tax_office_address_line_3,
-- Period Information
gp.start_date period_start_date,
gp.end_date period_end_date,
-- Parameter Display Values
(select mezv.zone_display_name from mtl_economic_zones_vl mezv where mezv.zone_code=x.zone_code) zone_name,
(select
flv_rep.meaning
from
fnd_lookup_values flv_rep
where
flv_rep.lookup_type=&apos;INTRASTAT_REPORT_OPTION&apos; and
flv_rep.lookup_code=:p_report_option and
flv_rep.language=userenv(&apos;LANG&apos;)
) report_option_meaning,
(select flv_mv.meaning from fnd_lookups flv_mv where flv_mv.lookup_type=&apos;MVT_MOVEMENT_TYPE&apos; and flv_mv.lookup_code=x.movement_type) movement_type_meaning,
flv_usage.meaning usage_type_meaning,
flv_stat.meaning stat_type_meaning,
:p_currency_code currency_code,
:p_exchange_rate exchange_rate
from
(
select
mms.parent_movement_id,
mms.invoice_id,
mms.movement_id,
mms.transaction_nature,
mms.delivery_terms,
mms.period_name,
mms.entity_org_id legal_entity_id,
mms.usage_type,
mms.stat_type,
mms.zone_code,
    -- Territory codes with Germany special handling
    case
         when (mms.movement_type in (&apos;A&apos;,&apos;DA&apos;) and mms.destination_territory_code=&apos;DE&apos;) or
              (mms.movement_type in (&apos;D&apos;,&apos;AA&apos;) and mms.dispatch_territory_code=&apos;DE&apos;)
         then mms.dispatch_territory_code
         else mms.dispatch_territory_eu_code||&apos;-&apos;||mms.dispatch_territory_code
    end dispatch_terr_eu_code,
    case
         when (mms.movement_type in (&apos;A&apos;,&apos;DA&apos;) and mms.destination_territory_code=&apos;DE&apos;) or
              (mms.movement_type in (&apos;D&apos;,&apos;AA&apos;) and mms.dispatch_territory_code=&apos;DE&apos;)
         then mms.destination_territory_code
         else mms.destination_territory_eu_code||&apos;-&apos;||mms.destination_territory_code
    end destination_terr_eu_code,
    case
         when (mms.movement_type in (&apos;A&apos;,&apos;DA&apos;) and mms.destination_territory_code=&apos;DE&apos;) or
              (mms.movement_type in (&apos;D&apos;,&apos;AA&apos;) and mms.dispatch_territory_code=&apos;DE&apos;)
         then mms.origin_territory_code
         else mms.origin_territory_eu_code||&apos;-&apos;||mms.origin_territory_code
    end origin_terr_eu_code,
    -- Parent Movement Territory Code
    case
      when mms.movement_type in (&apos;A&apos;,&apos;DA&apos;) then
        case when substr(mms.destination_territory_eu_code||&apos;-&apos;||mms.destination_territory_code,
                         instr(mms.destination_territory_eu_code||&apos;-&apos;||mms.destination_territory_code,&apos;-&apos;,1,1)+1)=&apos;DE&apos;
             then substr(mms.dispatch_territory_eu_code||&apos;-&apos;||mms.dispatch_territory_code,
                        instr(mms.dispatch_territory_eu_code||&apos;-&apos;||mms.dispatch_territory_code,&apos;-&apos;,1,1)+1)
             else mms.dispatch_territory_eu_code||&apos;-&apos;||mms.dispatch_territory_code
        end
      when mms.movement_type in (&apos;D&apos;,&apos;AA&apos;) then
        case when substr(mms.dispatch_territory_eu_code||&apos;-&apos;||mms.dispatch_territory_code,
                         instr(mms.dispatch_territory_eu_code||&apos;-&apos;||mms.dispatch_territory_code,&apos;-&apos;,1,1)+1)=&apos;DE&apos;
             then substr(mms.destination_territory_eu_code||&apos;-&apos;||mms.destination_territory_code,
                        instr(mms.destination_territory_eu_code||&apos;-&apos;||mms.destination_territory_code,&apos;-&apos;,1,1)+1)
             else mms.destination_territory_eu_code||&apos;-&apos;||mms.destination_territory_code
        end
    end parent_mvt_terr_code,
mms.area,
mms.port,
mms.inventory_item_id,
mms.organization_id,
mms.document_source_type,
round((mms.item_cost*:p_exchange_rate),nvl(fc.extended_precision,2)) item_cost,
mms.item_description,
mms.document_reference,
mms.document_line_reference,
mms.invoice_batch_reference,
mms.invoice_reference,
mms.invoice_line_reference,
mms.transaction_date,
mms.transaction_uom_code,
round((mms.currency_conversion_rate*:p_exchange_rate),5) currency_conversion_rate,
mms.currency_code movement_currency_code,
mms.outside_code,
mms.customer_vat_number vat_num,
mms.report_reference,
mms.transport_mode,
mms.customer_name,
mms.transacting_from_org,
mms.transacting_to_org,
mms.vendor_name,
mms.ship_to_customer_id,
mms.ship_to_site_use_id,
mms.vendor_id,
mms.vendor_site_id,
mms.from_organization_id,
mms.to_organization_id,
mms.customer_number,
mms.vendor_number,
mms.customer_location,
mms.vendor_site,
mms.po_header_id,
mms.order_header_id,
mms.po_line_id,
mms.order_line_id,
mms.invoice_batch_id,
mms.alternate_uom_code,
mms.movement_status,
mms.shipment_reference,
mms.po_line_location_id,
mms.shipment_line_reference,
mms.shipment_line_id,
mms.receipt_reference,
mms.pick_slip_reference,
mms.picking_line_id,
mms.invoice_date_reference,
mms.shipment_header_id,
mms.comments,
mms.container_type_code container,
mms.statistical_procedure_code statistical_procedure,
mms.customer_trx_line_id,
mms.movement_type,
mms.requisition_header_id,
mms.requisition_line_id,
mms.mtl_transaction_id,
mms.distribution_line_number,
mms.rcv_transaction_id,
mms.commodity_code,
mms.commodity_description,
msi.primary_uom_code,
   mstl.description item_desc,
    fl.meaning document_source_meaning,
    msi.concatenated_segments item_flex,
    pr.release_num release_number,
    nvl(fc2.precision,2) precision_trx,
    nvl(sum(mms.alternate_quantity) over (partition by mms.parent_movement_id),
        sum(mms.transaction_quantity) over (partition by mms.parent_movement_id)) parent_mvt_quantity,
    nvl(mms.alternate_uom_code,mms.transaction_uom_code) parent_mvt_uom,
    sum(mms.transaction_quantity) over(partition by mms.parent_movement_id) transaction_quantity,
    sum(mms.alternate_quantity) over(partition by mms.parent_movement_id) alternate_quantity,
    sum(mms.primary_quantity) over(partition by mms.parent_movement_id) primary_quantity,
    sum(mms.invoice_quantity) over(partition by mms.parent_movement_id) invoice_quantity,
    case
         when (mms.movement_type in (&apos;A&apos;,&apos;DA&apos;) and mms.destination_territory_code=&apos;DE&apos;) or
              (mms.movement_type in (&apos;D&apos;,&apos;AA&apos;) and mms.dispatch_territory_code=&apos;DE&apos;)
         then inv_mgd_mvt_utils_pkg.round_number(sum(mms.total_weight) over(partition by mms.parent_movement_id),0,&apos;NORMAL&apos;)
         else inv_mgd_mvt_utils_pkg.round_number(sum(mms.total_weight) over(partition by mms.parent_movement_id),:p_rep_precision,:p_rep_rounding)
    end total_weight,
    sum(mms.invoice_line_ext_value) over(partition by mms.parent_movement_id) invoice_line_ext_value,
    sum(mms.document_line_ext_value) over(partition by mms.parent_movement_id) document_line_ext_value,
    sum(mms.outside_ext_value) over(partition by mms.parent_movement_id) outside_ext_value,
    case
         when (mms.movement_type in (&apos;A&apos;,&apos;DA&apos;) and mms.destination_territory_code=&apos;DE&apos;) or
              (mms.movement_type in (&apos;D&apos;,&apos;AA&apos;) and mms.dispatch_territory_code=&apos;DE&apos;)
         then case
                   when ((sum(mms.movement_amount) over (partition by mms.parent_movement_id))*:p_exchange_rate) between 0 and 0.5
                   then 1
                   else inv_mgd_mvt_utils_pkg.round_number((sum(mms.movement_amount) over (partition by mms.parent_movement_id))*:p_exchange_rate,0,&apos;NORMAL&apos;)
              end
         else inv_mgd_mvt_utils_pkg.round_number((sum(mms.movement_amount) over (partition by mms.parent_movement_id))*:p_exchange_rate,:p_rep_precision,:p_rep_rounding)
    end transaction_value,
    case
         when (mms.movement_type in (&apos;A&apos;,&apos;DA&apos;) and mms.destination_territory_code=&apos;DE&apos;) or
              (mms.movement_type in (&apos;D&apos;,&apos;AA&apos;) and mms.dispatch_territory_code=&apos;DE&apos;)
         then case
                 when ((sum(mms.stat_ext_value) over (partition by mms.parent_movement_id))*:p_exchange_rate) between 0 and 0.5
                 then 1
                 else inv_mgd_mvt_utils_pkg.round_number((sum(mms.stat_ext_value) over (partition by mms.parent_movement_id))*:p_exchange_rate,0,&apos;NORMAL&apos;)
              end
         else inv_mgd_mvt_utils_pkg.round_number((sum(mms.stat_ext_value) over (partition by mms.parent_movement_id))*:p_exchange_rate,:p_rep_precision,:p_rep_rounding)
    end statistical_value,
    round(sum(mms.outside_ext_value) over (partition by mms.parent_movement_id),nvl(fc2.precision,2)) outside_value_r,
    round(sum(mms.document_line_ext_value) over (partition by mms.parent_movement_id),nvl(fc2.precision,2)) document_line_ext_val_r,
    round(sum(mms.invoice_line_ext_value) over (partition by mms.parent_movement_id),nvl(fc2.precision,2)) invoice_line_ext_val_r,
    -- Trader Type
    case
      when :p_report_option=&apos;S/D&apos; then
        case
          when mms.document_source_type in (&apos;SO&apos;,&apos;RMA&apos;) then &apos;Customer&apos;
          when mms.document_source_type in (&apos;PO&apos;,&apos;RTV&apos;) then &apos;Vendor&apos;
          when mms.document_source_type in (&apos;IO&apos;,&apos;INV&apos;,&apos;IRET&apos;) then &apos;Organization&apos;
          when mms.document_source_type=&apos;MISC&apos; then
            case
              when mms.customer_name is not null then &apos;Customer&apos;
              when mms.vendor_name is not null then &apos;Vendor&apos;
              when mms.transacting_from_org is not null or mms.transacting_to_org is not null then &apos;Organization&apos;
            end
        end
    end trader_type,
    case
      when :p_report_option=&apos;S/D&apos; then
        case
          when mms.document_source_type in (&apos;SO&apos;,&apos;RMA&apos;) then nvl(mms.customer_number,hca.account_number)
          when mms.document_source_type in (&apos;PO&apos;,&apos;RTV&apos;) then mms.vendor_number
          when mms.document_source_type=&apos;MISC&apos; then nvl(mms.customer_number,mms.vendor_number)
        end
    end trader_number,
    case
      when :p_report_option=&apos;S/D&apos; then
        case
          when mms.document_source_type in (&apos;SO&apos;,&apos;RMA&apos;) then nvl(mms.customer_location,hcsu.location)
          when mms.document_source_type in (&apos;PO&apos;,&apos;RTV&apos;) then mms.vendor_site
          when mms.document_source_type=&apos;MISC&apos; then
            case when mms.customer_name is not null then mms.customer_location
                 when mms.vendor_name is not null then mms.vendor_site
            end
        end
    end trader_site,
    case
      when :p_report_option=&apos;S/D&apos; then
        case
          when mms.document_source_type in (&apos;SO&apos;,&apos;RMA&apos;) then nvl(mms.customer_name,hp.party_name)
          when mms.document_source_type in (&apos;PO&apos;,&apos;RTV&apos;) then mms.vendor_name
          when mms.document_source_type in (&apos;IO&apos;,&apos;INV&apos;) then
            case when mms.movement_type in (&apos;A&apos;,&apos;AA&apos;) then hou_from.name
            else hou_to.name
            end
          when mms.document_source_type=&apos;IRET&apos; then
            case when mms.movement_type in (&apos;D&apos;,&apos;AA&apos;) then hou_to.name
            else hou_from.name
            end
          when mms.document_source_type=&apos;MISC&apos; then
            coalesce(mms.customer_name,mms.vendor_name,mms.transacting_from_org,mms.transacting_to_org)
        end
    end trader_name,
    case
      when :p_report_option=&apos;S/D&apos; then
        case
          when mms.document_source_type=&apos;MISC&apos; then mms.document_reference
          when mms.document_source_type in (&apos;PO&apos;,&apos;RTV&apos;) then ph.segment1
          when mms.document_source_type in (&apos;SO&apos;,&apos;RMA&apos;) then to_char(oh.order_number)
          when mms.document_source_type=&apos;IO&apos; then
            case when mms.movement_type=&apos;A&apos; then prh.segment1
            else to_char(oh.order_number)
            end
          when mms.document_source_type=&apos;IRET&apos; then
            case when mms.movement_type in (&apos;D&apos;,&apos;AA&apos;) then prh.segment1
            else to_char(oh.order_number)
            end
          when mms.document_source_type=&apos;INV&apos; then to_char(mms.mtl_transaction_id)
        end
    end source_number,
    case
      when :p_report_option=&apos;S/D&apos; then
        case
          when mms.document_source_type=&apos;MISC&apos; then mms.document_line_reference
          when mms.document_source_type in (&apos;PO&apos;,&apos;RTV&apos;) then to_char(pl.line_num)
          when mms.document_source_type in (&apos;SO&apos;,&apos;RMA&apos;) then to_char(ol.line_number)
          when mms.document_source_type=&apos;IO&apos; then
            case when mms.movement_type=&apos;A&apos; then to_char(prl.line_num)
            else to_char(ol.line_number)
            end
          when mms.document_source_type=&apos;IRET&apos; then
            case when mms.movement_type in (&apos;D&apos;,&apos;AA&apos;) then to_char(prl.line_num)
            else to_char(ol.line_number)
            end
        end
    end source_line_number,
    case
      when :p_report_option=&apos;S/D&apos; then
        case
          when mms.document_source_type=&apos;MISC&apos; then mms.invoice_reference
          when mms.document_source_type in (&apos;PO&apos;,&apos;RTV&apos;) and mms.invoice_id is not null then ai.invoice_num
          when mms.document_source_type in (&apos;SO&apos;,&apos;RMA&apos;) and mms.invoice_id is not null then
            nvl(rct.trx_number,
                case when mms.movement_type=&apos;A&apos; then ai.invoice_num end)
          when mms.document_source_type=&apos;IO&apos; and mms.movement_type=&apos;A&apos; and mms.invoice_id is not null then ai.invoice_num
          when mms.document_source_type=&apos;IO&apos; and mms.movement_type=&apos;D&apos; and mms.invoice_id is not null then rct.trx_number
          when mms.document_source_type=&apos;IRET&apos; and mms.movement_type in (&apos;D&apos;,&apos;AA&apos;) and mms.invoice_id is not null then ai.invoice_num
          when mms.document_source_type=&apos;IRET&apos; and mms.movement_type in (&apos;A&apos;,&apos;DA&apos;) and mms.invoice_id is not null then rct.trx_number
        end
    end invoice_number,
    case
      when :p_report_option=&apos;S/D&apos; then
        case
          when mms.document_source_type=&apos;MISC&apos; then
            case when mms.movement_type in (&apos;A&apos;,&apos;AA&apos;) then mms.receipt_reference else mms.pick_slip_reference end
          when mms.document_source_type in (&apos;PO&apos;,&apos;RTV&apos;,&apos;RMA&apos;) and mms.shipment_header_id is not null then rsh.receipt_num
          when mms.document_source_type=&apos;SO&apos; then mms.shipment_reference
        end
    end receipt_number,
    case
      when :p_report_option=&apos;S/D&apos; then
        case
          when mms.document_source_type=&apos;MISC&apos; then mms.shipment_reference
          when mms.document_source_type in (&apos;PO&apos;,&apos;RTV&apos;) then to_char(pll.shipment_num)
        end
    end shipment_number,
    case
      when :p_report_option=&apos;S/D&apos; then
        case
          when mms.document_source_type=&apos;MISC&apos; then mms.shipment_line_reference
          when mms.document_source_type in (&apos;PO&apos;,&apos;RTV&apos;) then to_char(rsl.line_num)
        end
    end shipment_line,
    case
      when :p_report_option=&apos;S/D&apos; then
        nvl(rctl.uom_code,mms.transaction_uom_code)
    end invoice_uom_code,
    case
      when :p_report_option=&apos;S/D&apos; then
        case
          when mms.document_source_type=&apos;MISC&apos; then mms.invoice_line_reference
          when mms.document_source_type in (&apos;PO&apos;,&apos;RTV&apos;) or (mms.document_source_type=&apos;SO&apos; and mms.movement_type=&apos;A&apos;) then
            to_char(mms.distribution_line_number)
          when mms.document_source_type=&apos;RMA&apos; or (mms.document_source_type=&apos;SO&apos; and mms.movement_type=&apos;D&apos;) then
            to_char(rctl.line_number)
          when (mms.document_source_type=&apos;IO&apos; and mms.movement_type=&apos;A&apos;) or (mms.document_source_type=&apos;IRET&apos; and mms.movement_type in (&apos;D&apos;,&apos;AA&apos;)) then
            to_char(mms.distribution_line_number)
          when (mms.document_source_type=&apos;IO&apos; and mms.movement_type=&apos;D&apos;) or (mms.document_source_type=&apos;IRET&apos; and mms.movement_type in (&apos;A&apos;,&apos;DA&apos;)) then
            to_char(rctl.line_number)
        end
    end invoice_line_number
from
mtl_movement_statistics mms,
mtl_system_items_kfv msi,
fnd_lookups fl,
mtl_system_items_tl mstl,
fnd_currencies fc,
fnd_currencies fc2,
rcv_transactions rt,
po_releases_all pr,
hz_cust_accounts hca,
hz_parties hp,
hz_cust_site_uses_all hcsu,
hr_organization_units hou_from,
hr_organization_units hou_to,
po_headers_all ph,
oe_order_headers_all oh,
po_requisition_headers_all prh,
po_lines_all pl,
oe_order_lines_all ol,
po_requisition_lines_all prl,
ap_invoices_all ai,
ra_customer_trx_all rct,
rcv_shipment_headers rsh,
po_line_locations_all pll,
rcv_shipment_lines rsl,
ra_customer_trx_lines_all rctl
where
mms.inventory_item_id=msi.inventory_item_id(+) and
mms.organization_id=msi.organization_id(+) and
msi.inventory_item_id=mstl.inventory_item_id(+) and
msi.organization_id=mstl.organization_id(+) and
mstl.language(+)=userenv(&apos;LANG&apos;) and
fl.lookup_type=&apos;MVT_SOURCE_DOCUMENT_TYPES&apos; and
fl.lookup_code=mms.document_source_type and
fc2.currency_code(+)=mms.currency_code and
rt.transaction_id(+)=mms.rcv_transaction_id and
pr.po_release_id(+)=rt.po_release_id and
hca.cust_account_id(+)=mms.ship_to_customer_id and
hp.party_id(+)=hca.party_id and
hcsu.site_use_id(+)=mms.ship_to_site_use_id and
hou_from.organization_id(+)=mms.from_organization_id and
hou_to.organization_id(+)=mms.to_organization_id and
ph.po_header_id(+)=mms.po_header_id and
oh.header_id(+)=mms.order_header_id and
prh.requisition_header_id(+)=mms.requisition_header_id and
pl.po_line_id(+)=mms.po_line_id and
ol.line_id(+)=mms.order_line_id and
prl.requisition_line_id(+)=mms.requisition_line_id and
ai.invoice_id(+)=mms.invoice_id and
rct.customer_trx_id(+)=mms.invoice_id and
rsh.shipment_header_id(+)=mms.shipment_header_id and
pll.line_location_id(+)=mms.po_line_location_id and
rsl.shipment_line_id(+)=mms.shipment_line_id and
rctl.customer_trx_line_id(+)=mms.customer_trx_line_id and
1=1 and
mms.movement_status in (&apos;O&apos;,&apos;V&apos;) and
(
  (mms.movement_type in (&apos;A&apos;,&apos;D&apos;) and mms.parent_movement_id=mms.movement_id)
  or
  (mms.movement_type not in (&apos;A&apos;,&apos;D&apos;) and mms.movement_id=(
select min(mms2.movement_id)
from mtl_movement_statistics mms2
where mms2.parent_movement_id=mms.parent_movement_id and
mms2.movement_type=mms.movement_type
  ))
)
) x,
gl_ledger_le_v gllv,
hr_locations_no_join hl,
per_people_f ppf,
mtl_stat_type_usages mstu,
hr_locations_no_join hlt,
hz_locations hzl,
gl_periods gp,
fnd_lookups flv_usage,
fnd_lookups flv_stat
where
2=2 and
gp.period_name=x.period_name and
mstu.stat_type=x.stat_type and
mstu.usage_type=x.usage_type and
mstu.zone_code=x.zone_code and
flv_usage.lookup_type=&apos;MVT_USAGE_TYPES&apos; and
flv_usage.lookup_code=mstu.usage_type and
flv_stat.lookup_type=&apos;MVT_STAT_TYPES&apos; and
mstu.stat_type=flv_stat.lookup_code and
gllv.legal_entity_id=x.legal_entity_id and
gllv.legal_entity_id=mstu.legal_entity_id and
gllv.ledger_category_code=&apos;PRIMARY&apos; and
gllv.location_id=hl.location_id(+) and
hl.designated_receiver_id=ppf.person_id(+) and
mstu.tax_office_location_id=hlt.location_id(+) and
mstu.tax_office_location_id=hzl.location_id(+)
order by
x.commodity_code,
x.parent_movement_id,
x.movement_id,
x.transport_mode,
x.transaction_nature,
x.dispatch_terr_eu_code,
x.destination_terr_eu_code</SQL_TEXT>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <REPORT_NAME>INV تقرير إحصائيات النقل (بتنسيق XML)</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: تقرير إحصائيات النقل ( تقريرINTRASTAT )
Application: المخازن
Source: تقرير إحصائيات النقل (بتنسيق XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <REPORT_NAME>INV Bewegungsstatistiken</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: Auswertung &quot;Bewegungsstatistiken&quot; (INTRASTAT-Auswertung)
Application: Lager
Source: Bewegungsstatistiken (XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>E</LANGUAGE>
    <REPORT_NAME>INV Estadísticas de Movimiento</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: Informe Estadísticas de Movimiento (Informe INTRASTAT)
Application: Inventory
Source: Estadísticas de Movimiento (XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <REPORT_NAME>INV Déclaration d&apos;échanges de biens</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: Déclaration d&apos;échanges de biens (état INTRACOMMUNAUTAIRE)
Application: Inventory
Source: Déclaration d&apos;échanges de biens (XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>I</LANGUAGE>
    <REPORT_NAME>INV Rapporto Statistiche movimenti</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: Rapporto Statistiche movimenti (Rapporto INTRASTAT)
Application: Inventory
Source: Rapporto Statistiche movimenti (XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>JA</LANGUAGE>
    <REPORT_NAME>INV 移動統計レポート</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: 移動統計レポート (INTRASTATレポート)
Application: Inventory
Source: 移動統計レポート(XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>KO</LANGUAGE>
    <REPORT_NAME>INV 이동 통계 보고서</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: 이동 통계 보고서(INTRASTAT 보고서)
Application: Inventory
Source: 이동 통계 보고서(XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>PTB</LANGUAGE>
    <REPORT_NAME>INV Relatório de Estatísticas de Movimentação</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: Relatório de Estatísticas de Movimentação (Relatório INTRASTAT)
Application: Inventário
Source: Relatório de Estatísticas de Movimentação (XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>RU</LANGUAGE>
    <REPORT_NAME>INV Отчет о статистике перемещения</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: Отчет о статистике перемещения (отчет INTRASTAT)
Application: Запасы
Source: Отчет о статистике перемещения (XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>S</LANGUAGE>
    <REPORT_NAME>INV Varuleveransstatistik - rapport</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: Varuleveransstatistikrapport (INTRASTAT-rapport)
Application: Inventory
Source: Varuleveransstatistik - rapport (XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>TR</LANGUAGE>
    <REPORT_NAME>INV Hareket İstatistikleri Raporu</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: Hareket İstatistikleri Raporu (INTRASTAT Raporu)
Application: Stok Yönetimi
Source: Hareket İstatistikleri Raporu (XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>INV Movement Statistics</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: Movement Statistics Report (INTRASTAT Report)
Application: Inventory
Source: Movement Statistics Report (XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG
Reports movement statistics for EU Intrastat compliance including arrivals, dispatches, and adjustments with detailed commodity, territory, and trader information.</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <REPORT_NAME>INV 移动统计数据报表</REPORT_NAME>
    <DESCRIPTION>Imported from BI Publisher
Description: 移动统计报表（INTRASTAT 报表）
Application: 库存管理系统
Source: 移动统计数据报表 (XML)
Short Name: INVSTMVT_XML
DB package: INV_INVSTMVT_XMLP_PKG</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>:p_currency_code</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_exchange_rate</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_rep_precision</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_rep_rounding</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_report_option</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>-40</DISPLAY_SEQUENCE>
    <ANCHOR>:p_dummy</ANCHOR>
    <PARAMETER_TYPE_DSP>Char</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>Select &apos;Y&apos; from dual where :$flex$.report_option IN (&apos;O/S&apos;,&apos;S/S&apos;)</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>INV_SRS_CHARACTER</PARAMETER_NAME>
      <DESCRIPTION>Control enable/disable - hidden</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <DISPLAY_SEQUENCE>-30</DISPLAY_SEQUENCE>
    <ANCHOR>:p_inverse_rate</ANCHOR>
    <PARAMETER_TYPE_DSP>Char</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>fnd_profile.value(&apos;DISPLAY_INVERSE_RATE&apos;)</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>CST_SRS_INVERSE_RATE</PARAMETER_NAME>
      <DESCRIPTION>Inverse rate - hidden field</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <DISPLAY_SEQUENCE>-20</DISPLAY_SEQUENCE>
    <ANCHOR>:p_rate_type</ANCHOR>
    <PARAMETER_TYPE_DSP>Number</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>fnd_profile.value(&apos;CST_EXCHANGE_RATE_TYPE&apos;)</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>CST_SRS_RATE_TYPE</PARAMETER_NAME>
      <DESCRIPTION>Rate type - hidden field</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>4</SORT_ORDER>
    <DISPLAY_SEQUENCE>-10</DISPLAY_SEQUENCE>
    <ANCHOR>:debugflag</ANCHOR>
    <PARAMETER_TYPE_DSP>Char</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>N</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>DebugFlag</PARAMETER_NAME>
      <DESCRIPTION>Debug Flag</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>mms.entity_org_id=:p_legal_entity_id</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV_MGD_MVT_LEGAL_ENTITY</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
legal_entity_id id,
name value,
null description
from
xle_firstparty_information_v
where sysdate between nvl(le_effective_from,sysdate)
and nvl(le_effective_to,sysdate)
and exists (select null
from mtl_stat_type_usages
where legal_entity_id=xle_firstparty_information_v.legal_entity_id)
and exists (select null
from xle_fp_ou_ledger_v
where mo_global.check_access(operating_unit_id)=&apos;Y&apos;
and legal_entity_id=xle_firstparty_information_v.legal_entity_id)
order by name</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Legal Entity</PARAMETER_NAME>
      <DESCRIPTION>Legal Entity for movement statistics reporting</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>6</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>mms.zone_code=:p_zone_code</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV_MGD_MVT_ECONOMIC_ZONE</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
zone_code id,
zone_display_name value,
null description
from
mtl_economic_zones_vl
where zone_code in
(select zone_code
from mtl_le_economic_zones
where legal_entity_id=:$flex$.inv_mgd_mvt_legal_entity
)
order by zone_display_name</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Economic Zone</PARAMETER_NAME>
      <DESCRIPTION>Economic Zone Code</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>7</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>upper(mms.usage_type)=upper(:p_usage_type)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV_MGD_MVT_USAGE_TYPE</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
lookup_code id,
meaning value,
null description
from
fnd_lookups
where lookup_type=&apos;MVT_USAGE_TYPES&apos;
and lookup_code in
(select usage_type
from mtl_stat_type_usages
where
legal_entity_id=:$flex$.inv_mgd_mvt_legal_entity
and zone_code=:$flex$.inv_mgd_mvt_economic_zone
)
order by meaning
</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Usage Type</PARAMETER_NAME>
      <DESCRIPTION>Usage Type (Internal or External)</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>8</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>upper(mms.stat_type)=upper(:p_stat_type)</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV_MGD_MVT_STAT_TYPE</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
lookup_code id,
meaning value,
null description
from
fnd_lookups
where lookup_type=&apos;MVT_STAT_TYPES&apos;
and lookup_code in
(select stat_type
from mtl_stat_type_usages
where
legal_entity_id=:$flex$.inv_mgd_mvt_legal_entity
and zone_code=:$flex$.inv_mgd_mvt_economic_zone
and usage_type=:$flex$.inv_mgd_mvt_usage_type
)
order by meaning
</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Statistical Type</PARAMETER_NAME>
      <DESCRIPTION>Statistical Type (Intrastat or Extrastat)</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>9</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>mms.movement_type=:p_movement_type</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV_MGD_MOVEMENT_TYPE</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
lookup_code id,
meaning value,
null description
from
fnd_lookups
where lookup_type=&apos;MVT_MOVEMENT_TYPE&apos;
and enabled_flag=&apos;Y&apos;
order by meaning</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Movement Type</PARAMETER_NAME>
      <DESCRIPTION>Movement Type (Arrival, Dispatch, Arrival Adjustment, Dispatch Adjustment)</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>10</SORT_ORDER>
    <DISPLAY_SEQUENCE>60</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>mms.period_name=:p_period_name</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV_MGD_MVT_PERIOD_NAME</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
period_name id,
period_name value,
null description
from
gl_periods
where period_set_name in
(select period_set_name
from mtl_stat_type_usages
where legal_entity_id=:$flex$.inv_mgd_mvt_legal_entity
and zone_code=:$flex$.inv_mgd_mvt_economic_zone
and usage_type=:$flex$.inv_mgd_mvt_usage_type
and stat_type=:$flex$.inv_mgd_mvt_stat_type
)
and period_type in
(select period_type
from mtl_stat_type_usages
where legal_entity_id=:$flex$.inv_mgd_mvt_legal_entity
and zone_code=:$flex$.inv_mgd_mvt_economic_zone
and usage_type=:$flex$.inv_mgd_mvt_usage_type
and stat_type=:$flex$.inv_mgd_mvt_stat_type
)
and start_date&gt;=
(select gp.start_date
from gl_periods gp
,mtl_stat_type_usages mstu
where gp.period_name=mstu.start_period_name
and gp.period_set_name=mstu.period_set_name
and legal_entity_id=:$flex$.inv_mgd_mvt_legal_entity
and zone_code=:$flex$.inv_mgd_mvt_economic_zone
and usage_type=:$flex$.inv_mgd_mvt_usage_type
and stat_type=:$flex$.inv_mgd_mvt_stat_type
)
and ((end_date&lt;=
(select gp.end_date
from gl_periods gp
,mtl_stat_type_usages mstu
where gp.period_name=mstu.end_period_name
and gp.period_set_name=mstu.period_set_name
and legal_entity_id=:$flex$.inv_mgd_mvt_legal_entity
and zone_code=:$flex$.inv_mgd_mvt_economic_zone
and usage_type=:$flex$.inv_mgd_mvt_usage_type
and stat_type=:$flex$.inv_mgd_mvt_stat_type
))
or
(exists
(select null
from mtl_stat_type_usages
where legal_entity_id=:$flex$.inv_mgd_mvt_legal_entity
and zone_code=:$flex$.inv_mgd_mvt_economic_zone
and usage_type=:$flex$.inv_mgd_mvt_usage_type
and stat_type=:$flex$.inv_mgd_mvt_stat_type
and end_period_name is null
)
)
)
and adjustment_period_flag=&apos;N&apos;
order by start_date
</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Period Name</PARAMETER_NAME>
      <DESCRIPTION>Reporting Period</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>11</SORT_ORDER>
    <DISPLAY_SEQUENCE>70</DISPLAY_SEQUENCE>
    <ANCHOR>:p_report_option</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV_MGD_REPORT_OPTION</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
lookup_code id,
meaning value,
null description
from
fnd_lookup_values
where lookup_type=&apos;INTRASTAT_REPORT_OPTION&apos;
and enabled_flag=&apos;Y&apos;
and language=userenv(&apos;LANG&apos;)
order by meaning desc</LOV_QUERY_DSP>
    <DEFAULT_VALUE>S/D</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Report Option</PARAMETER_NAME>
      <DESCRIPTION>Report Option: S/D=Summary/Detail, S/S=Summary/Summary, O/S=Official/Summary</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>12</SORT_ORDER>
    <DISPLAY_SEQUENCE>80</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>fc.currency_code(+)=:p_currency_code</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>CST_SRS_CURRENCY_CODE</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
currency_code id,
currency_code value,
description description
from
fnd_currencies_vl
where trunc(nvl(start_date_active,sysdate-1))&lt;sysdate and trunc(nvl(end_date_active,sysdate+1))&gt;sysdate
order by value,description</LOV_QUERY_DSP>
    <DEFAULT_VALUE>select gl.currency_code from gl_ledger_le_v gl where gl.legal_entity_id=:$flex$.inv_mgd_mvt_legal_entity and gl.ledger_category_code=&apos;PRIMARY&apos; and rownum=1</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Currency</PARAMETER_NAME>
      <DESCRIPTION>Reporting Currency Code</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>13</SORT_ORDER>
    <DISPLAY_SEQUENCE>90</DISPLAY_SEQUENCE>
    <ANCHOR>:p_amount_display</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>INV_MGD_MVT_AMT_DISP</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
lookup_code id,
meaning value,
null description
from
fnd_lookups
where lookup_type=&apos;MVT_AMOUNT_DISPLAY&apos;
and enabled_flag=&apos;Y&apos;
and :$flex$.inv_srs_character=&apos;Y&apos;
order by meaning</LOV_QUERY_DSP>
    <DEFAULT_VALUE>SELECT meaning FROM fnd_lookups WHERE lookup_type = &apos;MVT_AMOUNT_DISPLAY&apos; AND lookup_code = &apos;C&apos;</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Amount Display Format</PARAMETER_NAME>
      <DESCRIPTION>Amount display format - normal currency precision or whole number</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>14</SORT_ORDER>
    <DISPLAY_SEQUENCE>100</DISPLAY_SEQUENCE>
    <ANCHOR>:p_exchange_rate</ANCHOR>
    <PARAMETER_TYPE_DSP>Number</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>1</DEFAULT_VALUE>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Exchange Rate</PARAMETER_NAME>
      <DESCRIPTION>Currency Exchange Rate</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>15</SORT_ORDER>
    <DISPLAY_SEQUENCE>110</DISPLAY_SEQUENCE>
    <ANCHOR>:p_rep_precision</ANCHOR>
    <PARAMETER_TYPE_DSP>Number</PARAMETER_TYPE_DSP>
    <DEFAULT_VALUE>select nvl(mstu.weight_precision,nvl(fc.precision,2)) from mtl_stat_type_usages mstu, fnd_currencies fc where mstu.legal_entity_id=:$flex$.inv_mgd_mvt_legal_entity and mstu.zone_code=:$flex$.inv_mgd_mvt_economic_zone and mstu.usage_type=:$flex$.inv_mgd_mvt_usage_type and mstu.stat_type=:$flex$.inv_mgd_mvt_stat_type and fc.currency_code(+)=:$flex$.cst_srs_currency_code and rownum=1</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Reporting Precision</PARAMETER_NAME>
      <DESCRIPTION>Number of decimal places for reporting values</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>16</SORT_ORDER>
    <DISPLAY_SEQUENCE>120</DISPLAY_SEQUENCE>
    <ANCHOR>:p_rep_rounding</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;NORMAL&apos; id, &apos;Normal&apos; value, &apos;Standard rounding&apos; description from dual
union all
select &apos;ROUND_UP&apos; id, &apos;Round Up&apos; value, &apos;Always round up&apos; description from dual
union all
select &apos;ROUND_DOWN&apos; id, &apos;Round Down&apos; value, &apos;Always round down&apos; description from dual</LOV_QUERY_DSP>
    <DEFAULT_VALUE>select nvl(mstu.reporting_rounding,&apos;NORMAL&apos;) from mtl_stat_type_usages mstu where mstu.legal_entity_id=:$flex$.inv_mgd_mvt_legal_entity and mstu.zone_code=:$flex$.inv_mgd_mvt_economic_zone and mstu.usage_type=:$flex$.inv_mgd_mvt_usage_type and mstu.stat_type=:$flex$.inv_mgd_mvt_stat_type and rownum=1</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Rounding Method</PARAMETER_NAME>
      <DESCRIPTION>Rounding method for statistical values</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
  </PARAMETERS>
  <PARAMETER_DEPENDENCIES>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.cst_srs_currency_code</FLEX_BIND>
    <PARAMETER_NAME>Currency</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Reporting Precision</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_economic_zone</FLEX_BIND>
    <PARAMETER_NAME>Economic Zone</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Period Name</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_economic_zone</FLEX_BIND>
    <PARAMETER_NAME>Economic Zone</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Reporting Precision</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_economic_zone</FLEX_BIND>
    <PARAMETER_NAME>Economic Zone</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Rounding Method</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_economic_zone</FLEX_BIND>
    <PARAMETER_NAME>Economic Zone</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Statistical Type</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_economic_zone</FLEX_BIND>
    <PARAMETER_NAME>Economic Zone</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Usage Type</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_legal_entity</FLEX_BIND>
    <PARAMETER_NAME>Legal Entity</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Currency</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_legal_entity</FLEX_BIND>
    <PARAMETER_NAME>Legal Entity</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Economic Zone</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_legal_entity</FLEX_BIND>
    <PARAMETER_NAME>Legal Entity</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Period Name</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_legal_entity</FLEX_BIND>
    <PARAMETER_NAME>Legal Entity</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Reporting Precision</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_legal_entity</FLEX_BIND>
    <PARAMETER_NAME>Legal Entity</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Rounding Method</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_legal_entity</FLEX_BIND>
    <PARAMETER_NAME>Legal Entity</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Statistical Type</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_legal_entity</FLEX_BIND>
    <PARAMETER_NAME>Legal Entity</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Usage Type</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_stat_type</FLEX_BIND>
    <PARAMETER_NAME>Statistical Type</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Period Name</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_stat_type</FLEX_BIND>
    <PARAMETER_NAME>Statistical Type</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Reporting Precision</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_stat_type</FLEX_BIND>
    <PARAMETER_NAME>Statistical Type</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Rounding Method</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_usage_type</FLEX_BIND>
    <PARAMETER_NAME>Usage Type</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Period Name</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_usage_type</FLEX_BIND>
    <PARAMETER_NAME>Usage Type</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Reporting Precision</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_usage_type</FLEX_BIND>
    <PARAMETER_NAME>Usage Type</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Rounding Method</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_mgd_mvt_usage_type</FLEX_BIND>
    <PARAMETER_NAME>Usage Type</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Statistical Type</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.inv_srs_character</FLEX_BIND>
    <PARAMETER_NAME>INV_SRS_CHARACTER</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>Amount Display Format</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
   <PARAMETER_DEPENDENCIES_ROW>
    <FLEX_BIND>:$flex$.report_option</FLEX_BIND>
    <PARAMETER_NAME>Report Option</PARAMETER_NAME>
    <DEPENDENT_PARAMETER_NAME>INV_SRS_CHARACTER</DEPENDENT_PARAMETER_NAME>
   </PARAMETER_DEPENDENCIES_ROW>
  </PARAMETER_DEPENDENCIES>
  <TEMPLATES>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
  <UPLOAD_DEPENDENCIES>
  </UPLOAD_DEPENDENCIES>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
