INV Expired lots

Description
Categories: BI Publisher, Logistics
Application: Inventory
Source: Expired lots report (XML)
Short Name: INVTRELT_XML
DB package: INV_INVTRELT_XMLP_PKG
SELECT 
    null           ITEM_FLEX, 
    MSI.INVENTORY_ITEM_ID      ITEM_ID, 
    MOQD.ORGANIZATION_ID       ORGANIZATION_ID,
    nvl(MOQD.REVISION, '-99')               ITEM_REV, 
    MSI.DESCRIPTION            ITEM_DESC, 
    MSI.PRIMARY_UOM_CODE       ITEM_UOM,
    MLN.EXPIRATION_DATE        LOT_EXPIRE_DT, 
    MLN.LOT_NUMBER             LOT_NUMBER, 
    MOQD.SUBINVENTORY_CODE      SUBINV_CODE, 
    null        LOCATOR_FLEX, 
    nvl(MOQD.LOCATOR_ID,-9999)             LOCATOR_ID, 
    ROUND(MOQD.PRIMARY_TRANSACTION_QUANTITY , :P_qty_precision)   TRAN_QTY, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('c_item_value', 'INV', 'MSTK', 101, MSI.ORGANIZATION_ID, MSI.INVENTORY_ITEM_ID, 'ALL', 'Y', 'VALUE') C_ITEM_VALUE, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('c_loc_value', 'INV', 'MTLL', 101, MIL.ORGANIZATION_ID, MIL.INVENTORY_LOCATION_ID, 'ALL', 'Y', 'VALUE') C_LOC_VALUE
FROM 
   MTL_SYSTEM_ITEMS        MSI, 
   MTL_ONHAND_QUANTITIES_DETAIL   MOQD, 
   MTL_LOT_NUMBERS         MLN, 
   MTL_ITEM_LOCATIONS      MIL
WHERE 
 &P_ITEM_WHERE 
 AND 
 MSI.ORGANIZATION_ID = :P_ORG 
 AND 
 MSI.INVENTORY_ITEM_ID = 
 MOQD.INVENTORY_ITEM_ID 
 AND 
 MOQD.INVENTORY_ITEM_ID = 
 MLN.INVENTORY_ITEM_ID 
 AND 
 MOQD.ORGANIZATION_ID = :P_ORG 
 AND 
 MOQD.LOT_NUMBER = 
 MLN.LOT_NUMBER 
 AND 
   MOQD.ORGANIZATION_ID = 
   MIL.ORGANIZATION_ID (+)
   AND 
   MOQD.LOCATOR_ID = 
   MIL.INVENTORY_LOCATION_ID (+)
 AND 
 MLN.ORGANIZATION_ID = :P_ORG 
 AND 
 MLN.EXPIRATION_DATE <=
 :P_EXPIRE_DATE_1 
order by 
&P_ITEM_ORDER_BY, mln.expiration_date, mln.lot_number
Parameter Name SQL text Validation
Precision
 
LOV Oracle
Organization
 
Number
To
 
Items From
 
Expiration Date
 
Date