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_status          VARCHAR2(1000 );

l_msg_count              NUMBER;

l_msg_data               VARCHAR2(1000 );

v_line_number            VARCHAR2(1000 );

l_index                  VARCHAR2(1000 );

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;

BEGIN

fnd_global.apps_initialize(user_id      => 1190,

resp_id      => 50786,

resp_appl_id => 20003);

mo_global.init( ‘ONT‘); --r12的安全机制,必须初始化否则报错

oe_msg_pub.initialize;

oe_debug_pub.initialize;

oe_debug_pub.debug_on;

oe_debug_pub.setdebuglevel( 5);

--mo_global.set_policy_context(‘S‘,
1497); --貌似也不需要

l_header_rec := oe_order_pub.g_miss_header_rec;

--不需要

l_header_rec.header_id := 101449; --501010000051

l_header_rec.operation := oe_globals.g_opr_update;

l_line_tbl(1)
:= oe_order_pub.g_miss_line_rec;

l_line_tbl(1).line_id
:= 112362;

l_line_tbl(1).operation
:= oe_globals.g_opr_update;

l_line_tbl(1).ship_tolerance_below
:= 0;

--dbms_output.put_line(‘l_line_tbl:‘
|| l_line_tbl(1).open_flag);

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,

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_tb2, --r11中这里跟p_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( ‘l_index:‘ ||
l_index || ‘l_msg_data1:‘ ||

l_msg_data);

IF l_msg_count
> 0 THEN

FOR l_index IN 1 ..
l_msg_count LOOP

l_msg_data := oe_msg_pub.get(p_msg_index => l_index, p_encoded => ‘F‘);

END LOOP ;

END IF;

dbms_output.put_line( ‘l_index:‘ ||
l_index || ‘l_msg_data:‘ ||

l_msg_data);

IF l_return_status
= fnd_api.g_ret_sts_success THEN

dbms_output.put_line( ‘OK‘);

--COMMIT;

ELSE

dbms_output.put_line( ‘Failed‘);

ROLLBACK;

END IF;

--COMMIT;

END;

时间: 2024-11-28 23:25:38

Oracle EBS更新销售订单行信息API的相关文章

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

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

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

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

销售订单行上行号LINE_SHIPMENT_OPTION_NUMBER

 销售订单行上行号:LINE_SHIPMENT_OPTION_NUMBER 取值: ( 1) Line块的块级触发器POST-QUERY调用: OE_LINE.Post_Query;(来自于库OEXOELIN) ( 2) 库OEXOELIN里Line_Shipment_Option_Number赋值代码: OE_CONCAT_VALUES.LINE_SHIPMENT_OPTION ( Name_in('Line.Line_Number' ), Name_In('Line.Shipment_N

Oracle EBS-SQL (PO-5):采购订单控制信息查询.sql

select distinct pla.po_header_id, --pha.type_lookup_code, pha.segment1       采购订单号, appf.full_name            采购员, pla.line_num               订单行, msi.segment1          物料编码, pla.item_description 物料说明, case when pha.Authorization_Status='APPROVED' th

Oracle EBS PO采购订单更新

DECLARE l_result NUMBER; l_progress NUMBER; l_errors PO_API_ERRORS_REC_TYPE; l_chg PO_CHANGES_REC_TYPE; l_shipment_changes PO_SHIPMENTS_REC_TYPE; l_return_status VARCHAR2(30); BEGIN fnd_global.apps_initialize(user_id => &user_id,-- This function ex

Oracle EBS 更新客户地点

--更新客户地点 declare x_return_status VARCHAR2(150); x_msg_count NUMBER; x_msg_data VARCHAR2(2000); x_profile_id NUMBER; l_location_id NUMBER; l_object_version_number NUMBER; l_party_rec hz_party_site_v2pub.party_site_rec_type; cursor cur_DT is SELECT loc

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