XXEN_SCHUB_ITEM_SEARCH

Description
Categories: Supply Chain Hub
System report controlling the search functionality on the Supply Chain Hub form
Run XXEN_SCHUB_ITEM_SEARCH and other Oracle EBS reports with Blitz Report™ on our demo environment
insert into xxen_report_search_ids xrsi (rowid1)
select
msiv.row_id row_id
from
mtl_system_items_vl msiv
where
1=1 and
msiv.organization_id in
(
select
oav.organization_id
from
org_access_view oav,
mtl_parameters mp
where
oav.resp_application_id=fnd_global.resp_appl_id and
oav.responsibility_id=fnd_global.resp_id and
oav.organization_id=mp.organization_id and
(fnd_profile.value('XXEN_SCHUB_EXCLUDE_INV_MASTER_ORG')='N' or mp.organization_id<>mp.master_organization_id)
) and
rownum<=nvl(fnd_profile.value('XXEN_SCHUB_SEARCH_ROW_LIMIT'),100)
Parameter Name SQL text Validation
Item
upper(msiv.concatenated_segments) like upper(:item)
LOV
Description
(msiv.organization_id, msiv.inventory_item_id) in (
select /*+ cardinality(msit 100)*/
msit.organization_id,
msit.inventory_item_id
from
mtl_system_items_tl msit
where
contains(msit.description,nvl(xxen_report.search_text(:description),'üüü'),1)>0 and
(:language is null or msit.language=(select flv.language_code from fnd_languages_vl flv where flv.description=:language))
)
Char
Long Description
(msiv.organization_id, msiv.inventory_item_id) in (
select /*+ cardinality(msit 100)*/
msit.organization_id,
msit.inventory_item_id
from
mtl_system_items_tl msit
where
contains(msit.long_description,nvl(xxen_report.search_text(:long_description),'üüü'),2)>0 and
(:language is null or msit.language=(select flv.language_code from fnd_languages_vl flv where flv.description=:language))
)
Char
Language
:language=:language
LOV
Item-Number contains
upper(msiv.concatenated_segments) like '%'||upper(:item)||'%'
LOV
Item Type
msiv.item_type=xxen_util.lookup_code(:item_type,'ITEM_TYPE',3)
LOV
Exclude Item Type
not (msiv.item_type=xxen_util.lookup_code(:exclude_item_type,'ITEM_TYPE',3))
LOV
Item Status
msiv.inventory_item_status_code in (select misv.inventory_item_status_code from mtl_item_status_vl misv where misv.inventory_item_status_code_tl=:item_status)
LOV
Category Set
(msiv.organization_id, msiv.inventory_item_id) in (
select
mic.organization_id,
mic.inventory_item_id
from
mtl_category_sets_v mcsv,
mtl_item_categories mic
where
mcsv.category_set_name=:category_set_name and
mcsv.category_set_id=mic.category_set_id)
LOV
Category
(msiv.organization_id, msiv.inventory_item_id) in
(
select
mic.organization_id,
mic.inventory_item_id
from
mtl_item_categories mic,
mtl_category_sets mcs,
mtl_categories_kfv mck
where
mck.concatenated_segments=:category and
mck.structure_id=mcs.structure_id and
mck.category_id=mic.category_id and
mcs.category_set_id=mic.category_set_id
)
LOV
Cross Reference Type
msiv.inventory_item_id in (
select
mcrb.inventory_item_id
from
mtl_cross_references_b mcrb
where
mcrb.cross_reference_type=:cross_reference_type and
sysdate between nvl(mcrb.start_date_active,sysdate) and nvl(mcrb.end_date_active,sysdate)
)
LOV
Cross Reference
msiv.inventory_item_id in (
select
mcrb.inventory_item_id
from
mtl_cross_references_b mcrb
where
mcrb.cross_reference=:cross_reference and
mcrb.cross_reference_type=:cross_reference_type and
sysdate between nvl(mcrb.start_date_active,sysdate) and nvl(mcrb.end_date_active,sysdate)
)
LOV
BOM Item Type
msiv.bom_item_type=:bom_item_type
LOV Oracle
BOM Alt. Designator
(msiv.inventory_item_id, msiv.organization_id) in
(
select
bsb.assembly_item_id,
bsb.organization_id
from
bom_structures_b bsb
where
bsb.alternate_bom_designator=:bom_alternate_designator and
bsb.structure_type_id=1
)
LOV
BOM Exists
:bom_exists=:bom_exists and
msiv.inventory_item_id in
(
select
bsb.assembly_item_id
from
bom_structures_b bsb
where
(:organization_name is null or bsb.organization_id in (select haou.organization_id from hr_all_organization_units haou where haou.name=:organization_name)) and
bsb.assembly_type=1
)
LOV Oracle
Routing Exists
:routing_exists=:routing_exists and
msiv.inventory_item_id in
(
select
bor.assembly_item_id
from
bom_operational_routings bor
where
(:organization_name is null or bor.organization_id in (select haou.organization_id from hr_all_organization_units haou where haou.name=:organization_name))
)
LOV Oracle
WIP Supply Type
msiv.wip_supply_type=xxen_util.lookup_code(:wip_supply_type_incl,'WIP_SUPPLY',700)
LOV
Excl. WIP Supply Type
msiv.wip_supply_type!=xxen_util.lookup_code(:wip_supply_type_excl,'WIP_SUPPLY',700)
LOV
Inventory Items only
msiv.inventory_item_flag='Y'
LOV
Item Created By
msiv.created_by in (select fu.user_id from fnd_user fu where fu.user_name=:created_by)
LOV
Item Creation Date from
msiv.creation_date>=:creation_date_from
Date
Item Creation Date to
msiv.creation_date<:creation_date_to+1
Date
Buyer
msiv.buyer_id in
(
select
ppx.person_id
from
per_people_x ppx
where
ppx.full_name=:buyer and
ppx.current_employee_flag='Y' and
ppx.person_id in (select pa.agent_id from po_agents pa)
)
LOV
Planner
msiv.planner_code=:planner_code
LOV
Make or Buy
msiv.planning_make_buy_code=xxen_util.lookup_code(:make_or_buy,'MTL_PLANNING_MAKE_BUY',700)
LOV
Onhand Exists
exists
(
select
 null
from
 mtl_onhand_quantities moq
where
    moq.organization_id = msiv.organization_id
and moq.inventory_item_id = msiv.inventory_item_id
group by
 moq.organization_id
,moq.inventory_item_id
having
 sum(moq.transaction_quantity) > 0
)
LOV
Purchase Order
msiv.inventory_item_id in (
select
pla.item_id
from
hr_all_organization_units haou,
po_headers_all pha,
po_lines_all pla
where
haou.organization_id=pha.org_id and
pha.segment1=:po_number and
(haou.name=:operating_unit or :operating_unit is null and pha.org_id in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat)) and
pha.po_header_id=pla.po_header_id
)
LOV
Puchase Order Exists
(msiv.organization_id,msiv.inventory_item_id) in
(
select
 ms.to_organization_id,ms.item_id
from
 mtl_supply            ms
,po_line_locations_all polla
where
    :po_exists is not null
and ms.po_line_location_id     = polla.line_location_id
and ms.supply_type_code       in ('PO','RECEIVING')
and ms.destination_type_code   = 'INVENTORY'
and ms.po_line_location_id    is not null
and ms.quantity                > 0
and nvl(polla.cancel_flag,'N') = 'N'
and (   :organization_name is null
     or ms.to_organization_id in (select haou.organization_id from hr_all_organization_units haou where haou.name=:organization_name)
    )
and (   (:operating_unit is null and polla.org_id in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat))
     or polla.org_id in (select haou.organization_id from hr_all_organization_units haou where haou.name=:operating_unit)
    )
)
LOV Oracle
Sales Order
msiv.inventory_item_id in (
select
oola.inventory_item_id
from
hr_all_organization_units haou,
oe_order_headers_all ooha,
oe_order_lines_all oola
where
ooha.order_number=:order_number and
(haou.name=:operating_unit or :operating_unit is null and ooha.org_id in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat)) and
haou.organization_id=ooha.org_id and
ooha.header_id=oola.header_id and
oola.item_type_code not in ('CLASS','MODEL','OPTION')
)
LOV
Sales Order Created By
msiv.inventory_item_id in (
select
oola.inventory_item_id
from
fnd_user fu,
hr_all_organization_units haou,
oe_order_headers_all ooha,
oe_order_lines_all oola
where
fu.user_name=:order_created_by and
fu.user_id=ooha.created_by and
(haou.name=:operating_unit or :operating_unit is null and ooha.org_id in (select mgoat.organization_id from mo_glob_org_access_tmp mgoat)) and
haou.organization_id=ooha.org_id and
ooha.header_id=oola.header_id and
oola.item_type_code not in ('CLASS','MODEL','OPTION')
)
LOV
Sales Order Exists
(msiv.organization_id,msiv.inventory_item_id) in
(
select
 md.organization_id,md.inventory_item_id
from
 mtl_demand          md
,oe_order_lines_all  ool
where
        :so_exists is not null
and md.demand_source_line = ool.line_id
and md.demand_source_type = 2 -- sales order
and md.line_item_quantity > nvl(md.completed_quantity,0)
and ool.open_flag         = 'Y'
and nvl(ool.cancelled_flag,'N') = 'N'
and
(   :organization_name is null
 or md.organization_id in (select haou.organization_id from hr_all_organization_units haou where haou.name=:organization_name)
)
and 
(   (:operating_unit is null and ool.org_id in (select mgoat