Oracle EBS-SQL (OM-2):检查OM常用表
--多语言视图
ALTER SESSION SET NLS_LANGUAGE=AMERICAN ;
--组织化视图
BEGIN
FND_CLIENT_INFO.set_org_context(218);
END;
--组织化视图 R12
BEGIN
mo_global.set_policy_context('S', 218);
END;
--customer
select * from ar_customers t where t.customer_number = '74213';
select * from ar_addresses_v t where t.customer_id = 112332;
select * from ar_site_uses_v t where t.site_use_id = 630028;
select * from ar_addresses_v t where t.address_id = 449831;
HZ_CUST_ACCOUNTS hca,
HZ_CUST_SITE_USES_ALL subill,
HZ_PARTIES hp,
---header / line
SELECT t.flow_status_code, t.header_id, t.*
FROM oe_order_headers_all t
WHERE t.order_number = 1789703;
SELECT t.flow_status_code, t.line_id FROM oe_order_lines_all t WHERE t.header_id = 10186257
--wsh_delivery
SELECT t.released_status, t.mvt_stat_status, t.*
FROM wsh_delivery_details t
WHERE t.source_code = 'OE'
AND t.source_header_id = 10186257;
SELECT * FROM wsh_delivery_assignments t WHERE t.delivery_detail_id = 120302363;
-- create dn
SELECT * FROM wsh_new_deliveries t WHERE t.delivery_id = 9551901;
--WIP
SELECT * FROM wip_entities t WHERE t.wip_entity_name = '9127901'; --工单号,\
SELECT * FROM wip_discrete_jobs t WHERE t.wip_entity_id = 11480764;
SELECT * FROM wip_operations t WHERE t.wip_entity_id = 11480764;
SELECT * FROM mtl_material_transactions t where t.transaction_source_id =11480764; --wip_entity_id
--picked release
SELECT * FROM wsh_picking_batches t WHERE t.batch_id IN (26799701) --PICKED界面
and t.order_header_id =10186257;
SELECT * FROM mtl_txn_request_lines t WHERE t.line_id = 143329081; --move_order_line_id
SELECT * FROM mtl_txn_request_headers t WHERE t.header_id = 26799702;
SELECT * FROM mtl_material_transactions_temp t WHERE t.move_order_line_id =143329081
--move order / picked confirm
SELECT t.transaction_id,t.* FROM wsh_pick_slip_v t WHERE t.move_order_line_id = 143329081;
SELECT t.transaction_set_id, t.* FROM mtl_material_transactions t WHERE t.move_order_line_id = 143329081;--t.transaction_id =1877112298;
SELECT * FROM mtl_material_transactions t WHERE t.transaction_set_id = 1877112297;
--ship confirmed
SELECT * FROM mtl_material_transactions t WHERE t.picking_line_id = 120302363; --delivery_detail_id
SELECT * FROM mtl_material_transactions t WHERE t.source_line_id =346400869; --oe_line_id
select t.pick_up_stop_id, t.drop_off_stop_id, t.* from wsh_delivery_legs t where t.delivery_id = 9551901;
select t.trip_id, t.* from wsh_trip_stops t where t.stop_id in (13939361, 13939362);
select * from wsh_trips t where t.trip_id = 6962260;
--ar interface
select * from ar.ra_interface_lines_all t where t.interface_line_attribute1 ='1789703' --order_number
--return order
SELECT t.flow_status_code, t.header_id, t.*
FROM oe_order_headers_all t
WHERE t.order_number = 4320045;
SELECT t.flow_status_code, t.line_id FROM oe_order_lines_all t WHERE t.header_id = 10186351;
--Receipts
select * from rcv_shipment_headers r where r.receipt_num ='4320045-r';
select * from rcv_shipment_lines l where l.shipment_header_id =7143290;
select * from rcv_transactions_interface l where l.shipment_header_id =7143290;
select * from rcv_transactions t where t.shipment_header_id =7143290;
--入库
select * from mtl_material_transactions mmt where mmt.Rcv_Transaction_Id =95826257;
--ar interface
select * from ar.ra_interface_lines_all t where t.interface_line_attribute1 ='4320045' --order_number