INV Print Kanban Cards

Description
Categories: BI Publisher, Logistics
Application: Inventory
Source: Print Kanban Cards (XML)
Short Name: INVKBCPR_XML
DB package: INV_INVKBCPR_XMLP_PKG
SELECT	MKC.KANBAN_CARD_NUMBER,
	MFG.MEANING CARD_TYPE,
	MP.ORGANIZATION_CODE||'   '||ORG.NAME  DEST_ORG_NAME,
	&P_ITEM_FLEXDATA  ITEM_NUMBER,
                  MKC.KANBAN_SIZE QUANTITY,
	MSI.PRIMARY_UNIT_OF_MEASURE UOM,
	MSI.DESCRIPTION ITEM_DESC,
	MKC.SOURCE_TYPE SOURCE_TYPE_ID,
	MFG1.MEANING  SOURCE_TYPE,
	PSV.VENDOR_NAME  SUPPLIER,
	MSS.VENDOR_SITE_CODE SUPPLIER_SITE,
	MP1.ORGANIZATION_CODE||'   '||ORG1.NAME  SOURCE_ORG_NAME,
	MKC.SOURCE_SUBINVENTORY,
	MKC.SUBINVENTORY_NAME DEST_SUBINV,
	MKC.LOCATOR_ID,
	/* bug fix 12434306 changed this &P_LOC_FLEXDATA  DEST_LOCATOR,*/
	/* Bug 22612464 for negative combination id */
	nvl2(mil.inventory_location_id, fnd_flex_xml_publisher_apis.process_kff_combination_1('c_dest_locator_value', 'INV', 'MTLL', 101, mil.ORGANIZATION_ID, mil.INVENTORY_LOCATION_ID, 'ALL', 'Y', 'VALUE'), null)  DEST_LOCATOR,
	MKC.SOURCE_LOCATOR_ID,
	/* bug fix 12434306 changed this &P_SOURCE_LOC_FLEXDATA  SOURCE_LOCATOR,*/
	/* Bug 22612464 for negative combination id */
	nvl2(mil1.inventory_location_id, fnd_flex_xml_publisher_apis.process_kff_combination_1('c_source_locator_value', 'INV', 'MTLL', 101, mil1.ORGANIZATION_ID, mil1.INVENTORY_LOCATION_ID, 'ALL', 'Y', 'VALUE'), null)  SOURCE_LOCATOR,
                  MKC.WIP_LINE_CODE,
	MKC.LAST_PRINT_DATE,
	MKC.CREATION_DATE,
	SYSDATE    PRINT_DATE,
    /* Newly added     effective_date , 
    max_replenishments ,
    replenishment_count ,
    card_status ,
    supply_status  columns for the ekanban by javakat */
    MKC.DISABLE_DATE , 
    MKC.MAX_REPLENISHMENTS ,
    MKC.REPLENISHMENT_COUNT ,
    MKC.CARD_STATUS_NAME  CARD_STATUS,
    MKC.SUPPLY_STATUS_NAME SUPPLY_STATUS 
FROM	MTL_KANBAN_CARDS_V MKC,
	MTL_SYSTEM_ITEMS MSI,
                MTL_ITEM_LOCATIONS MIL,
                MTL_ITEM_LOCATIONS MIL1,
                HR_ALL_ORGANIZATION_UNITS ORG,
                HR_ALL_ORGANIZATION_UNITS ORG1,
                MTL_PARAMETERS MP,
                MTL_PARAMETERS MP1,
	MFG_LOOKUPS MFG,
	MFG_LOOKUPS MFG1,
	PO_SUPPLIERS_VAL_V PSV,
	MTL_SUPPLIER_SITES_V MSS
WHERE 	MKC.ORGANIZATION_ID = MSI.ORGANIZATION_ID
AND	MKC.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID
AND	MKC.ORGANIZATION_ID = MIL.ORGANIZATION_ID(+)
AND	MKC.LOCATOR_ID = MIL.INVENTORY_LOCATION_ID(+)
AND	MKC.SOURCE_ORGANIZATION_ID = MIL1.ORGANIZATION_ID(+)
AND	MKC.SOURCE_LOCATOR_ID = MIL1.INVENTORY_LOCATION_ID(+)
AND	MKC.ORGANIZATION_ID = ORG.ORGANIZATION_ID(+)
AND	MKC.SOURCE_ORGANIZATION_ID = ORG1.ORGANIZATION_ID(+)
AND	MKC.ORGANIZATION_ID = MP.ORGANIZATION_ID(+)
AND	MKC.SOURCE_ORGANIZATION_ID = MP1.ORGANIZATION_ID(+)
AND	MFG.LOOKUP_TYPE(+) = 'MTL_KANBAN_CARD_TYPE'
AND 	MFG.LOOKUP_CODE(+) = MKC.KANBAN_CARD_TYPE
AND	MFG1.LOOKUP_TYPE(+) = 'MTL_KANBAN_SOURCE_TYPE'
AND 	MFG1.LOOKUP_CODE(+) = MKC.SOURCE_TYPE
AND	MKC.SUPPLIER_ID = PSV.VENDOR_ID(+)
AND	MKC.SUPPLIER_SITE_ID = MSS.VENDOR_SITE_ID(+)
AND	MKC.SUPPLIER_ID = MSS.VENDOR_ID(+)
AND	MKC.ORGANIZATION_ID = MSS.ORGANIZATION_ID(+)
AND	MKC.CARD_STATUS  <>  3
AND	&P_CALL_WHERE
/* bug 22612464 added item and locator kff condition here and remove it from package */
AND &P_ITEM_WHERE
AND &P_LOC_WHERE 
ORDER BY
&P_ORDER_BY
Parameter Name SQL text Validation
Call From
 
Number
Organization
 
Number
Sort By
 
LOV Oracle
Source Locator
 
Source Subinventory
 
LOV Oracle
Source Organization
 
LOV Oracle
Supplier Site
 
LOV Oracle
Supplier
 
LOV Oracle
Card Type
 
LOV Oracle
Source Type
 
LOV Oracle
To
 
Locator From
 
Subinventory
 
LOV Oracle
To
 
Item From
 
To
 
Kanban Card Number From
 
To
 
Date
Date Created From
 
Date