Monday, 16 March 2020

Query to find Item template attribute values in Oracle Apps R12

Most Important Tables used by Item Template query in oracle apps

  1. mtl_item_templates
  2. mtl_item_templ_attributes

Query :

SELECT   * 
FROM     ( 
                SELECT it.template_name, 
                       it.description      template_description, 
                       user_attribute_name attribute_name, 
                       report_user_value   attribute_value 
                FROM   mtl_item_templ_attributes ta, 
                       mtl_item_attributes att, 
                       mtl_item_templates it, 
                       mfg_lookups mfg 
                WHERE  att.attribute_name(+) = ta.attribute_name 
                AND    it.template_id(+) = ta.template_id 
                AND    mfg.lookup_code(+) = att.control_level 
                AND    mfg.lookup_type(+) = 'ITEM_CONTROL_LEVEL_GUI' ) 
pivot (min(attribute_value) FOR attribute_name IN ('Unit Volume',
                                   'Volume Unit of Measure',
                                   'BOM Item Type',
                                   'Asset Category',
                                   'List Price',
                                   'Purchasable',
                                   'Taxable Item',
                                   'UN Number',
                                   'Allow Substitute Receipts',
                                   'Receipt Required',
                                   'Receive Close Tolerance',
                                   'Reservation Control',
                                   'Subinventory Restrictions',
                                   'Safety Stock Bucket Days',
                                   'End Assembly Pegging',
                                   'Calculate ATP',
                                   'Preprocessing Lead Time',
                                   'Weight Unit of Measure',
                                   'Shrinkage Rate',
                                   'Expense Account',
                                   'Outside Processing Item',
                                   'Purchased Item',
                                   'Allow Unordered Receipts',
                                   'Days Late Receipt Allowed',
                                   'Lot Control',
                                   'Locator Restrictions',
                                   'Inventory Planning Method',
                                   'Min-Max Minimum Quantity', 
                                   'Order Cost',
                                   'Acceptable Early Days',
                                   'WIP Supply Type',
                                   'Internal Ordered Item',
                                   'Picking Rule',
                                   'Assemble to Order',
                                   'Unit Weight',
                                   'Primary Unit of Measure',
                                   'Costing Enabled',
                                   'Inventory Asset Value',
                                   'Allow Description Update',
                                   'RFQ Required',
                                   'Rounding Factor',
                                   'Receipt Date Exception',
                                   'Safety Stock Percent',
                                   'Replenishment Source Type',
                                   'MRP Planning Method',
                                   'Invoice Enabled',
                                   'Starting Serial Number',
                                   'Stockable',
                                   'BOM Allowed',
                                   'Market Price',
                                   'Unit of Issue',
                                   'Starting Serial Prefix',
                                   'Pos Measurement Error',
                                   'Revision Control',
                                   'Shelf Life Control',
                                   'Safety Stock',
                                   'Overrun Percentage',
                                   'Starting Lot Prefix',
                                   'Starting Lot Number',
                                   'Conversions',
                                   'Standard Lot Size',
                                   'Hazard Class',
                                   'Invoice Close Tolerance',
                                   'Stock Locator Control',
                                   'Shelf Life Days',
                                   'Source Subinventory',
                                   'Demand Time Fence Days',
                                   'Planning Time Fence',
                                   'Planning Time Fence Days',
                                   'WIP Supply Locator',
                                   'WIP Supply Subinventory',
                                   'ATP Rule',
                                   'Forecast Control',
                                   'Days Early Receipt Allowed',
                                   'Quantity Received Tolerance',
                                   'User Item Type',
                                   'Base Model',
                                   'Use Approved Vendor',
                                   'Enforce Ship-To Location', 
                                   'Inspection Required',
                                   'Fixed Order Quantity',
                                   'Min-Max Maximum Quantity', 
                                   'Minimum Order Quantity',
                                   'Source Organization',
                                   'Acceptable Rate Decrease',
                                   'Acceptable Rate Increase',
                                   'Reduce MPS',
                                   'Demand Time Fence',
                                   'Repetitive Planning',
                                   'Cumulative Total Lead Time',
                                   'Lead Time Lot Size',
                                   'Postprocessing Lead Time',
                                   'ATP Components',
                                   'Default Shipping Organization',
                                   'Ship Model Complete',
                                   'Accounting Rule',
                                   'Invoiceable Item',
                                   'Tax Code',
                                   'Carrying Cost Percent',
                                   'Processing Lead Time',
                                   'Cost of Goods Sold Account',
                                   'Default Buyer',
                                   'Outside Processing Unit Type',
                                   'Price Tolerance %',
                                   'Allow Express Delivery',
                                   'Quantity Received Exception',
                                   'Cycle Count Enabled',
                                   'Inventory Item',
                                   'Planner',
                                   'Make or Buy',
                                   'Cum Manufacturing Lead Time',
                                   'Fixed Lead Time',
                                   'Check ATP',
                                   'Customer Ordered Item',
                                   'Internal Orders Enabled',
                                   'Shippable Item',
                                   'Sales Account',
                                   'Fixed Days Supply',
                                   'Fixed Lot Size Multiplier',
                                   'Build in WIP',
                                   'Item Status',
                                   'Include in Rollup',
                                   'Encumbrance Account',
                                   'Receipt Routing',
                                   'Transactable',
                                   'Serial Number Control',
                                   'Maximum Order Quantity',
                                   'Rounding Control',
                                   'Variable Lead Time',
                                   'Customer Orders Enabled',
                                   'Pick Components',
                                   'Returnable',
                                   'RMA Inspection Status',
                                   'OE Transactable',
                                   'Invoicing Rule',
                                   'Payment Terms',
                                   'Neg Measurement Error',
                                   'Planning Exception Set') )
ORDER BY template_name;