Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

DECLARE

l_return_status VARCHAR2(400);
l_msg_count VARCHAR2(400);
l_msg_data VARCHAR2(400);
l_req_quantity NUMBER := 1000;
v_novo_delivery_id NUMBER ;
l_manual_split VARCHAR2(400) := NULL;
l_req_quantity2 NUMBER := NULL;
l_converted_flag VARCHAR2(400);
v_unassign_flag VARCHAR2(2) := 'N';

x_return_status VARCHAR2 (32767);

x_msg_count NUMBER;

x_msg_data VARCHAR2 (32767);

p_api_version_number NUMBER := 1.0;

init_msg_list VARCHAR2 (32767);

x_msg_details VARCHAR2 (32767);

x_msg_summary VARCHAR2 (32767);

p_line_rows wsh_util_core.id_tab_type;

x_del_rows wsh_util_core.id_tab_type;

l_ship_method_code VARCHAR2 (32767);

i NUMBER;

l_commit VARCHAR2 (32767);

lp_delivery_id NUMBER :=29044;

p_delivery_name VARCHAR2 (32767);

x_trip_id VARCHAR2 (32767);

x_trip_name VARCHAR2 (32767);

exep_api EXCEPTION;

l_picked_flag VARCHAR2 (32767);

-- l_return_status VARCHAR2 (32767);

l_msg_count NUMBER;

l_msg_data VARCHAR2 (32767);

l_user_id NUMBER;

l_resp_id NUMBER;

l_appl_id NUMBER;
fail_api EXCEPTION;
BEGIN

SELECT user_id
INTO l_user_id
FROM fnd_user
WHERE user_name = 'AELHMAMSY';

SELECT responsibility_id , application_id --,responsibility_name


INTO l_resp_id, l_appl_id
FROM fnd_responsibility_vl
WHERE responsibility_name LIKE
'EPC Order Management Super User';

fnd_global.apps_initialize (l_user_id, l_resp_id, l_appl_id);


mo_global.set_policy_context ('S', 102);

mo_global.init ('ONT');

WSH_DELIVERY_DETAILS_ACTIONS.split_delivery_details
( p_from_detail_id => lp_delivery_id, -- delivery_detail_id atual
p_req_quantity => l_req_quantity, -- nova qtde declarada na variavel
x_new_detail_id => v_novo_delivery_id,
x_return_status => l_return_status,
p_unassign_flag => v_unassign_flag,
p_req_quantity2 => l_req_quantity2,
p_manual_split => l_manual_split);

COMMIT;

END;

You might also like