If you can't read please download the document
Upload
dinhnguyet
View
235
Download
7
Embed Size (px)
Citation preview
Bhaskar Reddy Oracle Applications: Oracle EBS R12 Purchasing, Inventory, Order Management Queries
Bhaskar Reddy Oracle Applications
Saturday, January 7, 2012
Oracle EBS R12 Purchasing, Inventory, Order Management Queries
To Find Duplicate Item Category Code
SELECT category_set_name, category_concat_segments, COUNT (*)FROM mtl_category_set_valid_cats_vWHERE (category_set_id = 1)GROUP BY category_set_name, category_concat_segmentsHAVING COUNT (*) > 1ORDER BY category_concat_segments
Get Number Of canceled requisition
SELECT a.AUTHORIZATION_STATUS,(a.ORG_ID),(SELECT distinct hr.per_all_people_f.first_name|| || hr.per_all_people_f.middle_names|| || hr.per_all_people_f.last_name Employee NameFROM hr.per_all_people_fwhere hr.per_all_people_f.PERSON_ID in(select employee_id from fnd_user fu where fu.user_id = a.CREATED_BY)) CREATED_BY,count(SEGMENT1 )FROMpo_requisition_headers_all aWHEREa.creation_date BETWEEN TO_DATE(01/01/2007, DD/MM/YYYY)and TO_DATE(30/05/2007, DD/MM/YYYY)and a.AUTHORIZATION_STATUS = CANCELLEDgroup by a.AUTHORIZATION_STATUS,a.ORG_ID,a.CREATED_BY
Number of line processed in Order Management
SELECT COUNT (line_id) Order Line ProcessedFROM oe_order_lines_allWHERE creation_date BETWEEN TO_DATE (:Fdate, DD/MM/YYYY)AND TO_DATE (:tdate, DD/MM/YYYY)AND flow_status_code = CLOSED;
To Check Item Catogry For Inventory master (No Of Segments May Varry)
SELECT ood.organization_name,segment1|| -|| segment2|| -|| segment3 catgoryFROM org_organization_definitions ood,mtl_categories_vl mcv,mtl_category_sets mcsWHERE mcs.structure_id = mcv.structure_idORDER BY ood.organization_name
Check Locators for inventory Inventory Org Wise(Number of segment may varry)
SELECT mil.segment1 loc_seg1, mil.segment11 loc_seg11, mil.segment2 loc_seg2,mil.segment3 loc_seg3, mil.segment4 loc_seg4, mil.segment5 loc_seg5,mil.segment6 loc_seg6,ood.ORGANIZATION_NAME,mil.SUBINVENTORY_CODEFROM mtl_item_locations mil,org_organization_definitions oodwhere mil.ORGANIZATION_ID = ood.ORGANIZATION_ID
Display All Subinventories Setupselect msi.secondary_inventory_name, MSI.SECONDARY_INVENTORY_NAME Subinventory, MSI.DESCRIPTION Description,MSI.DISABLE_DATE Disable Date, msi.PICKING_ORDER Picking Order,gcc1.concatenated_segments Material Account,gcc2.concatenated_segments Material Overhead Account,gcc3.concatenated_segments Resource Account,gcc4.concatenated_segments Overhead Account,gcc5.concatenated_segments Outside Processing Account,gcc6.concatenated_segments Expense Account,gcc7.concatenated_segments Encumbrance Account,msi.material_overhead_account,msi.resource_account,msi.overhead_account,msi.outside_processing_account,msi.expense_account,msi.encumbrance_accountfrom mtl_secondary_inventories msi,gl_code_combinations_kfv gcc1,gl_code_combinations_kfv gcc2,gl_code_combinations_kfv gcc3,gl_code_combinations_kfv gcc4,gl_code_combinations_kfv gcc5,gl_code_combinations_kfv gcc6,gl_code_combinations_kfv gcc7where msi.material_account = gcc1.CODE_COMBINATION_ID(+)and msi.material_overhead_account = gcc2.CODE_COMBINATION_ID(+)and msi.resource_account = gcc3.CODE_COMBINATION_ID(+)and msi.overhead_account = gcc4.CODE_COMBINATION_ID(+)and msi.outside_processing_account = gcc5.CODE_COMBINATION_ID(+)and msi.expense_account = gcc6.CODE_COMBINATION_ID(+)and msi.encumbrance_account = gcc7.CODE_COMBINATION_ID(+)order by msi.secondary_inventory_name
To Select Unit Of measure exist in ebusiness suite
select uom_code,unit_of_measurefrom mtl_units_of_measure
Query to find out Customer Master Information. Customer Name, Account Number, Adress etc.select p.PARTY_NAME,ca.ACCOUNT_NUMBER,loc.address1,loc.address2,loc.address3,loc.city,loc.postal_code,loc.country,ca.CUST_ACCOUNT_IDfrom apps.ra_customer_trx_all I,apps.hz_cust_accounts CA,apps.hz_parties P,apps.hz_locations Loc,apps.hz_cust_site_uses_all CSU,apps.hz_cust_acct_sites_all CAS,apps.hz_party_sites PSwhere I.COMPLETE_FLAG =Yand I.bill_TO_CUSTOMER_ID= CA.CUST_ACCOUNT_IDand ca.PARTY_ID=p.PARTY_IDand I.bill_to_site_use_id=csu.site_use_idand csu.CUST_ACCT_SITE_ID=cas.CUST_ACCT_SITE_IDand cas.PARTY_SITE_ID=ps.party_site_idand ps.location_id=loc.LOCATION_ID
Query to find on Hand Quantity
select sum(transaction_quantity) from MTL_ONHAND_QUANTITIESwhere inventory_item_id=9and organization_id=188
Qunatity on order, Expected Deliver
select sum(ordered_quantity),a.SCHEDULE_SHIP_DATEfrom oe_order_lines_all awhere inventory_item_id=10and ship_from_org_id=188group by a.SCHEDULE_SHIP_DATE
Query to find Item Code, Item Description Oracle Item Master Query
select item, descriptionfrom mtl_system_items_bwhere inventory_item_id=&your_itemand organization_id=&organization_id) item
Query to Find out On Hand Quantity of specific Item Oracle inventoryselect sum(transaction_quantity) from mtl_onhand_quantity_detailswhere inventory_item_id=&your_itemand organization_id=&organization_id
Qty On Order,
Expected deivery date(select sum(ordered_quantity),
scheduled_ship_date from oe_order_lines_allwhere inventory_item_id=&your_itemand ship_from_org_id=&organization_idgroup by scheduled_ship_date) order_info
Total Received Qtyselect sum(transaction_quantity) from mtl_material_transactionsinventory_item_id=&your_itemand organization_id=&organization_idand transaction_quantity>0)
Total received Qty in 9 monthsselect sum(transaction_quantity) from mtl_material_transactionsinventory_item_id=&your_itemand organization_id=&organization_idand transaction_quantity>0and transaction_date between trunc(sysdate) and trunc(sysdate-270))
Total issued quantity in 9 months
select sum(transaction_quantity) from mtl_material_transactionsinventory_item_id=&your_itemand organization_id=&organization_idand transaction_quantity