Listed some useful queries scripts for Oracle Order Management Flow.

(For Order Management Detailed Flow, You may check my previous post: Oracle EBS订单的流程(Order->AR):http://blog.csdn.net/pan_tian/article/details/7693447 )



Sales Order Info

Order Header

SELECT * FROM OE_ORDER_HEADERS_ALL

WHERE ORDER_NUMBER = '65020';

Order Lines

SELECT * FROM OE_ORDER_LINES_ALL

WHERE HEADER_ID IN (SELECT HEADER_ID FROM OE_ORDER_HEADERS_ALL WHERE ORDER_NUMBER = '65020');

Inventory

MTL_SALES_ORDERS

SELECT S.SALES_ORDER_ID,S.SEGMENT1, S.SEGMENT2,S.SEGMENT3,H.ORDER_NUMBER,H.FLOW_STATUS_CODE,H.SOLD_TO_ORG_ID,H.OPEN_FLAG

FROM MTL_SALES_ORDERS S,OE_ORDER_HEADERS_ALL H

WHERE S.SEGMENT1 = TO_CHAR(H.ORDER_NUMBER)

AND  H.ORDER_NUMBER = '65020'



(MTL_SALES_ORDERS exists for the purpose of mapping sales orders between other applications and Inventory,Once Sales Order get booked, There will be record go into mtl_sales_orders.refer:link)

Reservations

SELECT MR.* FROM MTL_RESERVATIONS MR,OE_ORDER_LINES_ALL OOLA 

WHERE MR.DEMAND_SOURCE_LINE_ID = OOLA.LINE_ID

AND OOLA.LINE_ID = &ORDER_LINE_ID;

(Each record is a reservation that ties an item/organization combination with a demand source and a supply source.NOTE:MR.DEMAND_SOURCE_HEADER_ID point to Mtl_Sales_Orders.Sales_Order_ID, NOT OE_ORDER_HEADERS_ALL.HEADER_ID)

Allocation

SELECT * FROM MTL_MATERIAL_TRANSACTIONS_TEMP 

WHERE TRX_SOURCE_LINE_ID IN 

      (SELECT LINE_ID FROM OE_ORDER_LINES_ALL 

       WHERE HEADER_ID IN (SELECT HEADER_ID FROM OE_ORDER_HEADERS_ALL WHERE ORDER_NUMBER = '65020'));

Move Order

SELECT * FROM MTL_TXN_REQUEST_LINES 

WHERE TXN_SOURCE_LINE_ID IN 

       (SELECT LINE_ID FROM OE_ORDER_LINES_ALL 

       WHERE HEADER_ID IN (SELECT HEADER_ID FROM OE_ORDER_HEADERS_ALL WHERE ORDER_NUMBER = '65020'));

(NOTE:MTRL.TXN_SOURCE_ID point to Mtl_Sales_Orders.Sales_Order_ID, NOT OE_ORDER_HEADERS_ALL.HEADER_ID)

Material Transactions(Picking, Issuing Transaction Type)

SELECT * FROM MTL_MATERIAL_TRANSACTIONS 

WHERE TRX_SOURCE_LINE_ID IN 

      (SELECT LINE_ID FROM OE_ORDER_LINES_ALL 

       WHERE HEADER_ID IN (SELECT HEADER_ID FROM OE_ORDER_HEADERS_ALL WHERE ORDER_NUMBER = '65020'));

Shipping

Delivery Lines

SELECT * FROM WSH_DELIVERY_DETAILS WHERE  SOURCE_HEADER_NUMBER = '65020';

(WSH_DELIVERY_DETAILS has delivery lines and LPNs.Once Sales Order get booked, There will be record go into WDD)

Delivery Assignments

SELECT * FROM WSH_DELIVERY_ASSIGNMENTS WDA, WSH_DELIVERY_DETAILS WDD 

WHERE WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID

AND WDD.SOURCE_HEADER_NUMBER = '65020'; 

(WSH_DELIVERY_ASSIGNMENTS assigns delivery details to a delivery and/or a parent delivery detail (LPN),Once Sales Order get booked, There will be record go into WDA)

SELECT * FROM WSH_NEW_DELIVERIES

WHERE DELIVERY_ID=WSH_DELIVERY_ASSIGNMENTS.DELIVERY_ID

(WSH_NEW_DELIVERIES has the delivery records.)

SELECT * FROM WSH_DELIVERY_LEGS

WHERE DELIVERY_ID=WSH_NEW_DELIVERIES.DELIVERY_ID

(WSH_DELIVERY_LEGS maps deliveries to their pick up and drop off stops.)



SELECT * FROM WSH_TRIP_STOPS WTS

WHERE STOP_ID=WSH_DELIVERY_LEGS.PICK_UP_STOP_ID

(WSH_TRIP_STOPS has trip stop records.)

SELECT * FROM WSH_TRIPS WT

WHERE TRIP_ID=WSH_TRIP_STOPS.TRIP_ID

(Trip records.)

Other Related Queries

Order Type Info

select * from apps.oe_transaction_types_tl

where transaction_type_id= oe_order_headers_all.order_type_id;

Price List Info

select * from apps.qp_list_headers_tl

where list_header_id=oe_order_headers_all.price_list_id;



select * from apps.qp_list_lines

where list_header_id=oe_order_headers_all.price_list_id;



Find Customer Info

select * from hz_cust_accounts hca

where cust_account_id=oe_order_headers_all.sold_to_org_id



select * from apps.hz_parties

where party_id=hz_cust_accounts.party_id



Find Ship to Location Info

select * from hz_cust_site_uses_all

where site_use_id=oe_order_headers_all.ship_to_org_id



select * from apps.hz_cust_acct_sites_all

where cust_acct_site_id=hz_cust_site_uses_all.cust_acct_site_id



select * from hz_party_sites

where party_site_id=hz_cust_acct_sites_all.party_site_id



Find Bill to location

select * from hz_cust_site_uses_all

where site_use_id=oe_order_headers_all.invoice_to_org_id



select * from hz_cust_acct_sites_all

where cust_acct_site_id=hz_cust_site_uses_all.cust_acct_site_id



select * from hz_party_sites

where party_site_id=hz_cust_acct_sites_all.party_site_id



Actual Address

select * from hz_locations

where location_id=hz_party_sites.location_id



Ship Method

select ship_method_code from wsh.wsh_carrier_services

where ship_method_code = oe_order_headers_all.shipping_method_code

---------------------------------------------------------------------------------------------------------

BTW:There are two standard ways to diagnostic a Sales Order

1. HTMOMSE Sales Order Diagnostic Script [ID 133464.1]

HTMomse11i.sql or HTMomse12.sql

2.Report:"Diagnostics: OM Order Information" for given order number

run the 'Diagnostic: Order Information' report (OMORDER.SQL) from Order Management Super User > Reports, Requests > Requests menu.

---------------------------------------------------------------------------------------------------------

Following information copy from http://oracleapps88.blogspot.jp/2013/02/order-management-tables.html

Entered

oe_order_headers_all 1 record created in header table

oe_order_lines_all Lines for particular records

oe_price_adjustments When discount gets applied

oe_order_price_attribs If line has price attributes then populated

oe_order_holds_all If any hold applied for order like credit check etc.



Booked

oe_order_headers_all Booked_flag=Y Order booked.

wsh_delivery_details Released_status Ready to release



Pick Released

wsh_delivery_details Released_status=Y Released to Warehouse (Line has been released to Inventory for processing)

wsh_picking_batches After batch is created for pick release.

mtl_reservations This is only soft reservations. No physical movement of stock



Full Transaction

mtl_material_transactions No records in mtl_material_transactions

mtl_txn_request_headers

mtl_txn_request_lines

wsh_delivery_details Released to warehouse.

wsh_new_deliveries if Auto-Create is Yes then data populated.

wsh_delivery_assignments deliveries get assigned



Pick Confirmed

wsh_delivery_details Released_status=Y Hard Reservations. Picked the stock. Physical movement of stock



Ship Confirmed

wsh_delivery_details Released_status=C Y To C:Shipped ;Delivery Note get printed Delivery assigned to trip stopquantity will be decreased from staged

mtl_material_transactions On the ship confirm form, check Ship all box

wsh_new_deliveries If Defer Interface is checked I.e its deferred then OM & inventory not updated. If Defer Interface is not checked.: Shipped



oe_order_lines_all Shipped_quantity get populated.

wsh_delivery_legs 1 leg is called as 1 trip.1 Pickup & drop up stop for each trip.

oe_order_headers_all If all the lines get shipped then only flag N



Autoinvoice

wsh_delivery_details Released_status=I Need to run workflow background process.

ra_interface_lines_all Data will be populated after wkfw process.

ra_customer_trx_all After running Autoinvoice Master Program for

ra_customer_trx_lines_all specific batch transaction tables get populated



Price Details

qp_list_headers_b To Get Item Price Details.

qp_list_lines

Items On Hand Qty

mtl_onhand_quantities TO check On Hand Qty Items.



Payment Terms

ra_terms Payment terms



AutoMatic Numbering System

ar_system_parametes_all you can chk Automactic Numbering is enabled/disabled.



Customer Information

hz_parties Get Customer information include name,contacts,Address and Phone

hz_party_sites

hz_locations

hz_cust_accounts

hz_cust_account_sites_all

hz_cust_site_uses_all

ra_customers



Document Sequence

fnd_document_sequences Document Sequence Numbers

fnd_doc_sequence_categories

fnd_doc_sequence_assignments

Default rules for Price List

oe_def_attr_def_rules Price List Default Rules

oe_def_attr_condns

ak_object_attributes

End User Details

csi_t_party_details To capture End user Details



Sales Credit Sales Credit Information(How much credit can get)

oe_sales_credits



Attaching Documents

fnd_attached_documents Attched Documents and Text information

fnd_documents_tl

fnd_documents_short_text



Blanket Sales Order

oe_blanket_headers_all Blanket Sales Order Information.

oe_blanket_lines_all



Processing Constraints

oe_pc_assignments Sales order Shipment schedule Processing Constratins

oe_pc_exclusions

Sales Order Holds

oe_hold_definitions Order Hold and Managing Details.

oe_hold_authorizations

oe_hold_sources_all

oe_order_holds_all



Hold Relaese

oe_hold_releases_all Hold released Sales Order.



Credit Chk Details

oe_credit_check_rules To get the Credit Check Againt Customer.



Cancel Orders

oe_order_lines_all Cancel Order Details.


Order Management Useful Scripts的更多相关文章

  1. Oracle Order Management DropShip Flow for R12

    Oracle Order Management DropShip Flow for R12 Email ThisBlogThis!Share to TwitterShare to FacebookSh ...

  2. Order Management Suite - Pricing and Availability Form Library

    In this Document   Purpose   Scope   Details   A. Form / Functional Issues   "Add to Selection& ...

  3. Process Order API - How To Scripts

    In this Document   Purpose   Questions and Answers   References APPLIES TO: Oracle Order Management ...

  4. RMA Sales Order – Stuck with “Awaiting Return Disposition”

    RMA Sales Order – Stuck with "Awaiting Return Disposition"                     Action : (P ...

  5. How to Simulate the Price Order or Price Line Function using API QP_PREQ_PUB.PRICE_REQUEST Includes

    How to Simulate the Price Order or Price Line Function using API QP_PREQ_PUB.PRICE_REQUEST Includes ...

  6. RMA Sales Order – Stuck with “Awaiting Return Disposition”

    RMA Sales Order – Stuck with “Awaiting Return Disposition” Action : (Prod) ð  Login to Unix ð  su – ...

  7. 转:Order&Shipping Transactions Status Summary

    详细内容: http://blog.csdn.net/pan_tian/article/details/7696528 WSH_DELIVERY_DETAILS.Release_Status can ...

  8. Sales Order Flow Statuses

    OE_ORDER_LINES_ALL.flow_status_code column values execute the below query to see the values. SELECT ...

  9. Order to Cash Process

    order to cash process steps can be listed as below · Enter the Sales Order · Book the Sales Order · ...

随机推荐

  1. 决策树之ID3、C4.5

    决策树是一种类似于流程图的树结构,其中,每个内部节点(非树叶节点)表示一个属性上的测试,每个分枝代表该测试的一个输出,而每个树叶节点(或终端节点存放一个类标号).树的最顶层节点是根节点.下图是一个典型 ...

  2. Android线性布局

    线性布局 LinearLayout 是一个视图组,用于使所有子视图在单个方向(垂直或水平)保持对齐. 您可以使用 android:orientation 属性指定布局方向. LinearLayout ...

  3. 关于JQuery中的ajax请求或者post请求的回调方法中的操作执行或者变量修改没反映的问题

    前段时间做一个项目,而项目中所有的请求都要用jquery 中的ajax请求或者post请求,但是开始处理一些简单操作还好,但是自己写了一些验证就出现问题了,比如表单提交的时候,要验证帐号的唯一性,所以 ...

  4. 【C++】处理CSDN博文源码

    为了简化CSDN写博客的字体问题,给出一段代码,用于处理使用默认格式写完博客后,处理一次来解决字体问题. 代码片段 代码片段如下所示: #include <iostream> #inclu ...

  5. Unsupported major.minor version 52.0

    今天运行项目,切换一下eclipse,运行程序突然发现普通的类main()方法无法运行,报错详细信息如下: Exception in thread "main" java.lang ...

  6. 集合框架之Queue接口

    Queue接口 在处理元素前用于保存元素的 collection.除了基本的 Collection 操作外,队列还提供其他的插入.提取和检查操作.每个方法都存在两种形式:一种抛出异常(操作失败时),另 ...

  7. 学习TensorFlow,打印输出tensor的值

    在学习TensorFlow的过程中,我们需要知道某个tensor的值是什么,这个很重要,尤其是在debug的时候.也许你会说,这个很容易啊,直接print就可以了.其实不然,print只能打印输出sh ...

  8. 在Activity,Service,Window中监听Home键和返回键的一些思考,如何把事件传递出来的做法!

    在Activity,Service,Window中监听Home键和返回键的一些思考,如何把事件传递出来的做法! 其实像按键的监听,我相信很多人都很熟练了,我肯定也不会说这些基础的东西,所以,前期,还是 ...

  9. JVM学习之-栈

    JVM栈解决程序的运行问题,即程序如何执行,或者说如何处理数据;JVM堆解决的是数据存储的问题,即数据怎么放.放在哪儿,另外JVM堆中存的是对象.JVM栈中存的是基本数据类型和JVM堆中对象的引用. ...

  10. Servlet处理流程分析-Servlet学习之旅(二)

    tomcat的处理处理客户端流程分析 tomcat即是servlet容器也具有web服务器的功能,即也具有html页面的功能. 1.首先客户端会将html请求发给tomcat内置的web服务器 2.w ...