INV Cycle count schedule requests

Description
Categories: BI Publisher, Logistics
Application: Inventory
Source: Cycle count schedule requests report (XML)
Short Name: INVARRTA_XML
DB package: INV_INVARRTA_XMLP_PKG
select  
      sr.inventory_item_id,
       sys.description  Description,
       sr.subinventory                       Subinventory,
       sr.revision                               Revision,
       sr.lot_number                         LotNumber,
       sr.locator_id                           Locator ,
       sr.schedule_date                    RequestDate,
       sr.count_due_date                  DueDate,
       mfg1.meaning                         RequestType,
       null    C_LOCATOR_FLEXDAT,
       &P_ITEM_FLEXSQL            C_ITEM_FLEXDAT,
      serial_number, 
	decode(sr.inventory_item_id,null,null,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, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('f_locator_value', 'INV', 'MTLL', 101, LOC.ORGANIZATION_ID, LOC.INVENTORY_LOCATION_ID, 'ALL', 'Y', 'VALUE') F_LOCATOR_VALUE
from mtl_cc_schedule_requests  sr,
       mfg_lookups     mfg1,
       MTL_ITEM_LOCATIONS     LOC,
       mtl_system_items              sys
where sr.cycle_count_header_id =  :P_HeaderID
 and   sys.inventory_item_id (+)  = SR.inventory_item_id
 and   sys.organization_id (+)  = :P_ORG_ID
/* and   to_date((sr.schedule_date), 'DD-MON-RRRR')  >= :P_FromDate
 and   to_date((sr.schedule_date), 'DD-MON-RRRR')  <= :P_ToDate*/
and   to_date((sr.schedule_date), 'DD-MON-RRRR')  >= trunc(:P_FromDate)
 and   to_date((sr.schedule_date), 'DD-MON-RRRR')  <= trunc(:P_ToDate)
 and   loc.inventory_location_id(+) = sr.locator_id 
 and   loc.organization_id(+) = :P_ORG_ID
 and   mfg1.lookup_type  = 'MTL_CC_SOURCE_TYPES'
 and   mfg1.lookup_code = sr.request_source_type
ORDER BY 
SR.SCHEDULE_DATE,  10,
SR.SUBINVENTORY,    11, 
SR.REVISION,   SR.REQUEST_SOURCE_TYPE, serial_number
Parameter NameSQL textValidation
Organization
 
Number
Display Serial Numbers
 
LOV Oracle
End Date
 
Date
Start Date
 
Date
Cycle Count Name
 
LOV Oracle