INV Item Demand History

Description
Categories: Enginatics
Repository: Github
Imported from BI Publisher
Description: Item demand history report
Application: Inventory
Source: Item demand history report (XML)
Short Name: INVPRFDH_XML
DB package: INV_INVPRFDH_XMLP_PKG

Download Blitz Report™ – World’s fastest reporting and data upload for Oracle EBS

Contact us to schedule a demo or if you need help with the installation

select
 ood.organization_name,
 ood.organization_code,
 gsob.currency_code currency_code,
 (select ml.meaning period_name
  from mfg_lookups ml
  where ml.lookup_type = 'MTL_PERIOD_TYPES'
  and   ml.lookup_code = :P_period_type
 ) period_type,
 mdh.period_start_date starting_date,
 --
 msi.concatenated_segments item,
 msi.description,
 xxen_util.meaning(msi.item_type,'ITEM_TYPE',3) user_item_type,
 msi.primary_uom_code uom,
 --
 mdh.sales_order_demand sales_orders,
 mdh.interorg_issue interorg_issues,
 mdh.std_wip_usage wip_issues,
 mdh.miscellaneous_issue miscellaneous_issues,
 nvl(mdh.sales_order_demand,0) +
 nvl(mdh.interorg_issue,0) +
 nvl(mdh.std_wip_usage,0) +
 nvl(mdh.miscellaneous_issue,0) total
from
 org_organization_definitions ood,
 gl_sets_of_books gsob,
 fnd_currencies fndc,
 mtl_system_items_kfv msi,
 mtl_demand_histories mdh
where
     mdh.organization_id   = msi.organization_id
and  mdh.inventory_item_id = msi.inventory_item_id
and  mdh.organization_id   = ood.organization_id
and  ood.set_of_books_id   = gsob.set_of_books_id
and  gsob.currency_code    = fndc.currency_code
and  mdh.organization_id   = :p_org
and  mdh.period_type       = :p_period_type
and  mdh.period_start_date >= :p_start_date
and  ( (:p_cat_lo is null and :p_cat_hi is null)
      or
       (mdh.organization_id,mdh.inventory_item_id) in
       (select mic.organization_id,mic.inventory_item_id
        from   mtl_item_categories  mic, mtl_categories_kfv mc
        where  mic.category_set_id = :p_cat_set
        and    mic.organization_id = :p_org
        and    mic.category_id = mc.category_id
        and    2=2
       )
     )
and  :p_cat_set_name = :p_cat_set_name
and  :p_org_code = :p_org_code
and  1=1
order by
 msi.concatenated_segments,
 mdh.period_start_date desc
Parameter Name SQL text Validation
Organization Code
 
LOV
Category Set
 
LOV
Categories From
mc.concatenated_segments>=:p_cat_lo
LOV
Categories To
mc.concatenated_segments<=:p_cat_hi
LOV
Items From
msi.concatenated_segments>=:p_item_lo
LOV
Items To
msi.concatenated_segments<=:p_item_hi
LOV
Bucket Type
 
LOV Oracle
History Start Date
 
Date