SET SERVEROUTPUT ON SIZE 100000
DECLARE
p_api_version_number NUMBER;
x_return_status VARCHAR2(15);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
p_action_code VARCHAR2(25);
p_delivery_id NUMBER;
p_delivery_name VARCHAR2(30);
p_asg_trip_id NUMBER;
p_asg_trip_name VARCHAR2(30);
p_asg_pickup_stop_id NUMBER;
p_asg_pickup_loc_id NUMBER;
p_asg_pickup_stop_seq NUMBER;
p_asg_pickup_loc_code VARCHAR2(50);
p_asg_pickup_arr_date DATE;
p_asg_pickup_dep_date DATE;
p_asg_dropoff_stop_id NUMBER;
p_asg_dropoff_loc_id NUMBER;
p_asg_dropoff_stop_seq NUMBER;
p_asg_dropoff_loc_code VARCHAR2(50);
p_asg_dropoff_arr_date DATE;
p_asg_dropoff_dep_date DATE;
p_sc_action_flag VARCHAR2(2);
p_sc_intransit_flag VARCHAR2(2);
p_sc_close_trip_flag VARCHAR2(2);
p_sc_create_bol_flag VARCHAR2(2);
p_sc_stage_del_flag VARCHAR2(2);
p_sc_trip_ship_method VARCHAR2(30);
p_sc_actual_dep_date DATE;
p_sc_report_set_id NUMBER;
p_sc_report_set_name VARCHAR2(100);
p_sc_defer_interface_flag VARCHAR2(2);
p_sc_send_945_flag VARCHAR2(2);
p_wv_override_flag VARCHAR2(2);
x_trip_id VARCHAR2(30);
x_trip_name VARCHAR2(30);
BEGIN
-- Assign only the columns which are to be updated
p_action_code := 'CONFIRM';
p_api_version_number := 1.0;
p_delivery_name := '152511';
p_delivery_id := '152511';
p_sc_action_flag := 'B';
p_sc_intransit_flag := 'Y';
p_sc_close_trip_flag := 'Y';
p_sc_create_bol_flag := 'N';
p_sc_stage_del_flag := 'Y';
--p_sc_trip_ship_method := 'DHL';
wsh_deliveries_pub.delivery_action
(
p_api_version_number => p_api_version_number,
p_init_msg_list => FND_API.G_TRUE,
x_return_status => x_return_status,
x_msg_count => 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_pickup_stop_seq => p_asg_pickup_stop_seq ,
p_asg_pickup_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_stop_seq => p_asg_dropoff_stop_seq ,
p_asg_dropoff_loc_code => p_asg_dropoff_loc_code ,
p_asg_dropoff_arr_date => p_asg_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_method => NULL ,
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_sc_defer_interface_flag => p_sc_defer_interface_flag,
p_sc_send_945_flag => p_sc_send_945_flag ,
p_wv_override_flag => p_wv_override_flag ,
x_trip_id => x_trip_id ,
x_trip_name => x_trip_name
);
IF (x_return_status = WSH_UTIL_CORE.G_RET_STS_SUCCESS) THEN
COMMIT;
dbms_output.put_line('Return Status = '|| SUBSTR (x_return_status,1,255));
dbms_output.put_line('Delivery Name = '|| p_delivery_name);
ELSE
dbms_output.put_line('Return Status = '|| SUBSTR (x_return_status,1,255));
dbms_output.put_line('Msg Count = '|| TO_CHAR(x_msg_count));
dbms_output.put_line('Delivery Id = '|| TO_CHAR(p_delivery_id));
dbms_output.put_line('Delivery Name = '|| p_delivery_name);
dbms_output.put_line('Msg Data = '|| SUBSTR (x_msg_data,1,255));
FOR I IN 1..10 LOOP
dbms_output.put_line(I||'. '|| SUBSTR (FND_MSG_PUB.Get(p_encoded => FND_API.G_FALSE ), 1, 255));
END LOOP;
END IF;
END;
/
commit;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/132092/viewspace-968156/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/132092/viewspace-968156/