DECLARE
vOperation VARCHAR2(30) := 'Assign to the new delivery';
xReturnStatus VARCHAR2(1);
xMsgData VARCHAR2(2000);
xMsgCount VARCHAR2(2000);
--Standard Parameters
vApiVersionNumber NUMBER;
vInitMsgList VARCHAR2(30);
vMsgDetails VARCHAR2(2000);
vMsgSummary VARCHAR2(2000);
vVaildationLevel NUMBER;
vCommit VARCHAR2(30);
--Parameters for WSH_DELIVERY_DETAILS_PUB.DETAIL_TO_DELVIERY
vDeliveryId NUMBER;
vDeliveryName VARCHAR2(30);
vTabOfDelDets WSH_DELIVERY_DETAILS_PUB.id_tab_type;
vAction VARCHAR2(30);
BEGIN
xReturnStatus := wsh_util_core.g_ret_sts_success;
fnd_global.apps_initialize(user_id => 00, resp_id => 00,resp_appl_id => 660);
vDeliveryId := 00;
vTabOfDelDets(1) := 1;
vTabOfDelDets(2) := 2;
vTabOfDelDets(3) := 3;
vAction := 'ASSIGN';
wsh_delivery_details_pub.detail_to_delivery(p_api_version => 1.0,
p_init_msg_list => vInitMsgList,
p_commit => vCommit,
x_return_status => xReturnStatus,
x_msg_count => xMsgCount,
x_msg_data => xMsgData,
p_tabofdeldets => vTabOfDelDets,
p_action => vAction,
p_delivery_id => vDeliveryId,
p_delivery_name => vDeliveryName);
IF xReturnStatus = wsh_util_core.g_ret_sts_success THEN
dbms_output.put_line(vOperation || ' done successfully.');
COMMIT;
ELSE
dbms_output.put_line('Failure.');
dbms_output.put_line('Return Status = ' || xReturnStatus);
wsh_util_core.get_messages('Y', xMsgData, vMsgDetails, xMsgCount);
dbms_output.put_line(vOperation || ': ');
dbms_output.put_line('Summary: ' || substrb(xMsgData, 1, 200));
dbms_output.put_line('Detail: ' || substrb(vMsgDetails, 1, 200));
ROLLBACK;
END IF;
END;
沒有留言:
張貼留言