廣告聯播

2013年9月3日 星期二

Oracle EBS Interface - OM : Sale Order import

From: Polin Wei
在 Oracle EBS 的訂單模組( OM : Order Management) 有提供訂單匯入的功能,主要操作的 Table 有兩個 : OE_HEADERS_IFACE_ALL、OE_LINES_IFACE_ALL,詳細請參考 Oracle 官方文件:115omapi.pdf 。以下以範例來作說明:
範例1 : 新訂單
-- Insert a Sales Order Header and make the Order's Status is Booked. (表頭:OE_HEADERS_IFACE_ALL,並作 Booked)
INSERT INTO OE_HEADERS_IFACE_ALL (
order_source_id
,orig_sys_document_ref
,creation_date
,created_by
,last_update_date
,last_updated_by
,operation_code
,sold_to_org_id
,booked_flag
,org_id
,customer_po_number )
VALUES (
1001 --order_source_id
,'12345691' --orig_sys_document_ref
,SYSDATE --creation_date
,-1 --created_by
,SYSDATE --last_update_date
,-1 --last_updated_by
,'INSERT' --operation_code
,1891 --sold_to_org_id
,'Y' --booked_flag
,77 --org_id (for specific ou)
,'12345691' -- customer_po_number 
);
-- Insert a Sales Order Line (表身:OE_LINES_IFACE_ALL)
INSERT INTO OE_LINES_IFACE_ALL (
order_source_id
,orig_sys_document_ref
,orig_sys_line_ref
,inventory_item_id
,ordered_quantity
,operation_code
,created_by
,creation_date
,last_updated_by
,last_update_date
,ship_from_org_id
)
VALUES (
1001 --order_source_id
,'12345691' --orig_sys_document_ref
,'1' --orig_sys_line_ref
,285730 --inventory_item_id
, 1 --ordered_quantity
, 'INSERT' --operation_code
, -1 --created_by
, SYSDATE --creation_date
, -1 --last_updated_by
, SYSDATE --last_update_date
, 77 -- ship_from_org_id
);
至於訂單變更,拆行...等請繼續閱讀 Oracle EBS - Interface

沒有留言:

張貼留言