INV Cycle count unscheduled items

Description
Categories: BI Publisher, Logistics
Application: Inventory
Source: Cycle count unscheduled items report (XML)
Short Name: INVARUIR_XML
DB package: INV_INVARUIR_XMLP_PKG
select
       cci.inventory_item_id,
       sys.description  Description,
       cci.Item_Last_Schedule_Date,
       abc.abc_class_name,
       nvl(:F_NWorkDaysYear,0)/decode(cla.num_counts_per_year,NULL,1,0,1,
             cla.num_counts_per_year)                   CountIntervalWorkdays,
       &P_ITEM_FLEXSQL             C_ITEM_FLEXDAT,
	   fnd_flex_xml_publisher_apis.process_kff_combination_1('f_item_flexval', 'INV', 'MSTK', 101, SYS.ORGANIZATION_ID, SYS.INVENTORY_ITEM_ID, 'ALL', 'Y', 'VALUE')             F_Item_FlexVal
from
       mtl_abc_classes                abc,
       mtl_system_items              sys,
       mtl_cycle_count_headers   cch,
       mtl_cycle_count_items       cci,
       mtl_cycle_count_classes    cla
 where
          sys.organization_id  = :P_ORG_ID
 and   abc.organization_id  = :P_ORG_ID
 and   cch.organization_id  = :P_ORG_ID
 and   cch.autoschedule_enabled_flag = 1
 and  cci.abc_class_id   = abc.abc_class_id
 and   cci.cycle_count_header_id  = :P_HeaderID
 and   cch.cycle_count_header_id = :P_HeaderID
 and   sys.inventory_item_id            = cci.inventory_item_id
 and   cla.abc_class_id   = abc.abc_class_id
 and   cla.cycle_count_header_id = :P_HeaderID
 and   cla.organization_id = :P_ORG_ID
 and  ((   (cci.item_last_schedule_date +
      ( nvl(:F_NWorkDaysYear,0)/decode(cla.num_counts_per_year,NULL,1,0,1,
                                                                   cla.num_counts_per_year) ))
          <=  :C_CurrentDate )
          or (cci.item_last_schedule_date is null ))
ORDER BY
abc.abc_class_name, &P_ItemOrderBy
Parameter Name SQL text Validation
Organization
 
Number
Cycle Count Name
 
LOV Oracle
Ask a question