Oracle EBS訂單的流程(Order->AR)轉載
from:http://blog.csdn.net/pan_tian/article/details/7693447
基本流程
建立訂單
路徑:Order Management > Orders,Returns > Sales Orders
填寫訂單頭資訊,客戶,訂單型別,銷售人員
填寫訂單體資訊,輸入物料,數量...
然後Book Order,訂單Book之後,你會發現訂單頭的Status的狀態變成了“Booked”,訂單行的狀態為"Awaiting Shipping",記錄下來你的訂單號,後邊的每一步都需要這個訂單號。
狀態:訂單Book之後,這個時候發運單也就產生了,如果你去Shipping Transactions Form,查詢訂單,你就會發現發運單的Line Status為Ready to Release,Next Step為Pick Release
Pick Release
路徑:Order Management > Shipping > Release Sales Orders > Release Sales Orders
Pick Release俗稱挑庫(即從倉庫中挑選貨物).在Order Number中輸入待挑庫的訂單號
Auto Pick Confirm設定為No
Auto Allocate設定為N
Auto Allocate和Auto Pick Confirm都可以設定為Yes,只不過為了講的更加詳細,這裡都設定為No,設定為Yes的話,那麼後邊的Allocate和Pick Confirm兩步,系統就會自動幫你完成。
這裡有兩個按鈕來執行Pick Release,”Concurrent“是把Pick Release的任務發給Concurrent Request來執行,"Execute Now"是系統再前段執行Pick Release,直到執行結束才把控制權返還給User,這裡我們點選Concurrent按鈕。
Pick Release後臺做了什麼事情?Pick Release會建立一個Pick Wave型別Move Order,這個Move Order就是用來把庫存中的貨物搬到一個臨時發貨區(Staging),如果開啟INV日誌就能看到系統是呼叫INV_MOVE_ORDER_PUB.CREATE_MOVE_ORDER_HEADER來建立Move Order的。(對於Pick Release的後臺流程可以參見我的總結:
另外需要提到的是,在Pick Release之後,系統會針對你的訂單生成一條Reservation(預留),這個時候的預留稱為Soft Reservations,因為還沒有明確從哪個庫出貨,所以會在Org級別建立物料的保留。
狀態:這個時候,Shipping Transaction的Line Status為"Released to Warehouse",Next Step為"Transact Move Order";訂單頭的狀態仍為Booked,行狀態仍為”Awaiting Shipping“。
Pick Confirm
Pick Confirm(挑庫確認)的動作實際上是在Transact Move Order中完成的,先Allocate挑選貨物,再Transact Move Order.
路徑:Inventory > Move Orders > Transact Move Orders
查詢頁面,Pick Wave那個Tab,輸入訂單號
進入TMO主介面後,點選Allocate,Allocate會根據你係統預設的Picking Rule來挑選貨物,然後給你一個Suggestion的挑庫項,Suggestion記錄會儲存在MTL_MATERIAL_TRANSACTIONS_TEMP表(即Pending Transactions)。
另外完成Allocate之後,你會看到介面Allocation項會出現Single,Multiple或者None的標識,Single表示,系統給你了產生了一條Suggestion的Transaction記錄,Multiple表示產生了多條;None表示沒有產生Suggestion記錄(很可能是因為你係統中庫存數量不足)
接下來一步就是去Transact這個Move Order
按Transact之後,Inventory Transaction Manager 會處理Suggestion Transactions(MMTT),然後物料轉移的動作就真實發生了,物料就從正式Subinventory到臨時存貨區(Staging)。這個Transction可以從Material Transaction的Form中查詢到。
另外對於Reservation來說,在Transact之後,因為庫存明確了,Reservation就會變得更加明確,是對哪個Sub,locator做保留。
狀態:這個時候,Shipping Transaction的Line Status為"Staged/Pick Confirmed",Next Step為"Ship Confirm/Close Trip Stop";訂單頭的狀態仍為Booked,行狀態變為了”Picked“。
Ship Confirm Deliveries
路徑:Order Management > Shipping > Transactions
切換到Delivery頁籤,準備Ship Confirm(發貨確認),如果你在Pick Release的時候,沒有選擇Autocreate Delivery,那麼系統會檢查Define Shipping Parameters裡邊這兩個的設定,如果shipping parameters裡邊也沒有選擇,那麼你需要手工的在Ship Confirm的時候選擇Action->Auto-create Deliveries.
Delivery資訊實際上包含你要投遞貨物到哪裡,使用哪家物流公司....
Delivery頁籤,點選Ship Confirm按鈕後,會彈出一個視窗,"Defer Interface"如果被勾上,說明你要手動的執行Interface Trip Stop SRS,我們勾上Defer Interface,點OK。
Delivery was successfully confirmed!!!
Ship Confirm這個動作會插入一條記錄到MTL_TRANSACTIONS_INTERFACE表中,這個MTI記錄的型別為Sales Order Issue,這條記錄會被接下來的Interface Trip Stop來處理,最終從MTI轉到MMT表中。
狀態:這個時候,Shipping Transaction的Line Status為"Shipped",Next Step為"Run Interfaces";訂單頭的狀態仍為Booked,行狀態變為了”Shipped“。
Interface Trip Stop - SRS
因為我們在Ship Confirm的時候設定了Defer Interface,所以這裡我們還需要手動的執行Interface Trip Stop - SRS。
路徑:Order Management > Shipping > Interface > Run > Request:Interface Trip Stop - SRS
Interface Trip Stop實際上包含兩部分:Order Management Interface SRS(更新發執行狀態、以準備生成AR發票)和 Inventory Interface SRS(產生庫存出貨事務)
Order Management Interface - SRS是在Inventory Interface SRS之前執行的,這個Request更新發執行狀態、以準備生成AR發票,OM Interface執行結束後會更新WSH_DELIVERY_DETAILS表的OE_INTERFACED_FLAG為Y。
Inventory Interface SRS會根據Shipping Transaction來插入記錄到MTI,進而INV Manager會把這條MTI記錄轉到MMT表中,一條Sales Order Issue的transaction記錄就產生了,並完成庫存數量的扣減和Reservation的刪除。Inventory Interface SRS執行完之後,會更新WSH_DELIVERY_DETAILS表的INV_INTERFACED_FLAG欄位為Y。
狀態:這個時候,Shipping Transaction的Line Status為"Interfaced",Next Step為"Not Applicable";訂單頭的狀態仍為Booked,行狀態變為了”Shipped“。
Workflow background Process
路徑:Inventory > Workflow Background Engine
Item Type:OM Order Line
Process Deferred:Yes
Process Timeout:No
這個program用於處理Deffered狀態的workflow,Workflow Background Process執行後,相關資料就會從Order表匯入到RA Interface表中去(RA_INTERFACE_LINES_ALL,RA_INTERFACE_SALESCREDITS_ALL,RA_Interface_distribution)
你可以通過下邊的SQL來檢視RA Interface資訊:
1.SELECT * FROM RA_INTERFACE_LINES_ALL WHERE sales_order = '65961';
2.SELECT * FROM RA_INTERFACE_SALESCREDITS_ALL
WHERE INTERFACE_LINE_ID IN (SELECT INTERFACE_LINE_ID FROM RA_INTERFACE_LINES_ALL WHERE sales_order = '65961' );
3.SELECT * FROM RA_INTERFACE_DISTRIBUTIONS_ALL
WHERE INTERFACE_LINE_ID IN (SELECT INTERFACE_LINE_ID FROM RA_INTERFACE_LINES_ALL WHERE sales_order = '65961' );
資料插入到RA Interface之後,再看OE_ORDER_LINES_ALL的INVOICE_INTERFACE_STATUS_CODE欄位變成了Yes,INVOICED_QUANTITY變為了訂單行的數量。並且你會發現訂單行的狀態變成了Closed,訂單頭的狀態仍為Booked。
AutoInvoice
用於生成AR發票
路徑:Account Receivable > Interface > AutoInvoice
Name:Autoinvoice Master Program
Invoice Source:Order Entry
Default Day:當前日期
提交後,在request裡能看到”Autoinvoice Import Program“在執行。
從上圖,可以看出Auto Invoice Program用於處理RA的interface表,然後生成真正的營收發票資訊,最終資料會插入AR正式表中(RA_CUSTOMER_TRX_ALL,RA_CUSTOMER_TRX_LINES,AR_PAYMENT_SCHEDULES).
可以到訂單裡 Order > Action > Additional Information > Invoices/Credit Memos中能看到發票資訊,也可以通過下邊SQL檢視訂單和AR資訊,
SELECT ooha.order_number , oola.line_number so_line_number , oola.ordered_item , oola.ordered_quantity * oola.unit_selling_price so_extended_price , rcta.trx_number invoice_number , rcta.trx_date , rctla.line_number inv_line_number , rctla.unit_selling_price inv_unit_selling_price FROM oe_order_headers_all ooha , oe_order_lines_all oola , ra_customer_trx_all rcta , ra_customer_trx_lines_all rctla WHERE ooha.header_id = oola.header_id AND rcta.customer_trx_id = rctla.customer_trx_id AND rctla.interface_line_attribute6 = TO_CHAR (oola.line_id) AND rctla.interface_line_attribute1 = TO_CHAR (ooha.order_number) AND order_number = :p_order_number;
如果Autoinvoice Import Program有出現error的情況,你可以檢視RA_INTERFACE_ERRORS_ALL表Message_text欄位,來獲取錯誤資訊。
Closing the Order
訂單的關閉是自動的,在所有行工作流結束(Close或者Cancel)後0.5天,訂單頭也將在Workflow Background Process的推動下關閉。
還有另外一種說法:you can wait until month-end and the “Order Flow – Generic” workflow will close it for you.
Order&Shipping Transactions Status Summary
Step | Order Header Status | Order Line Status | Order Flow Workflow Status (Order Header) | Line Flow Workflow Status (Order Line) | Shipping Transaction Status(RELEASED_STATUS in WDD) |
---|---|---|---|---|---|
1. Enter an Order | Entered | Entered | Book Order Manual | Enter – Line | N/A |
2. Book the Order | Booked | Awaiting Shipping | Close Order | Schedule ->Create Supply ->Ship – Line | Ready to Release(R) |
3. Pick the Order | Booked | Picked | Close Order | Ship – Line | 1.Released to Warehouse(S)(Pick Release but not pick confirm) 2.Staged/Pick Confirmed(Y)(After pick confirm) |
4. Ship the Order | Booked | Shipped | Close Order | Fulfill – Deferred | 1.Shipped(After ship confirm) 2.Interfaced(C)(After ITS) |
Booked | Closed | Close Order | Fulfill ->Invoice Interface ->Close Line -> End | ||
5. Close the Order | Closed | Closed | End | End |