Oracle EBS OM 取消订单

DECLARE
l_header_rec OE_ORDER_PUB.Header_Rec_Type;
l_line_tbl OE_ORDER_PUB.Line_Tbl_Type;
l_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type;
l_header_adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type;
l_line_adj_tbl OE_ORDER_PUB.line_adj_tbl_Type;
l_header_scr_tbl OE_ORDER_PUB.Header_Scredit_Tbl_Type;
l_line_scredit_tbl OE_ORDER_PUB.Line_Scredit_Tbl_Type;
l_return_status VARCHAR2(1000);
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
p_api_version_number NUMBER :=1.0;
p_init_msg_list VARCHAR2(10) := FND_API.G_FALSE;
p_return_values VARCHAR2(10) := FND_API.G_FALSE;
p_action_commit VARCHAR2(10) := FND_API.G_FALSE;
x_return_status VARCHAR2(1);
x_msg_count NUMBER;
x_msg_data VARCHAR2(100);
p_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type :=  oe_order_pub.G_MISS_REQUEST_TBL;
x_header_val_rec OE_ORDER_PUB.Header_Val_Rec_Type;
x_Header_Adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type;
x_Header_Adj_val_tbl OE_ORDER_PUB.Header_Adj_Val_Tbl_Type;
x_Header_price_Att_tbl OE_ORDER_PUB.Header_Price_Att_Tbl_Type;
x_Header_Adj_Att_tbl OE_ORDER_PUB.Header_Adj_Att_Tbl_Type;
x_Header_Adj_Assoc_tbl OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type;
x_Header_Scredit_tbl OE_ORDER_PUB.Header_Scredit_Tbl_Type;
x_Header_Scredit_val_tbl OE_ORDER_PUB.Header_Scredit_Val_Tbl_Type;
x_line_val_tbl OE_ORDER_PUB.Line_Val_Tbl_Type;
x_Line_Adj_tbl OE_ORDER_PUB.Line_Adj_Tbl_Type;
x_Line_Adj_val_tbl OE_ORDER_PUB.Line_Adj_Val_Tbl_Type;
x_Line_price_Att_tbl OE_ORDER_PUB.Line_Price_Att_Tbl_Type;
x_Line_Adj_Att_tbl OE_ORDER_PUB.Line_Adj_Att_Tbl_Type;
x_Line_Adj_Assoc_tbl OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type;
x_Line_Scredit_tbl OE_ORDER_PUB.Line_Scredit_Tbl_Type;
x_Line_Scredit_val_tbl OE_ORDER_PUB.Line_Scredit_Val_Tbl_Type;
x_Lot_Serial_tbl OE_ORDER_PUB.Lot_Serial_Tbl_Type;
x_Lot_Serial_val_tbl OE_ORDER_PUB.Lot_Serial_Val_Tbl_Type;
x_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type;
X_DEBUG_FILE VARCHAR2(100);
l_msg_index_out NUMBER(10);
BEGIN
dbms_output.enable(1000000);
fnd_global.apps_initialize(4096,21623,660); -- pass in  user_id,responsibility_id, and application_id
oe_msg_pub.initialize;
oe_debug_pub.initialize;
X_DEBUG_FILE := OE_DEBUG_PUB.Set_Debug_Mode(‘FILE‘);
oe_debug_pub.SetDebugLevel(5); -- Use 5 for the most debuging output, I warn  you its a lot of data
dbms_output.put_line(‘START OF NEW DEBUG‘);
--This is to cancel an order
-- Initialize the record to missing
l_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC;
l_header_rec.header_id := 98252;
l_header_rec.cancelled_flag := ‘Y‘;
l_header_rec.change_reason := ‘Not provided‘;
l_header_rec.operation := OE_GLOBALS.G_OPR_Update;
-- Call To Process order API
OE_ORDER_PUB.process_order (
  p_api_version_number => 1.0
  , p_init_msg_list => fnd_api.g_false
  , p_return_values => fnd_api.g_false
  , p_action_commit => fnd_api.g_false
  , x_return_status => l_return_status
  , x_msg_count => l_msg_count
  , x_msg_data => l_msg_data
  , p_header_rec => l_header_rec
  , p_line_tbl => l_line_tbl
  , p_action_request_tbl => l_action_request_tbl
-- OUT PARAMETERS
  , x_header_rec => l_header_rec
  , x_header_val_rec => x_header_val_rec
  , x_Header_Adj_tbl => x_Header_Adj_tbl
  , x_Header_Adj_val_tbl => x_Header_Adj_val_tbl
  , x_Header_price_Att_tbl => x_Header_price_Att_tbl
  , x_Header_Adj_Att_tbl => x_Header_Adj_Att_tbl
  , x_Header_Adj_Assoc_tbl => x_Header_Adj_Assoc_tbl
  , x_Header_Scredit_tbl => x_Header_Scredit_tbl
  , x_Header_Scredit_val_tbl => x_Header_Scredit_val_tbl
  , x_line_tbl => l_line_tbl
  , x_line_val_tbl => x_line_val_tbl
  , x_Line_Adj_tbl => x_Line_Adj_tbl
  , x_Line_Adj_val_tbl => x_Line_Adj_val_tbl
  , x_Line_price_Att_tbl => x_Line_price_Att_tbl
  , x_Line_Adj_Att_tbl => x_Line_Adj_Att_tbl
  , x_Line_Adj_Assoc_tbl => x_Line_Adj_Assoc_tbl
  , x_Line_Scredit_tbl => x_Line_Scredit_tbl
  , x_Line_Scredit_val_tbl => x_Line_Scredit_val_tbl
  , x_Lot_Serial_tbl => x_Lot_Serial_tbl
  , x_Lot_Serial_val_tbl => x_Lot_Serial_val_tbl
  , x_action_request_tbl => l_action_request_tbl
);
dbms_output.put_line(‘OM Debug file: ‘  ||oe_debug_pub.G_DIR||‘/‘||oe_debug_pub.G_FILE);
FOR i IN 1 .. l_msg_count
LOOP
  Oe_Msg_Pub.get( p_msg_index => i
   , p_encoded => Fnd_Api.G_FALSE
   , p_data => l_msg_data
   , p_msg_index_out => l_msg_index_out
  );
  DBMS_OUTPUT.PUT_LINE(‘message is: ‘ || l_msg_data);
  DBMS_OUTPUT.PUT_LINE(‘message index is: ‘ || l_msg_index_out);
  dbms_output.put_line(‘ www.dezai.cn‘);
END LOOP;
-- Check the return status
IF l_return_status = FND_API.G_RET_STS_SUCCESS
THEN
  dbms_output.put_line(‘Process order Sucess‘);
ELSE
  dbms_output.put_line(‘Failed‘);
END IF;
-- debug output
dbms_output.put_line(‘Debug Output‘);
FOR i in 1..OE_DEBUG_PUB.g_debug_count
LOOP
  dbms_output.put_line(OE_DEBUG_PUB.G_debug_tbl(i));
END LOOP;
END;
/
commit;

  

原文地址:https://www.cnblogs.com/jenrry/p/10021058.html

时间: 2024-10-08 20:33:01

Oracle EBS OM 取消订单的相关文章

Oracle EBS OM 取消订单行

DECLARE l_header_rec OE_ORDER_PUB.Header_Rec_Type; l_line_tbl OE_ORDER_PUB.Line_Tbl_Type; l_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type; l_header_adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type; l_line_adj_tbl OE_ORDER_PUB.line_adj_tbl_Type; l_header_s

Oracle EBS OM 登记订单

DECLARE l_header_rec OE_ORDER_PUB.Header_Rec_Type; l_line_tbl OE_ORDER_PUB.Line_Tbl_Type; l_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type; l_header_adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type; l_line_adj_tbl OE_ORDER_PUB.line_adj_tbl_Type; l_header_s

Oracle EBS OM 发放订单

DECLARE l_header_rec OE_ORDER_PUB.Header_Rec_Type; l_line_tbl OE_ORDER_PUB.Line_Tbl_Type; l_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type; l_header_adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type; l_line_adj_tbl OE_ORDER_PUB.line_adj_tbl_Type; l_header_s

Oracle EBS OM 保留订单

DECLARE l_header_rec OE_ORDER_PUB.Header_Rec_Type; l_line_tbl OE_ORDER_PUB.Line_Tbl_Type; l_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type; l_header_adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type; l_line_adj_tbl OE_ORDER_PUB.line_adj_tbl_Type; l_header_s

Oracle EBS 中直发订单Drop Ship流程的系统操作记录

Oracle EBS 中直发订单Drop Ship流程的系统操作记录 应用场景: A公司向客户B销售产品,但是自己不生产该产品,而是向供应商C来采购,并且通常是要供应商C直接把货发到B客户处,属于贸易型企业经常用到的业务流程,有些集团公司下的子公司销售业务也用这种方式. 在实际业务中,并非所有的销售都是企业内部发出的,为了节约成本.提高周转效率.甚至应急销售,企业往往将外部企业也作为自己销售供货的来源之一,通过采购后直接发货的方式,将其他企业的货物直接销往自己的客户.这种销售业务模式,系统中称之

Oracle EBS OM RMA销售退货异常处理(Datafix)

系统版本: RDBMS : 9.2.0.6.0 Oracle 应用产品 : 11.5.10.2 问题症状:       1.通过物料事务处理查看销售订单行退货记录显示已经入库为40: 2.销售退货订单行已经接收入库.但是,订单行状态仍然是"等待退货",发运数量为空: 3.销售退货仍然能做RMA接收40数量.但是,查看接收事务处理记录显示已经接收入库了: 4.AR接口行和AR事务处理没有找到对应销售退货订单行的记录: 5.销售退货订单行工作流报错: EBS群下的朋友说要Datafix.但

EBS OM销售订单接口相关

OM接口相关表: 1. OE_HEADERS_IFACE_ALL 此表为多组织表,用于将销售订单头插入开放接口.    该表存储来自于其他子系统需要导入OM模块的订单头信息,    该表导入时必须输入的字段/条件:    ORDER_SOURCE_ID : Order source id 可选    ORIG_SYS_DOCUMENT_REF: Original system document reference 必须    ORDER_SOURCE : Order source 可选    O

Oracle EBS更新销售订单行信息API

 更新销售订单行信息 DECLARE l_header_rec             oe_order_pub.header_rec_type; l_line_tbl               oe_order_pub.line_tbl_type; l_line_tb2               oe_order_pub.line_tbl_type; l_action_request_tbl     oe_order_pub.request_tbl_type; l_return_sta

Oracle EBS发放销售订单

 模拟发放销售订单界面进行发放操作 PROCEDURE insert_row(x_batch_id OUT NUMBER) IS l_autopack_flag VARCHAR2(1 ); l_autopack_level NUMBER; l_release_method VARCHAR2(1 ); l_release_online VARCHAR2(240 ) := fnd_profile.value('SHP_PICK_RELEASE_ONLINE' ); --bugfix 118302