INV PAR Replenishment Count Worksheet

Description
Categories: BI Publisher, Logistics
Application: Inventory
Source: PAR Replenishment Count Worksheet (XML)
Short Name: INVRCWSR_XML
DB package: INV_INVRCWSR_XMLP_PKG
SELECT mrh.replenishment_count_name
             , mrl.organization_id
             , mrh.subinventory_code
             , mrh.count_date
             , mrh.supply_cutoff_date
             , mrh.process_status process_status_code
             , mrl.inventory_item_id item_id
             , mrl.locator_id locator_id
             , mrl.count_type_code         
             , mrl.primary_uom_code UOM
             , mrl.primary_uom_count_quantity count_qty
             , mrl.supply_quantity  supply_qty
             , mrl.reorder_quantity  reorder_qty
             , mrl.source_type source_type_code            
             , mrl.source_organization_id source_org_id
             , mrl.source_subinventory source_subinventory
             , mrl.expense_account expense_account_id
             , mrl.error_flag error_code
             , msi.description item_description
             , null C_ITEM_FLEXDAT
             , null  C_EXPENSE_ACCT_FLEXDAT 
             , sub.planning_level planning_level
             , sub.quantity_tracked quantity_tracked, 
	INV_INVRCWSR_XMLP_PKG.cf_process_statusformula(mrh.process_status) CF_PROCESS_STATUS, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('cf_item', 'INV', 'MSTK', 101, MSI.ORGANIZATION_ID, MSI.INVENTORY_ITEM_ID, 'ALL', 'Y', 'VALUE') CF_ITEM, 
	INV_INVRCWSR_XMLP_PKG.cf_locatorformula(mrl.locator_id, mrl.organization_id) CF_LOCATOR, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('cf_expense_account', 'SQLGL', 'GL#', GCC.CHART_OF_ACCOUNTS_ID, NULL, GCC.CODE_COMBINATION_ID, 'ALL', 'Y', 'VALUE') CF_EXPENSE_ACCOUNT, 
	INV_INVRCWSR_XMLP_PKG.cf_par_levelformula(mrl.locator_id, mrl.inventory_item_id) CF_PAR_LEVEL, 
	INV_INVRCWSR_XMLP_PKG.cf_errorformula(mrl.error_flag, mrh.process_status, sub.planning_level, sub.quantity_tracked, mrl.count_type_code, mrl.locator_id, INV_INVRCWSR_XMLP_PKG.cf_par_levelformula(mrl.locator_id, mrl.inventory_item_id)) CF_ERROR, 
	INV_INVRCWSR_XMLP_PKG.cf_count_typeformula(mrl.count_type_code) CF_COUNT_TYPE, 
	INV_INVRCWSR_XMLP_PKG.cf_source_typeformula(mrl.source_type) CF_SOURCE_TYPE, 
	INV_INVRCWSR_XMLP_PKG.cf_source_org_codeformula(mrl.source_organization_id) CF_SOURCE_ORG_CODE
FROM  mtl_replenish_headers mrh
           , mtl_replenish_lines mrl
           , mtl_system_items msi
           , mtl_item_locations mil
           , mtl_secondary_inventories sub
           , gl_code_combinations gcc
WHERE mrh.organization_id =  :P_ORG_ID
      AND mrh.replenishment_header_id = :P_HEADER_ID
      AND mrl.replenishment_header_id = mrh.replenishment_header_id
      AND msi.organization_id  = mrl.organization_id
      AND msi.inventory_item_id  =   mrl.inventory_item_id
      AND mil.organization_id = mrl.organization_id
     AND mil.inventory_location_id = mrl.locator_id
     AND sub.organization_id  = mrl.organization_id
     AND sub.secondary_inventory_name = mrh.subinventory_code
     AND mrl.expense_account  = gcc.code_combination_id (+)
ORDER BY mil.picking_order, C_ITEM_FLEXDAT
Parameter Name SQL text Validation
Organization Id
 
Number
Count Name
 
LOV Oracle
Subinventory
 
LOV Oracle