When we are define Modifier in the OM module. We can define Modifier at the particular Item or all the Items in the Price List/Item Category etc.

Note:- Item Category is the Flex-field in the Inventory Module. In the Master Item define, we choose what item belongs to which Item Category.

The following query will give the Modifier Name and other details of Particular Item:-
————————————————————————————-

Note:- This is applicable only if the Item Number directly given at the Modifier Line Level.

SELECT distinct qlh.comments “Modifier Name”
,qqv.rule_name “Qualifier Group”
,ou.name “Store Id”
–,qlhv.name “Price list name”
,qms.product_attr_value “SKU”
,qms.list_line_no “Modifier Line No”
,qms.start_date_active “Start Date”
,qms.end_date_active “End Date”
,qms.arithmetic_operator_type “Application Method”
,qms.operand “Value”
,qms.product_precedence “Precedence”
,qms.incompatibility_grp “Incompatibility Group”
,qms.pricing_group_sequence “Bucket”
FROM 
qp_modifier_summary_v qms
, qp_list_headers_b qlh
,qp_list_headers_tl qlt
,qp_qualifiers_v qqv 
,mtl_system_items_b msi
,hr_all_organization_units ou
–,qp_list_headers_v qlhv 
WHERE 
qlh.list_header_id = qms.list_header_id 
–and qms.list_header_id=qlhv.list_header_id 
and qlh.list_header_id =qqv.list_header_id 
and to_char(msi.inventory_item_id)=qms.product_attr_val
AND ou.organization_id = msi.organization_id 
and to_char(ou.organization_id)= qqv.qualifier_attr_value 
and sysdate between qms.start_date_active and qms.end_date_active 
and qlt.LIST_HEADER_ID=qlh.LIST_HEADER_ID
AND exists
(select 1
from mtl_system_items_b a
where a.organization_id=(SELECT UNIQUE master_organization_id
FROM mtl_parameters)

and to_char(a.inventory_item_id)=qms.product_attr_val 
and a.segment1 in(‘Your Item Name’))

When we are define Modifier in the OM module. We can define Modifier at the particular Item or all the Items in the Price List/Item Category etc.

Note:- Item Category is the Flex-field in the Inventory Module. In the Master Item define, we choose what item belongs to which Item Category.

The following query will give the Modifier Name and other details of Particular Item of Item Category:-
—————————————————————————————-

SELECT DISTINCT — qpa.list_header_id “Modifier Header ID”, 
qpa.list_line_id “Modifier Line Number”,
qlh.COMMENTS “Modifier Name (Description)”,
qll.start_date_active “Modifier Start Date”,
qll.end_date_active “Modifier End Date”,
b.segment1 “SKU”,
b.inventory_item_id “Inventory Item ID”,
qll.arithmetic_operator_type “Application Method”,
qll.operand “Value”, 
qll.product_precedence “Precedence”, 
qll.incompatibility_grp “Incompatibility Group”,
qll.pricing_group_sequence “Bucket”
FROM qp_pricing_attributes qpa,
qp_qualifiers_v qq,
qp_list_headers_b qlh,
qp_modifier_summary_v qll,
mtl_item_catalog_groups a,
mtl_system_items_b b,
mtl_descr_element_values c
–qp_qualifiers_v q
WHERE b.item_catalog_group_id = a.item_catalog_group_id
AND b.inventory_item_id = c.inventory_item_id
AND b.organization_id =
(SELECT UNIQUE master_organization_id
FROM mtl_parameters)
AND c.element_sequence IN (’20’)
AND qq.list_header_id = qpa.list_header_id
AND qq.list_line_id = qpa.list_line_id
AND qq.qualifier_attribute = ‘QUALIFIER_ATTRIBUTE35’
AND qq.qualifier_attr_value =
a.segment1 || ‘-‘ || c.element_value 
AND qpa.product_attribute = ‘PRICING_ATTRIBUTE3’
AND qlh.list_header_id = qq.list_header_id
AND qpa.list_header_id = qll.list_header_id
AND qpa.list_line_id = qll.list_line_id
AND qll.list_header_id = qlh.list_header_id
AND qlh.active_flag = ‘Y’
AND SYSDATE BETWEEN qll.start_date_active AND qll.end_date_active
AND b.segment1 = ‘Your Item Name’

Following Query would get all the PO Numbers, Item ID, Quantity Order, Received, Canceled etc. The same information can be found in the PO order form from the Front end Application.

SELECT
POL.ITEM_ID “Inventory Item ID”,
POLL.SHIP_TO_LOCATION_ID “Ship to Location ID”,
poll.quantity “Quantity”,
poll.Quantity_received “Quantity Received”,
poll.QUANTITY_cancelled “Quantity Canceled”,
POH.SEGMENT1 “PO Order Number”
FROM po_headers_all poh
, po_lines_all pol
, po_line_locations_all poll
WHERE poh.po_header_id=pol.po_header_id
AND pol.po_line_id=poll.po_line_id
AND poll.po_header_id=pol.po_header_id
AND poh.authorization_status=’APPROVED’
AND poh.type_lookup_code=’STANDARD’
AND NVL(poh.cancel_flag,’N’) =’N’
AND POL.ITEM_ID IS NOT NULL
AND NVL (poll.quantity, 0) > (NVL (Quantity_received,0) + NVL (Quantity_cancelled,0))

The following query gets the information about the Lot Numbers of Assembly Completion.

Note:- I have commented “mmt.organization_id = your_organization_id” condition. If you want to get the results specific to some inventory organization then, you can use this condition. Organization_id is representing the Inventory Organization.

SELECT mmt.transaction_id
, mmt.transaction_date
, mmt.inventory_item_id
, mmt.organization_id
, mtn.lot_number
, msi.shelf_life_days
, msi.shelf_life_code
, msi.segment1
FROM mtl_material_txns_val_v mmt
,mtl_transaction_lot_numbers mtn
,mtl_lot_numbers mln
, mtl_system_items_b msi
WHERE mmt.transaction_id = mtn.transaction_id
AND mmt.inventory_item_id = msi.inventory_item_id
AND mmt.organization_id = msi.organization_id
AND mtn.lot_number = mln.lot_number
AND mtn.organization_id = mln.organization_id
AND mmt.transaction_type_name = ‘WIP Completion’
AND mmt.transaction_action = ‘Assembly completion’
AND NVL (mln.attribute1, ‘N’) <> ‘Y’
— AND mmt.organization_id = your_organization_id
AND mmt.transaction_date >= mmt.transaction_date
AND mmt.transaction_date <= mmt.transaction_date
AND mmt.inventory_item_id >= mmt.inventory_item_id
AND mmt.inventory_item_id <= mmt.inventory_item_id;

With the following query you can know what all the permissions you have for any Specific Application User.

I have used this query when working on some custom page. Based on the permissions given to the User, you can provide some additional functionality to the Users.

Note:- I have commented out the permission name. in the below query. You can use this condition if you want to search specific to the permission name.

SELECT fnd.user_id
, fnd.description
, p.permission_name
FROM jtf_auth_principals_b u
, jtf_auth_principal_maps pm
, jtf_auth_role_perms rp
, jtf_auth_permissions_b p
, fnd_user fnd
WHERE fnd.user_id=’Your USER ID’
AND fnd.user_name=u.principal_name
— AND p.permission_name =’CSI_SEARCH_PRODUCT_VIEW’
AND u.jtf_auth_principal_id = pm.jtf_auth_principal_id
AND pm.jtf_auth_parent_principal_id = rp.jtf_auth_principal_id
AND rp.jtf_auth_permission_id = p.jtf_auth_permission_id

Note:- You can know the USER ID of specific to some USER from the following Query.

select * from fnd_user where USER_NAME like ‘User Name’;