Home » Applications » Oracle Fusion Apps & E-Business Suite » Split Sales Order Line (Oracle EBS R12)
Split Sales Order Line [message #448073] Fri, 19 March 2010 06:44
minhaj_asghar
Messages: 1
Registered: March 2010
Junior Member
Dear

please i run the following API code for split the line in sales order and it doesn't give me any error but the spliting on the application doesn't exists . i don't know why

the code

Code: [Select all] [Show/ hide]

CREATE OR REPLACE PROCEDURE APPS.cite_split_line_api

IS
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_request_rec OE_order_PUB.Request_Rec_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_header_rec OE_order_PUB.Header_Rec_Type := OE_order_PUB.G_MISS_HEADER_REC;
p_old_header_rec OE_order_PUB.Header_Rec_Type := OE_order_PUB.G_MISS_HEADER_REC;
p_header_val_rec OE_order_PUB.Header_Val_Rec_Type := OE_order_PUB.G_MISS_HEADER_VAL_REC;
p_old_header_val_rec OE_order_PUB.Header_Val_Rec_Type := OE_order_PUB.G_MISS_HEADER_VAL_REC;
p_Header_Adj_tbl OE_order_PUB.Header_Adj_Tbl_Type := OE_order_PUB.G_MISS_HEADER_ADJ_TBL;
p_old_Header_Adj_tbl OE_order_PUB.Header_Adj_Tbl_Type := OE_order_PUB.G_MISS_HEADER_ADJ_TBL;
p_Header_Adj_val_tbl OE_order_PUB.Header_Adj_Val_Tbl_Type := OE_order_PUB.G_MISS_HEADER_ADJ_VAL_TBL;
p_old_Header_Adj_val_tbl OE_order_PUB.Header_Adj_Val_Tbl_Type := OE_order_PUB.G_MISS_HEADER_ADJ_VAL_TBL;
p_Header_price_Att_tbl OE_order_PUB.Header_Price_Att_Tbl_Type := OE_order_PUB.G_MISS_HEADER_PRICE_ATT_TBL;
p_old_Header_Price_Att_tbl OE_order_PUB.Header_Price_Att_Tbl_Type := OE_order_PUB.G_MISS_HEADER_PRICE_ATT_TBL;
p_Header_Adj_Att_tbl OE_order_PUB.Header_Adj_Att_Tbl_Type := OE_order_PUB.G_MISS_HEADER_ADJ_ATT_TBL;
p_old_Header_Adj_Att_tbl OE_order_PUB.Header_Adj_Att_Tbl_Type := OE_order_PUB.G_MISS_HEADER_ADJ_ATT_TBL;
p_Header_Adj_Assoc_tbl OE_order_PUB.Header_Adj_Assoc_Tbl_Type := OE_order_PUB.G_MISS_HEADER_ADJ_ASSOC_TBL;
p_old_Header_Adj_Assoc_tbl OE_order_PUB.Header_Adj_Assoc_Tbl_Type := OE_order_PUB.G_MISS_HEADER_ADJ_ASSOC_TBL;
p_Header_Scredit_tbl OE_order_PUB.Header_Scredit_Tbl_Type := OE_order_PUB.G_MISS_HEADER_SCREDIT_TBL;
p_old_Header_Scredit_tbl OE_order_PUB.Header_Scredit_Tbl_Type := OE_order_PUB.G_MISS_HEADER_SCREDIT_TBL;
p_Header_Scredit_val_tbl OE_order_PUB.Header_Scredit_Val_Tbl_Type := OE_order_PUB.G_MISS_HEADER_SCREDIT_VAL_TBL;
p_old_Header_Scredit_val_tbl OE_order_PUB.Header_Scredit_Val_Tbl_Type := OE_order_PUB.G_MISS_HEADER_SCREDIT_VAL_TBL;
p_line_tbl OE_order_PUB.line_Tbl_Type := OE_order_PUB.G_MISS_line_TBL;
p_old_line_tbl OE_order_PUB.line_Tbl_Type := OE_order_PUB.G_MISS_line_TBL;
p_line_val_tbl OE_order_PUB.line_Val_Tbl_Type := OE_order_PUB.G_MISS_line_VAL_TBL;
p_old_line_val_tbl OE_order_PUB.line_Val_Tbl_Type := OE_order_PUB.G_MISS_line_VAL_TBL;
p_line_Adj_tbl OE_order_PUB.line_Adj_Tbl_Type := OE_order_PUB.G_MISS_line_ADJ_TBL;
p_old_line_Adj_tbl OE_order_PUB.line_Adj_Tbl_Type := OE_order_PUB.G_MISS_line_ADJ_TBL;
p_line_Adj_val_tbl OE_order_PUB.line_Adj_Val_Tbl_Type := OE_order_PUB.G_MISS_line_ADJ_VAL_TBL;
p_old_line_Adj_val_tbl OE_order_PUB.line_Adj_Val_Tbl_Type := OE_order_PUB.G_MISS_line_ADJ_VAL_TBL;
p_line_price_Att_tbl OE_order_PUB.line_Price_Att_Tbl_Type := OE_order_PUB.G_MISS_line_PRICE_ATT_TBL;
p_old_line_Price_Att_tbl OE_order_PUB.line_Price_Att_Tbl_Type := OE_order_PUB.G_MISS_line_PRICE_ATT_TBL;
p_line_Adj_Att_tbl OE_order_PUB.line_Adj_Att_Tbl_Type := OE_order_PUB.G_MISS_line_ADJ_ATT_TBL;
p_old_line_Adj_Att_tbl OE_order_PUB.line_Adj_Att_Tbl_Type := OE_order_PUB.G_MISS_line_ADJ_ATT_TBL;
p_line_Adj_Assoc_tbl OE_order_PUB.line_Adj_Assoc_Tbl_Type := OE_order_PUB.G_MISS_line_ADJ_ASSOC_TBL;
p_old_line_Adj_Assoc_tbl OE_order_PUB.line_Adj_Assoc_Tbl_Type := OE_order_PUB.G_MISS_line_ADJ_ASSOC_TBL;
p_line_Scredit_tbl OE_order_PUB.line_Scredit_Tbl_Type := OE_order_PUB.G_MISS_line_SCREDIT_TBL;
p_old_line_Scredit_tbl OE_order_PUB.line_Scredit_Tbl_Type := OE_ORDER_PUB.G_MISS_line_SCREDIT_TBL;
p_line_Scredit_val_tbl OE_order_PUB.line_Scredit_Val_Tbl_Type := OE_order_PUB.G_MISS_line_SCREDIT_VAL_TBL;
p_old_line_Scredit_val_tbl OE_order_PUB.line_Scredit_Val_Tbl_Type := OE_order_PUB.G_MISS_line_SCREDIT_VAL_TBL;
p_Lot_Serial_tbl OE_order_PUB.Lot_Serial_Tbl_Type := OE_order_PUB.G_MISS_LOT_SERIAL_TBL;
p_old_Lot_Serial_tbl OE_order_PUB.Lot_Serial_Tbl_Type := OE_order_PUB.G_MISS_LOT_SERIAL_TBL;
p_Lot_Serial_val_tbl OE_order_PUB.Lot_Serial_Val_Tbl_Type := OE_order_PUB.G_MISS_LOT_SERIAL_VAL_TBL;
p_old_Lot_Serial_val_tbl OE_order_PUB.Lot_Serial_Val_Tbl_Type := OE_order_PUB.G_MISS_LOT_SERIAL_VAL_TBL;
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;
operating_unit varchar(100) :='Wadi Glass Operating Unit';
org_id number:=204;
X_DEBUG_FILE VARCHAR2(100);
l_line_tbl_index NUMBER;
l_msg_index_out NUMBER(10);
BEGin
dbms_output.enable(1000000);
mo_global.init('ONT');
MO_GLOBAL.SET_POLICY_CONTEXT('S', 204);

fnd_global.apps_initialize(1013435,21623,660); -- pass in user_id, responsibility_id, and application_id
-- mo_global.init ('ONT');
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 UPDATE order line
l_line_tbl_index :=1;
-- Changed attributes
l_header_rec := OE_order_PUB.G_MISS_HEADER_REC;
l_header_rec.header_id := 191039; -- header_id of the order
l_header_rec.operation := OE_GLOBALS.G_OPR_UPDATE;
l_line_tbl(l_line_tbl_index) := OE_order_PUB.G_MISS_line_REC;
l_line_tbl(l_line_tbl_index).operation := OE_GLOBALS.G_OPR_UPDATE;
l_line_tbl(l_line_tbl_index).split_by := 1013435; -- user_id
l_line_tbl(l_line_tbl_index).split_action_code := 'split';
l_line_tbl(l_line_tbl_index).header_id := 191039; -- header_id of the order
l_line_tbl(l_line_tbl_index).line_id := 388948; -- line_id of the order line

l_line_tbl(l_line_tbl_index).ordered_quantity := 10; -- new ordered quantity
l_line_tbl(l_line_tbl_index).change_reason := 'MISC'; -- change reason code
l_line_tbl_index :=2;
l_line_tbl(l_line_tbl_index ) := OE_order_PUB.G_MISS_line_REC;
l_line_tbl(l_line_tbl_index ).operation := OE_GLOBALS.G_OPR_CREATE;
l_line_tbl(l_line_tbl_index ).split_by := 1013535; -- user_id
l_line_tbl(l_line_tbl_index ).split_action_code := 'split';

l_line_tbl(l_line_tbl_index ).split_from_line_id := 388948; -- line_id of original line
l_line_tbl(l_line_tbl_index ).inventory_item_id := 249; -- inventory item id
l_line_tbl(l_line_tbl_index ).ordered_quantity := 90; -- ordered quantity

DBMS_OUTPUT.PUT_line(' 1 ');
-- CALL TO PROCESS order
OE_order_PUB.process_order (
p_org_id => org_id
-- ,p_operating_unit => operating_unit
,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(' 2 ');
dbms_output.put_line('OM Debug file: ' ||oe_debug_pub.G_DIR||'/'||oe_debug_pub.G_FILE);
commit;
-- Retrieve messages
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);
END LOOP;
-- Check the return status
IF l_return_status = FND_API.G_RET_STS_SUCCESS
theN
dbms_output.put_line('line Quantity Update Sucessful');
ELSE
dbms_output.put_line('line Quantity update Failed');
END IF;
END;

-- order number = 136
/



the output message

Quote:


START OF NEW DEBUG
1
2
OM Debug file: /dbfiles/applcsf/log/l0030615.dbg
line Quantity Update Sucessful





Please I want help

minhaj
Previous Topic: Need Installation help
Next Topic: Receipt error
Goto Forum:
  


Current Time: Thu Sep 29 17:35:22 CDT 2016

Total time taken to generate the page: 0.08709 seconds