/* Formatted on 2012/12/12 14:52 (Formatter Plus v4.8.8) */
DECLARE
l_api_version_number NUMBER := 1.0;
x_finplan_version_id NUMBER;
l_commit VARCHAR2 (1) := 'F';
l_return_status VARCHAR2 (1);
l_init_msg_list VARCHAR2 (1) := 'F';
l_msg_data VARCHAR2 (2000);
l_msg_count NUMBER;
l_msg_index_out NUMBER;
l_data VARCHAR2 (2000);
l_loop_cnt NUMBER;
l_dummy_cnt NUMBER;
BEGIN
FOR c1_rec IN (SELECT pbv.project_id, pbv.budget_status_code, pbv.budget_type_code,
pbv.fin_plan_type_id, pbv.version_type, pbv.pm_product_code,
pbv.version_number, ppa.org_id
FROM pa_budget_versions pbv, pa_projects_all ppa
WHERE pbv.project_id = 2689 AND budget_status_code = 'B'
AND pbv.project_id = ppa.project_id)
LOOP
mo_global.set_policy_context ('S', c1_rec.org_id);
--l_responsibility_id := fnd_global.resp_id;
/*
fnd_global.apps_initialize (user_id => p_user_id,
resp_id => fnd_global.resp_id,
resp_appl_id => fnd_global.resp_appl_id
);
*/
pa_interface_utils_pub.set_global_info
(p_api_version_number => l_api_version_number,
p_responsibility_id => 22593,
p_user_id => 0,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status
);
pa_budget_pub.delete_baseline_budget
(p_api_version_number => l_api_version_number,
p_commit => l_commit,
p_init_msg_list => l_init_msg_list,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_pm_product_code => c1_rec.pm_product_code,
p_pa_project_id => c1_rec.project_id,
p_pm_project_reference => NULL,
p_budget_type_code => c1_rec.budget_type_code,
p_fin_plan_type_id => c1_rec.fin_plan_type_id,
p_fin_plan_type_name => 'XX Cost and Revenue Budget',
p_version_type => c1_rec.version_type,
p_version_number => c1_rec.version_number
);
IF l_msg_count > 0
THEN
l_loop_cnt := 1;
LOOP
fnd_msg_pub.get (p_msg_index => l_loop_cnt,
p_data => l_msg_data,
p_encoded => fnd_api.g_false,
p_msg_index_out => l_dummy_cnt
);
IF l_return_status = 'E' OR l_return_status = 'U'
THEN
l_msg_data :=
CONCAT
( 'ERROR pa_budget_pub.delete_baseline_budget>>> '
|| '>',
l_msg_data
);
DBMS_OUTPUT.put_line (l_msg_data);
--fnd_file.put_line(fnd_file.OUTPUT,x_msg_data1);
ELSE
DBMS_OUTPUT.put_line ( '*** BASE LINE BUDGET DELETE ***:'
|| l_msg_data
);
END IF;
DBMS_OUTPUT.put_line ('RETURN STATUS :' || l_return_status);
l_loop_cnt := l_loop_cnt + 1;
EXIT WHEN l_loop_cnt > l_msg_count;
END LOOP;
END IF;
END LOOP;
END;
Hi, Can we pass multiple task id to Pa_Budget_Pub.add_budget_line
ReplyDelete