1、订单OM/*1, Book order*/ Oe_Order_Pub.Process_Order ( 1 , Fnd_Api.G_FALSE , Fnd_Api.G_FALSE , Fnd_Api.G_FALSE , x_return_status , x_msg_count , x_msg_data IN PARAMETERS , 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 =
2、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_
3、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
4、_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 ); /*2, 创建发货行*/ WSH_DELIVER
5、Y_DETAILS_PUB.AUTOCREATE_DELIVERIES( p_api_version_number = 1.0, p_init_msg_list = APPS.FND_API.G_TRUE, p_commit = l_commit, x_return_status = x_return_status, x_msg_count = x_msg_count, x_msg_data = x_msg_data, p_line_rows = p_line_rows, x_del_rows = x_del_rows );/*3, 挑库发放*/ wsh_deliveries_pub.deli
6、very_action( p_api_version_number = 1.0 , p_init_msg_list = null, IN VARCHAR2, x_return_status = x_return_status, OUT VARCHAR2, x_msg_count = x_msg_count, OUT NUMBER, x_msg_data = x_msg_data, OUT VARCHAR2, p_action_code = PICK-RELEASE, IN VARCHAR2, p_delivery_id = p_delivery_id, IN NUMBER DEFAULT NU
7、LL, p_delivery_name = p_delivery_name, IN VARCHAR2 DEFAULT NULL, x_trip_id = x_trip_id, OUT VARCHAR2, x_trip_name = x_trip_name OUT VARCHAR2 );/*4, 发放确认*/ WSH_DELIVERIES_PUB.Delivery_Action( p_api_version_number = 1.0, p_init_msg_list = init_msg_list, x_return_status = x_return_status, x_msg_count =
8、 x_msg_count, x_msg_data = x_msg_data, p_action_code = p_action_code, p_delivery_id = p_delivery_id, p_delivery_name = p_delivery_name, p_asg_trip_id = p_asg_trip_id, p_asg_trip_name = p_asg_trip_name, p_asg_pickup_stop_id = p_asg_pickup_stop_id, p_asg_pickup_loc_id = p_asg_pickup_loc_id, p_asg_pick
9、up_loc_code = p_asg_pickup_loc_code, p_asg_pickup_arr_date = p_asg_pickup_arr_date, p_asg_pickup_dep_date = p_asg_pickup_dep_date, p_asg_dropoff_stop_id = p_asg_dropoff_stop_id, p_asg_dropoff_loc_id = p_asg_dropoff_loc_id, p_asg_dropoff_loc_code = p_asg_dropoff_loc_code, p_asg_dropoff_arr_date = p_a
10、sg_dropoff_arr_date, p_asg_dropoff_dep_date = p_asg_dropoff_dep_date, p_sc_action_flag = p_sc_action_flag, p_sc_intransit_flag = p_sc_intransit_flag, p_sc_close_trip_flag = p_sc_close_trip_flag, p_sc_create_bol_flag = p_sc_create_bol_flag, p_sc_stage_del_flag = p_sc_stage_del_flag, p_sc_trip_ship_me
11、thod = p_sc_trip_ship_method, p_sc_actual_dep_date = p_sc_actual_dep_date, p_sc_report_set_id = p_sc_report_set_id, p_sc_report_set_name = p_sc_report_set_name, p_wv_override_flag = p_wv_override_flag, x_trip_id = x_trip_id, x_trip_name = x_trip_name);/*5, 创建Install Base*/ csi_item_instance_pub.crea
12、te_item_instance( p_api_version = 1.0 IN NUMBER ,p_instance_rec = l_instance_rec IN OUT NOCOPY csi_datastructures_pub.instance_rec ,p_ext_attrib_values_tbl = l_ext_attrib_values_tbl IN OUT NOCOPY csi_datastructures_pub.extend_attrib_values_tbl ,p_party_tbl = l_party_tbl IN OUT NOCOPY csi_datastructu
13、res_pub.party_tbl ,p_account_tbl = l_account_tbl IN OUT NOCOPY csi_datastructures_pub.party_account_tbl ,p_pricing_attrib_tbl = l_pricing_attrib_tbl IN OUT NOCOPY csi_datastructures_pub.pricing_attribs_tbl ,p_org_assignments_tbl = l_org_assignments_tbl IN OUT NOCOPY csi_datastructures_pub.organizati
14、on_units_tbl ,p_asset_assignment_tbl = l_asset_assignment_tbl IN OUT NOCOPY csi_datastructures_pub.instance_asset_tbl ,p_txn_rec = l_txn_rec IN OUT NOCOPY csi_datastructures_pub.transaction_rec ,x_return_status = x_return_status OUT NOCOPY VARCHAR2 ,x_msg_count = x_msg_count OUT NOCOPY NUMBER ,x_msg
15、_data = x_msg_data); OUT NOCOPY VARCH /*6, 失效Install Base*/ csi_item_instance_pub.expire_item_instance( p_api_version = 1.0 IN NUMBER ,p_instance_rec = l_instance_rec IN csi_datastructures_pub.instance_rec ,p_txn_rec = l_txn_rec IN OUT NOCOPY csi_datastructures_pub.transaction_rec ,x_instance_id_lst
16、 = l_instance_id_lst OUT NOCOPY csi_datastructures_pub.id_tbl ,x_return_status = x_return_status OUT NOCOPY VARCHAR2 ,x_msg_count = x_msg_count OUT NOCOPY NUMBER ,x_msg_data = x_msg_data OUT NOCOPY VARCHAR2 ); create or replace package comms_om_new is- Author : Horis- Created : 11/11/2004 9:22:32 AM
17、- Purpose : Deal with order management processPROCEDURE main(itemtype in varchar2,itemkey in varchar2,actid in number,funcmode in varchar2,resultout in out varchar2);PROCEDURE book(x_return_status OUT VARCHAR2,x_msg_count OUT NUMBER,x_msg_data OUT VARCHAR2);PROCEDURE auto_full(errbuf OUT VARCHAR2,re
18、tcode OUT VARCHAR2,p_line_id IN NUMBER,p_user_id IN NUMBER);PROCEDURE pick_release(x_return_status OUT VARCHAR2,x_msg_count OUT NUMBER,x_msg_data OUT VARCHAR2);PROCEDURE ship_confirm(x_return_status OUT VARCHAR2,x_msg_count OUT NUMBER,x_msg_data OUT VARCHAR2,p_delivery_id IN NUMBER);PROCEDURE submit
19、_req;PROCEDURE create_install_base(p_line_id IN NUMBER,x_return_status OUT VARCHAR2,x_msg_count OUT VARCHAR2,x_msg_data OUT VARCHAR2);PROCEDURE create_install_base_rel(p_line_id IN NUMBER,x_return_status OUT VARCHAR2,x_msg_count OUT VARCHAR2,x_msg_data OUT VARCHAR2);PROCEDURE expire_install_base(x_r
20、eturn_status OUT VARCHAR2,x_msg_count OUT NUMBER,x_msg_data OUT VARCHAR2);PROCEDURE deal_install_base(x_return_status OUT VARCHAR2,x_msg_count OUT NUMBER,x_msg_data OUT VARCHAR2);end comms_om_new;/create or replace package body comms_om_newisg_header_id NUMBER;g_order_number NUMBER;g_line_id NUMBER;
21、g_line_ordered_quantity NUMBER;g_line_schedule_date DATE;g_user_id NUMBER := fnd_profile.value(USER_ID);g_delivery_id NUMBER;g_cur_party_id NUMBER;g_cur_party_account_id NUMBER;-for WF callingPROCEDURE main(itemtype in varchar2,itemkey in varchar2,actid in number,funcmode in varchar2,resultout in ou
22、t varchar2)ASl_return_status VARCHAR2(1000);l_msg_count NUMBER;l_msg_data VARCHAR2(1000);l_book_flag VARCHAR2(1);l_picked_flag VARCHAR2(1);l_line_type NUMBER;req_id NUMBER;l_link_to_line_id NUMBER;BEGINg_line_id := to_number(itemkey);g_user_id := wf_engine.GetItemAttrNumber(itemtype,itemkey, USER_ID
23、);g_user_id := 1050;IF (funcmode = RUN) THENSELECT ooha.header_id,ooha.order_number,oola.line_type_id,oola.link_to_line_idINTO g_header_id,g_order_number,l_line_type,l_link_to_line_idFROM oe_order_headers_all ooha,oe_order_lines_all oolaWHERE ooha.header_id = oola.header_idAND oola.line_id = g_line_
24、idAND ROWNUM = 1;-1033 STRORDER, 1034 ChangePlan, 1036 Suspension-for child item no need to dealIF l_line_type IN (1033, 1034, 1036) ANDl_link_to_line_id IS NULLTHENreq_id := fnd_request.submit_request(ONT, -applicationTBFAFL, -programNULL, -descriptionNULL, -start_timeFALSE, -sub_requestg_line_id,g
25、_user_id,chr(0),);END IF; -for transation_typeresultout := COMPELTE:COMPLETE;RETURN;END IF;IF (funcmode = CANCEL) THENresultout := COMPELTE;RETURN;END IF;resultout := COMPLETE:COMPLETE;OE_STANDARD_WF.Clear_Msg_Context;return;EXCEPTIONWHEN OTHERS THENWF_CORE.CONTEXT(comms_om_new, main, itemtype, item
26、key, to_char(actid), funcmode );RAISE;END;PROCEDURE book(x_return_status OUT VARCHAR2,x_msg_count OUT NUMBER,x_msg_data OUT VARCHAR2)ASCURSOR cur_line ISSELECT line_id,ordered_quantity,schedule_ship_dateFROM oe_order_lines_allWHERE line_id = g_line_id;i NUMBER:=0;X_DEBUG_FILE VARCHAR2(100);-IN Param
27、etersl_header_rec OE_ORDER_PUB.Header_Rec_Type;l_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type;l_line_tbl OE_ORDER_PUB.Line_Tbl_Type;-OUT Parametersx_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_Heade
28、r_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_
29、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_
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1