CREATE OR REPLACE procedure cc_shippingasl_return_status VARCHAR2(2000);l_msg_count NUMBER;--l_msg_data VARCHAR2(1000);pp_init_msg_list VARCHAR2(10) := FND_api.G_FALSE;pp_return_values VARCHAR2(10) := FND_api.G_FALSE;pp_action_commit VARCHAR2(10) := FND_api.G_FALSE;xx_return_status VARCHAR2(1);xx_msg_count NUMBER;xx_msg_data VARCHAR2(2000);trip_id number;trip_name varchar2(2000);l_msg_index_out number;l_msg_data varchar2(2000);x_msg_summary varchar2(2000);x_msg_details varchar2(2000);fail_api EXCEPTION;BEGINdbms_output.enable(1000000);mo_global.init('ONT');MO_GLOBAL.SET_POLICY_CONTEXT('S', 120);--fnd_global.apps_initialize(1013475,21623,660); -- pass in user_id, responsibility_id, and application_id--FND_PROFILE.PUT('USER_ID','1013475') ;--FND_PROFILE.PUT( 'OE_ORGANIZATION_ID','204');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 datadbms_output.put_line('START OF NEW DEBUG');--This is to UPDATE order line--l_line_tbl_index :=1;fnd_global.apps_initialize(user_id => 1115,resp_id => 50676,resp_appl_id => 660,security_group_id => 0);/* Values for Ship Confirming the delivery.WSH_DELIVERIES_PUB.Delivery_Action(p_api_version_number => 0.1,p_init_msg_list => pp_init_msg_list,x_return_status => xx_return_status,x_msg_count => xx_msg_count,x_msg_data => xx_msg_data,p_action_code => 'CONFIRM',p_delivery_id => 2094,p_delivery_name => '2094',p_sc_action_flag => 'S',p_sc_close_trip_flag => 'Y',p_sc_trip_ship_method => 'GROUND',--p_sc_report_set_name => null,--p_wv_override_flag => p_wv_override_flag,x_trip_id => trip_id,x_trip_name => trip_name );*//*source_code := 'OE'; -- The only source code that should be used by the apichanged_attributes(1).delivery_detail_id := 12132; -- Ship All quantities in this detail.changed_attributes(1).shipped_quantity := 1;--changed_attributes(2).source_line_id := 2031; -- Back Order All in this detail.--changed_attributes(2).shipped_quantity := 0;--changed_attributes(2).cycle_count_quantity := 2;--changed_attributes(3).source_line_id := 13433; -- Stage All in this detail.--changed_attributes(3).shipped_quantity := 0;--changed_attributes(3).cycle_count_quantity := 0;WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes(:::::::::::::p_changed_attributes => changed_attributes,p_source_code => 'OE');commit;*/wsh_deliveries_pub.Delivery_Action( p_api_version_number => 1.0,p_init_msg_list => pp_init_msg_list,x_return_status => xx_return_status,x_msg_count => xx_msg_count,x_msg_data => xx_msg_data,p_action_code => 'CONFIRM',p_delivery_id => 2094,p_delivery_name => '2094',p_asg_trip_id => NULL,p_asg_trip_name => NULL,p_asg_pickup_stop_id => NULL,p_asg_pickup_loc_id => NULL,p_asg_pickup_stop_seq => NULL,p_asg_pickup_loc_code => NULL,p_asg_pickup_arr_date => NULL,p_asg_pickup_dep_date => NULL,p_asg_dropoff_stop_id => NULL,p_asg_dropoff_loc_id => NULL,p_asg_dropoff_stop_seq => NULL,p_asg_dropoff_loc_code => NULL,p_asg_dropoff_arr_date => NULL,p_asg_dropoff_dep_date => NULL,p_sc_action_flag => 'S',p_sc_intransit_flag => 'N',p_sc_close_trip_flag => 'Y',p_sc_create_bol_flag => 'N',p_sc_stage_del_flag => 'Y',p_sc_trip_ship_method => null,--'UPS', --'GROUND',p_sc_actual_dep_date => NULL,p_sc_report_set_id => NULL,p_sc_report_set_name => NULL,p_sc_defer_interface_flag => 'Y',p_sc_send_945_flag => NULL,p_sc_rule_id => NULL,p_sc_rule_name => NULL,p_wv_override_flag => 'N',x_trip_id => trip_id,x_trip_name => trip_name );DBMS_OUTPUT.PUT_LINE('xx_return_status= ' || xx_return_status);if (xx_return_status <> WSH_UTIL_CORE.G_RET_STS_SUCCESS) thenraise fail_api;end if;exceptionwhen fail_api thenWSH_UTIL_CORE.get_messages('Y', x_msg_summary, x_msg_details, xx_msg_count);if xx_msg_count >= 1 thenDBMS_OUTPUT.PUT_LINE('x_msg_summary= ' || x_msg_summary);DBMS_OUTPUT.PUT_LINE('x_msg_details= ' || x_msg_details);--x_msg_data := x_msg_summary || x_msg_details;--else--x_msg_data := x_msg_summary;end if;end;/*FOR i IN 1 .. xx_msg_countLOOPOe_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;dbms_output.put_line('trip_id='||trip_id);dbms_output.put_line('trip_name='||trip_name);dbms_output.put_line('xx_return_status='||xx_return_status);dbms_output.put_line('xx_msg_coun='||xx_msg_count);dbms_output.put_line('xx_msg_data='||xx_msg_data);COMMIT;end;
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow