我将代码改成如下,运行时报错:程序包 OE_Line_Security 过程 Attributes 中出现错误 ORA-01403: 未找到数据
代码:
CREATE OR REPLACE PROCEDURE update_line_quantity(p_header_idIN NUMBER,
p_line_id IN NUMBER,
--p_org_id IN NUMBER,
--p_ssd IN Date,
p_qty IN number
)
Is
l_header_rec oe_order_pub.header_rec_type;
l_line_tbl oe_order_pub.line_tbl_type;
l_line_adj_tbl oe_order_pub.line_adj_tbl_type;
l_Header_Scredit_tbl oe_order_pub.Header_Scredit_Tbl_Type;
--OUT var
x_header_rec oe_order_pub.header_rec_type;
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_tbl oe_order_pub.line_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;
--RETURN msg var.
x_return_status VARCHAR2(20) := NULL;
x_msg_count NUMBER := NULL;
x_msg_data VARCHAR2(255) := NULL;
line_i BINARY_INTEGER := 1;
i BINARY_INTEGER := 1;
BEGIN
FND_GLOBAL.APPS_INITIALIZE(13615,75058,300);
-- SETTING UP THE HEADER RECORD
-- Initialize record to missing
-- FIRST LINE RECORD
-- Initialize record to missing
l_line_tbl(1) := OE_ORDER_PUB.G_MISS_LINE_REC;
-- Line attributes
l_line_tbl(1).header_id := p_header_id;
l_line_tbl(1).line_id := p_line_id;
l_line_tbl(1).ordered_quantity := p_qty;
l_line_tbl(1).change_reason := 'NOT PROVIDED';
l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
--l_line_tbl(1).operation := 'CREATE';
/*-- SECOND LINE RECORD
-- Initialize record to missing
l_line_tbl(2) := OE_ORDER_PUB.G_MISS_LINE_REC;
-- Line attributes
l_line_tbl(2).header_id := 2293504;
l_line_tbl(2).line_id := 32915559;
l_line_tbl(2).ordered_quantity := 22;
l_line_tbl(2).operation := OE_GLOBALS.G_OPR_UPDATE;*/
-- CALL TO PROCESS ORDER
oe_order_pub.process_order(p_api_version_number => 1,
p_init_msg_list => NULL,
p_return_values => NULL,
-- Passing just the entity records that are a part of this order
-- p_header_rec => l_header_rec,
p_line_tbl => l_line_tbl,
-- p_line_adj_tbl => l_line_adj_tbl,
-- p_Header_Scredit_tbl => l_Header_Scredit_tbl,
-- OUT variables
x_header_rec => x_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 => x_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 => x_action_request_tbl,
--RETURN MSG
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
-- Retrieve messages
if x_msg_count > 0 THEN
--oe_msg_pub.Initialize;
for l_index in 1..x_msg_count loop
x_msg_data := oe_msg_pub.get(p_msg_index => l_index, p_encoded => 'F');
DBMS_OUTPUT.put_line(x_msg_data);
end loop;
oe_msg_pub.Initialize;
end if;
-- Check the return status
if x_return_status = FND_API.G_RET_STS_SUCCESS then
--success;
COMMIT;
DBMS_OUTPUT.put_line('success');
else
--failure;
ROLLBACK;
DBMS_OUTPUT.put_line('failure');
end if;
End;
|