SET DEFINE OFF;
CREATE OR REPLACE PACKAGE BODY apps.xxal_pa_project_creation
AS
PROCEDURE create_project (
p_api_version_number IN NUMBER
:= pa_interface_utils_pub.g_pa_miss_num,
p_commit IN VARCHAR2 := fnd_api.g_false,
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_msg_count OUT NOCOPY NUMBER,
p_msg_data OUT NOCOPY VARCHAR2,
p_return_status OUT NOCOPY VARCHAR2,
p_workflow_started OUT NOCOPY VARCHAR2,
p_pm_product_code IN VARCHAR2
:= pa_interface_utils_pub.g_pa_miss_char,
p_op_validate_flag IN VARCHAR2 := 'Y',
p_project_in IN pa_project_pub.project_in_rec_type,
p_project_out OUT NOCOPY pa_project_pub.project_out_rec_type,
p_customers_in IN pa_project_pub.customer_tbl_type,
p_key_members IN pa_project_pub.project_role_tbl_type,
p_class_categories IN pa_project_pub.class_category_tbl_type,
p_tasks_in IN pa_project_pub.task_in_tbl_type,
p_tasks_out OUT NOCOPY pa_project_pub.task_out_tbl_type,
p_org_roles IN pa_project_pub.project_role_tbl_type,
p_structure_in IN pa_project_pub.structure_in_rec_type,
p_ext_attr_tbl_in IN pa_project_pub.pa_ext_attr_table_type,
p_deliverables_in IN pa_project_pub.deliverable_in_tbl_type,
p_deliverable_actions_in IN pa_project_pub.action_in_tbl_type
)
IS
l_project_type VARCHAR2 (50);
l_std_bill_rate_schedule VARCHAR2 (100);
CURSOR l_template_task (l_orig_project_id NUMBER)
IS
SELECT b.task_number parent_task_ref, a.*
FROM pa_tasks a, pa_tasks b
WHERE a.project_id = l_orig_project_id AND a.parent_task_id = b.task_id(+)
ORDER BY a.task_id;
l_count NUMBER;
i NUMBER;
l_tasks_in pa_project_pub.task_in_tbl_type;
l_customers_in pa_project_pub.customer_tbl_type;
l_customer_id NUMBER;
k NUMBER;
null_val VARCHAR2 (10);
p_validate_only VARCHAR2 (200);
p_validation_level NUMBER;
p_calling_module VARCHAR2 (200);
p_debug_mode VARCHAR2 (200);
p_max_msg_count NUMBER;
p_project_id NUMBER;
p_customer_id NUMBER;
p_customer_name VARCHAR2 (200);
p_customer_number VARCHAR2 (200);
p_project_relationship_code VARCHAR2 (200);
p_customer_bill_split NUMBER;
p_bill_to_customer_id NUMBER;
p_ship_to_customer_id NUMBER;
p_bill_to_customer_name VARCHAR2 (200);
p_bill_to_customer_number VARCHAR2 (200);
p_ship_to_customer_name VARCHAR2 (200);
p_ship_to_customer_number VARCHAR2 (200);
p_bill_to_address_id NUMBER;
p_ship_to_address_id NUMBER;
p_bill_site_name VARCHAR2 (200);
p_work_site_name VARCHAR2 (200);
p_inv_currency_code VARCHAR2 (200);
p_inv_rate_type VARCHAR2 (200);
p_inv_rate_date DATE;
p_inv_exchange_rate NUMBER;
p_allow_user_rate_type_flag VARCHAR2 (200);
p_receiver_task_id NUMBER;
x_customer_id NUMBER;
x_return_status VARCHAR2 (200);
x_msg_count NUMBER;
x_msg_data VARCHAR2 (200);
p_project_party_id NUMBER;
p_default_top_task_cust_flag VARCHAR2 (200);
p_en_top_task_cust_flag VARCHAR2 (200);
l_customer_bill_split NUMBER;
BEGIN
p_return_status := 'S';
l_customers_in := p_customers_in;
l_tasks_in := p_tasks_in;
l_count := l_tasks_in.COUNT;
i := l_count + 1;
BEGIN
SELECT ppa.project_type
INTO l_project_type
FROM pa_projects_all ppa, pa_project_types_all ppt
WHERE ppa.project_type = ppt.project_type
AND ppt.project_type_class_code = 'CONTRACT'
AND ppa.project_id = p_project_in.created_from_project_id;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
WHEN OTHERS
THEN
p_return_status := 'E';
raise_application_error (-20101,
'Obtaining Project type error: '
|| SQLERRM
);
END;
DBMS_OUTPUT.put_line ( 'Customer count in pkg '
|| p_customers_in.COUNT
|| p_project_in.created_from_project_id
);
IF l_project_type IS NOT NULL
THEN
BEGIN
SELECT std_bill_rate_schedule
INTO l_std_bill_rate_schedule
FROM pa_std_bill_rate_schedules_all
WHERE bill_rate_sch_id = p_project_in.non_lab_std_bill_rt_sch_id;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
-- raise_application_error (-20101,
-- 'Non Labour Schedule is Invalid: '
-- || SQLERRM
-- );
END;
END IF;
FOR cur_cur_task IN
l_template_task (p_project_in.created_from_project_id)
LOOP
DBMS_OUTPUT.put_line ('inside');
l_tasks_in (i).pm_task_reference := cur_cur_task.task_number;
l_tasks_in (i).task_name := cur_cur_task.task_name;
l_tasks_in (i).long_task_name := cur_cur_task.long_task_name;
l_tasks_in (i).pa_task_number := cur_cur_task.task_number;
l_tasks_in (i).task_description := cur_cur_task.description;
l_tasks_in (i).task_start_date := p_project_in.start_date;
l_tasks_in (i).task_completion_date := p_project_in.completion_date;
l_tasks_in (i).pm_parent_task_reference :=
cur_cur_task.parent_task_ref;
l_tasks_in (i).address_id := cur_cur_task.address_id;
l_tasks_in (i).carrying_out_organization_id :=
p_project_in.carrying_out_organization_id;
l_tasks_in (i).service_type_code := cur_cur_task.service_type_code;
l_tasks_in (i).task_manager_person_id :=
cur_cur_task.task_manager_person_id;
l_tasks_in (i).billable_flag := cur_cur_task.billable_flag;
l_tasks_in (i).chargeable_flag := cur_cur_task.chargeable_flag;
l_tasks_in (i).attribute_category := cur_cur_task.attribute_category;
l_tasks_in (i).attribute1 := cur_cur_task.attribute1;
l_tasks_in (i).attribute2 := cur_cur_task.attribute2;
l_tasks_in (i).attribute3 := cur_cur_task.attribute3;
l_tasks_in (i).attribute4 := cur_cur_task.attribute4;
l_tasks_in (i).attribute5 := cur_cur_task.attribute5;
l_tasks_in (i).attribute6 := cur_cur_task.attribute6;
l_tasks_in (i).attribute7 := cur_cur_task.attribute7;
l_tasks_in (i).attribute8 := cur_cur_task.attribute8;
l_tasks_in (i).attribute9 := cur_cur_task.attribute9;
l_tasks_in (i).attribute10 := cur_cur_task.attribute10;
l_tasks_in (i).receive_project_invoice_flag :=
cur_cur_task.receive_project_invoice_flag;
l_tasks_in (i).work_type_id := cur_cur_task.work_type_id;
l_tasks_in (i).retirement_cost_flag :=
cur_cur_task.retirement_cost_flag;
-- l_tasks_in (i).non_labor_sch_type := p_project_in.non_labor_sch_type;
-- l_tasks_in (i).non_labor_std_bill_rate_schdl :=
-- l_std_bill_rate_schedule;
-- l_tasks_in (i).non_labor_bill_rate_org_id :=
-- p_project_in.non_labor_bill_rate_org_id;
-- l_tasks_in (i).non_lab_std_bill_rt_sch_id :=
-- p_project_in.non_lab_std_bill_rt_sch_id;
DBMS_OUTPUT.put_line ( 'l_tasks_in (i).pa_task_number '
|| l_tasks_in (i).pa_task_number
|| ':'
|| l_tasks_in (i).pa_parent_task_id
);
i := i + 1;
END LOOP;
BEGIN
--mo_global.init ('PA');
DBMS_OUTPUT.put_line ('INSIDE ');
PA_PROJECT_PUB.create_project (p_api_version_number,
p_commit,
p_init_msg_list,
p_msg_count,
p_msg_data,
p_return_status,
p_workflow_started,
p_pm_product_code,
p_op_validate_flag,
p_project_in,
p_project_out,
p_customers_in,
p_key_members,
p_class_categories,
l_tasks_in,
p_tasks_out,
p_org_roles,
p_structure_in,
p_ext_attr_tbl_in,
p_deliverables_in,
p_deliverable_actions_in
);
DBMS_OUTPUT.put_line (' p_return_status' || p_return_status);
EXCEPTION
WHEN OTHERS
THEN
p_return_status := 'E';
raise_application_error (-20101,
'Error CREATE_PROJECT: ' || SQLERRM
);
END;
/*IF p_return_status = 'S'
THEN
DBMS_OUTPUT.put_line ( 'p_project_out.pa_project_id '
|| p_project_out.pa_project_id
);
IF l_project_type IS NOT NULL
THEN
BEGIN
UPDATE pa_projects_all
SET non_labor_sch_type = p_project_in.non_labor_sch_type,
non_labor_bill_rate_org_id =
p_project_in.non_labor_bill_rate_org_id,
non_labor_std_bill_rate_schdl = l_std_bill_rate_schedule,
non_lab_std_bill_rt_sch_id =
p_project_in.non_lab_std_bill_rt_sch_id
WHERE project_id = p_project_out.pa_project_id;
EXCEPTION
WHEN OTHERS
THEN
raise_application_error (-20101,
'Project update Error: ' || SQLERRM
);
END;
END IF;
END IF;*/
IF p_return_status = 'S'
THEN
p_validate_only := 'FND_API.G_TRUE';
p_validation_level := fnd_api.g_valid_level_full;
p_calling_module := 'SELF_SERVICE';
p_debug_mode := 'N';
p_max_msg_count := fnd_api.g_miss_num;
p_customer_name := 'FND_API.G_MISS_CHAR';
p_customer_number := 'FND_API.G_MISS_CHAR';
p_bill_to_customer_name := 'FND_API.G_MISS_CHAR';
p_bill_to_customer_number := 'FND_API.G_MISS_CHAR';
p_ship_to_customer_name := 'FND_API.G_MISS_CHAR';
p_ship_to_customer_number := 'FND_API.G_MISS_CHAR';
p_bill_site_name := 'FND_API.G_MISS_CHAR';
p_work_site_name := 'FND_API.G_MISS_CHAR';
p_inv_rate_type := 'FND_API.G_MISS_CHAR';
p_inv_rate_date := fnd_api.g_miss_date;
p_inv_exchange_rate := fnd_api.g_miss_num;
p_receiver_task_id := fnd_api.g_miss_num;
x_customer_id := NULL;
x_return_status := NULL;
x_msg_count := NULL;
x_msg_data := NULL;
p_project_party_id := NULL;
p_default_top_task_cust_flag := NULL;
--DBMS_OUTPUT.put_line ('Cust Block');
IF l_customers_in.COUNT > 0
THEN
FOR k IN l_customers_in.FIRST .. l_customers_in.LAST
LOOP
DBMS_OUTPUT.put_line ('Cust Block' || k);
x_return_status := 'S';
BEGIN
SELECT customer_id, customer_bill_split
INTO l_customer_id, l_customer_bill_split
FROM pa_project_customers
WHERE project_id = p_project_out.pa_project_id
AND customer_id = p_customers_in (k).customer_id;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
l_customer_id := NULL;
END;
IF l_customer_bill_split <= 100
THEN
UPDATE pa_project_customers
SET customer_bill_split =
p_customers_in (k).customer_bill_split,
project_relationship_code =
p_customers_in (k).project_relationship_code
WHERE project_id = p_project_out.pa_project_id
AND customer_id = p_customers_in (k).customer_id;
END IF;
-- DBMS_OUTPUT.put_line ( 'l_CUSTOMER_BILL_SPLIT '
-- || l_customer_bill_split
-- );
IF l_customer_id IS NULL
THEN
DBMS_OUTPUT.put_line ( 'Cust Block inner '
|| p_project_out.pa_project_id
|| ' '
|| p_customers_in (k).customer_id
);
BEGIN
apps.pa_customers_contacts_pub.create_project_customer
('1',
'T',
'F',
p_validate_only,
p_validation_level,
p_calling_module,
p_debug_mode,
p_max_msg_count,
p_project_out.pa_project_id,
p_customers_in (k).customer_id,
p_customer_name,
p_customer_number,
p_customers_in (k).project_relationship_code,
p_customers_in (k).customer_bill_split,
p_customers_in (k).customer_id,
p_customers_in (k).customer_id,
p_bill_to_customer_name,
p_bill_to_customer_number,
p_ship_to_customer_name,
p_ship_to_customer_number,
p_customers_in (k).bill_to_address_id,
p_customers_in (k).ship_to_address_id,
p_bill_site_name,
p_work_site_name,
p_customers_in (k).inv_currency_code,
p_customers_in (k).inv_rate_type,
p_customers_in (k).inv_rate_date,
p_customers_in (k).inv_exchange_rate,
p_customers_in (k).allow_inv_user_rate_type_flag,
p_customers_in (k).receiver_task_id,
x_customer_id,
x_return_status,
x_msg_count,
x_msg_data,
p_project_party_id,
p_default_top_task_cust_flag,
p_customers_in (k).enable_top_task_cust_flag
);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('EXCEPTION');
x_return_status := 'E';
x_msg_data :=
'Error in adding the customer ' || SQLERRM;
raise_application_error
(-20101,
'Project Customer Error: '
|| x_msg_data
);
END;
DBMS_OUTPUT.put_line ( 'x_return_status '
|| x_return_status
|| ' '
|| x_customer_id
);
DBMS_OUTPUT.put_line ('x_msg_data ' || x_msg_data || SQLERRM);
END IF;
p_return_status := x_return_status;
p_msg_data := x_msg_data || SQLERRM;
END LOOP;
END IF;
END IF;
END;
END xxal_pa_project_creation;
/
SHOW ERRORS;
EXIT;
/
SET DEFINE OFF;
CREATE OR REPLACE PACKAGE BODY apps.xxal_pa_project_update_pub
IS
PROCEDURE update_project (
p_api_version_number IN NUMBER
:= pa_interface_utils_pub.g_pa_miss_num,
p_commit IN VARCHAR2 := fnd_api.g_false,
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_msg_count OUT NOCOPY NUMBER,
p_msg_data OUT NOCOPY VARCHAR2,
p_return_status OUT NOCOPY VARCHAR2,
p_workflow_started OUT NOCOPY VARCHAR2,
p_pm_product_code IN VARCHAR2,
p_op_validate_flag IN VARCHAR2 := 'Y',
p_project_in IN pa_project_pub.project_in_rec_type,
p_project_out OUT NOCOPY pa_project_pub.project_out_rec_type,
p_customers_in IN pa_project_pub.customer_tbl_type
:= pa_project_pub.g_customers_in_tbl,
p_key_members IN pa_project_pub.project_role_tbl_type
:= pa_project_pub.g_key_members_in_tbl,
p_class_categories IN pa_project_pub.class_category_tbl_type
:= pa_project_pub.g_class_categories_in_tbl,
p_tasks_in IN pa_project_pub.task_in_tbl_type,
p_tasks_out OUT NOCOPY pa_project_pub.task_out_tbl_type,
p_org_roles IN pa_project_pub.project_role_tbl_type
:= pa_project_pub.g_org_roles_in_tbl,
p_structure_in IN pa_project_pub.structure_in_rec_type
:= pa_project_pub.g_structure_in_rec,
p_ext_attr_tbl_in IN pa_project_pub.pa_ext_attr_table_type
:= pa_project_pub.g_ext_attr_in_tbl,
p_pass_entire_structure IN VARCHAR2 := 'N',
p_deliverables_in IN pa_project_pub.deliverable_in_tbl_type
:= pa_project_pub.g_deliverables_in_tbl,
p_deliverable_actions_in IN pa_project_pub.action_in_tbl_type
:= pa_project_pub.g_deliverable_actions_in_tbl,
p_update_mode IN VARCHAR2
-- := 'PA_UPD_WBS_ATTR'
)
IS
l_error_details VARCHAR2 (2000);
p_data VARCHAR2 (2000);
p_msg_index_out VARCHAR2 (250);
l_project_in pa_project_pub.project_in_rec_type;
l_tasks_in pa_project_pub.task_in_tbl_type;
l_structure_in pa_project_pub.structure_in_rec_type;
l_project_type_class_code VARCHAR2 (250);
l_structure_version_id NUMBER;
cnt1 NUMBER;
cnt2 NUMBER;
l_task_id NUMBER;
CURSOR l_project_csr (l_pa_project_id NUMBER)
IS
SELECT *
FROM pa_projects_all p
WHERE p.project_id = l_pa_project_id;
CURSOR l_tasks_csr (l_pa_task_id NUMBER)
IS
SELECT *
FROM pa_tasks p
WHERE p.task_id = l_pa_task_id;
l_project_rec pa_projects%ROWTYPE;
l_tasks_rec pa_tasks%ROWTYPE;
BEGIN
p_return_status := 'S';
p_msg_count := 0;
p_msg_data := NULL;
l_project_in := p_project_in;
l_tasks_in := p_tasks_in;
l_structure_in := p_structure_in;
BEGIN
pa_interface_utils_pub.set_global_info
(p_api_version_number => 1.0,
p_responsibility_id => fnd_profile.VALUE
('RESP_ID'),
--replace RESP_ID with valid projects responsilbility
p_user_id => fnd_profile.VALUE
('USER_ID'),
--replace USER_ID with valid user_id having the above resp
p_msg_count => p_msg_count,
p_msg_data => p_msg_data,
p_return_status => p_return_status
);
mo_global.init ('PA');
END;
IF p_return_status = 'S'
THEN
OPEN l_project_csr (l_project_in.pa_project_id);
FETCH l_project_csr
INTO l_project_rec;
CLOSE l_project_csr;
l_project_in.created_from_project_id :=
l_project_rec.created_from_project_id;
l_project_in.distribution_rule :=
NVL (l_project_rec.distribution_rule,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.project_currency_code :=
NVL (l_project_rec.project_currency_code,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.work_type_id :=
NVL (l_project_rec.work_type_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.labor_sch_type :=
NVL (l_project_rec.labor_sch_type,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.non_labor_sch_type :=
NVL (l_project_rec.non_labor_sch_type,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.rev_ind_rate_sch_id :=
NVL (l_project_rec.rev_ind_rate_sch_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.inv_ind_rate_sch_id :=
NVL (l_project_rec.inv_ind_rate_sch_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.job_bill_rate_schedule_id :=
NVL (l_project_rec.job_bill_rate_schedule_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.emp_bill_rate_schedule_id :=
NVL (l_project_rec.emp_bill_rate_schedule_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.cost_plus_fixed_fee_flag :=
NVL (l_project_rec.cost_plus_fixed_fee_flag,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.output_tax_code :=
NVL (l_project_rec.output_tax_code,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.project_rate_type :=
NVL (l_project_rec.project_rate_type,
pa_interface_utils_pub.g_pa_miss_char
);
-- l_project_in.carrying_out_organization_id :=
-- NVL (l_project_rec.carrying_out_organization_id,
-- pa_interface_utils_pub.g_pa_miss_num
-- );
l_project_in.non_lab_std_bill_rt_sch_id :=
NVL (l_project_rec.non_lab_std_bill_rt_sch_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.non_labor_bill_rate_org_id :=
NVL (l_project_rec.non_labor_bill_rate_org_id,
pa_interface_utils_pub.g_pa_miss_num
);
IF l_tasks_in.COUNT > 0
THEN
FOR i IN l_tasks_in.FIRST .. l_tasks_in.LAST
LOOP
IF l_project_in.completion_date <
l_tasks_in (i).task_completion_date
THEN
p_return_status := 'E';
p_msg_count := 1;
p_msg_data :=
'Task should be within the Project Completion Date '
|| SQLERRM;
raise_application_error (-20121, p_msg_data);
END IF;
BEGIN
SELECT pt.task_id
INTO l_task_id
FROM pa_projects_all prj,
hr_operating_units hr,
pa_tasks pt
WHERE hr.organization_id = prj.org_id
AND prj.enabled_flag = 'Y'
AND pt.project_id = prj.project_id
AND prj.project_id = l_project_in.pa_project_id
--AND pt.task_name = l_tasks_in (i).task_name
AND pt.task_number = l_tasks_in (i).pa_task_number;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
p_return_status := 'S';
l_task_id := NULL;
END;
l_tasks_in (i).pa_task_id := l_task_id;
OPEN l_tasks_csr (l_tasks_in (i).pa_task_id);
FETCH l_tasks_csr
INTO l_tasks_rec;
CLOSE l_tasks_csr;
l_tasks_in (i).labor_sch_type :=
NVL (l_tasks_rec.labor_sch_type,
pa_interface_utils_pub.g_pa_miss_char
);
l_tasks_in (i).non_labor_sch_type :=
NVL (l_tasks_rec.non_labor_sch_type,
pa_interface_utils_pub.g_pa_miss_char
);
l_tasks_in (i).rev_ind_rate_sch_id :=
NVL (l_tasks_rec.rev_ind_rate_sch_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_tasks_in (i).inv_ind_rate_sch_id :=
NVL (l_tasks_rec.inv_ind_rate_sch_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_tasks_in (i).job_bill_rate_schedule_id :=
NVL (l_tasks_rec.job_bill_rate_schedule_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_tasks_in (i).emp_bill_rate_schedule_id :=
NVL (l_tasks_rec.emp_bill_rate_schedule_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_tasks_in (i).cost_plus_fixed_fee_flag :=
NVL (l_tasks_rec.cost_plus_fixed_fee_flag,
pa_interface_utils_pub.g_pa_miss_char
);
l_tasks_in (i).project_rate_type :=
NVL (l_tasks_rec.project_rate_type,
pa_interface_utils_pub.g_pa_miss_char
);
END LOOP;
END IF;
IF p_return_status = 'S'
THEN
BEGIN
apps.PA_PROJECT_PUB.update_project (p_api_version_number,
p_commit,
p_init_msg_list,
p_msg_count,
p_msg_data,
p_return_status,
p_workflow_started,
p_pm_product_code,
p_op_validate_flag,
l_project_in,
p_project_out,
p_customers_in,
p_key_members,
p_class_categories,
l_tasks_in,
p_tasks_out,
p_org_roles,
p_structure_in,
p_ext_attr_tbl_in,
p_pass_entire_structure,
p_deliverables_in,
p_deliverable_actions_in,
p_update_mode
);
DBMS_OUTPUT.put_line ('p_msg_data' || p_msg_data);
DBMS_OUTPUT.put_line ('p_return_status' || p_return_status);
IF p_msg_count > 0 AND p_return_status != 'S'
THEN
FOR k IN 1 .. p_msg_count
LOOP
apps.fnd_msg_pub.get (p_msg_index => k,
p_encoded => 'F',
p_data => p_data,
p_msg_index_out => p_msg_index_out
);
l_error_details :=
SUBSTR (l_error_details, 1, 256)
|| p_data
|| ':'
|| p_msg_index_out;
END LOOP;
END IF;
IF l_error_details IS NOT NULL
THEN
p_return_status := 'E';
p_msg_count := 1;
p_msg_data := SUBSTR (l_error_details, 1, 200);
raise_application_error (-20121, p_msg_data);
END IF;
END;
END IF;
END IF;
END update_project;
END xxal_pa_project_update_pub;
/
SHOW ERRORS;
EXIT;
CREATE OR REPLACE PACKAGE BODY apps.xxal_pa_project_creation
AS
PROCEDURE create_project (
p_api_version_number IN NUMBER
:= pa_interface_utils_pub.g_pa_miss_num,
p_commit IN VARCHAR2 := fnd_api.g_false,
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_msg_count OUT NOCOPY NUMBER,
p_msg_data OUT NOCOPY VARCHAR2,
p_return_status OUT NOCOPY VARCHAR2,
p_workflow_started OUT NOCOPY VARCHAR2,
p_pm_product_code IN VARCHAR2
:= pa_interface_utils_pub.g_pa_miss_char,
p_op_validate_flag IN VARCHAR2 := 'Y',
p_project_in IN pa_project_pub.project_in_rec_type,
p_project_out OUT NOCOPY pa_project_pub.project_out_rec_type,
p_customers_in IN pa_project_pub.customer_tbl_type,
p_key_members IN pa_project_pub.project_role_tbl_type,
p_class_categories IN pa_project_pub.class_category_tbl_type,
p_tasks_in IN pa_project_pub.task_in_tbl_type,
p_tasks_out OUT NOCOPY pa_project_pub.task_out_tbl_type,
p_org_roles IN pa_project_pub.project_role_tbl_type,
p_structure_in IN pa_project_pub.structure_in_rec_type,
p_ext_attr_tbl_in IN pa_project_pub.pa_ext_attr_table_type,
p_deliverables_in IN pa_project_pub.deliverable_in_tbl_type,
p_deliverable_actions_in IN pa_project_pub.action_in_tbl_type
)
IS
l_project_type VARCHAR2 (50);
l_std_bill_rate_schedule VARCHAR2 (100);
CURSOR l_template_task (l_orig_project_id NUMBER)
IS
SELECT b.task_number parent_task_ref, a.*
FROM pa_tasks a, pa_tasks b
WHERE a.project_id = l_orig_project_id AND a.parent_task_id = b.task_id(+)
ORDER BY a.task_id;
l_count NUMBER;
i NUMBER;
l_tasks_in pa_project_pub.task_in_tbl_type;
l_customers_in pa_project_pub.customer_tbl_type;
l_customer_id NUMBER;
k NUMBER;
null_val VARCHAR2 (10);
p_validate_only VARCHAR2 (200);
p_validation_level NUMBER;
p_calling_module VARCHAR2 (200);
p_debug_mode VARCHAR2 (200);
p_max_msg_count NUMBER;
p_project_id NUMBER;
p_customer_id NUMBER;
p_customer_name VARCHAR2 (200);
p_customer_number VARCHAR2 (200);
p_project_relationship_code VARCHAR2 (200);
p_customer_bill_split NUMBER;
p_bill_to_customer_id NUMBER;
p_ship_to_customer_id NUMBER;
p_bill_to_customer_name VARCHAR2 (200);
p_bill_to_customer_number VARCHAR2 (200);
p_ship_to_customer_name VARCHAR2 (200);
p_ship_to_customer_number VARCHAR2 (200);
p_bill_to_address_id NUMBER;
p_ship_to_address_id NUMBER;
p_bill_site_name VARCHAR2 (200);
p_work_site_name VARCHAR2 (200);
p_inv_currency_code VARCHAR2 (200);
p_inv_rate_type VARCHAR2 (200);
p_inv_rate_date DATE;
p_inv_exchange_rate NUMBER;
p_allow_user_rate_type_flag VARCHAR2 (200);
p_receiver_task_id NUMBER;
x_customer_id NUMBER;
x_return_status VARCHAR2 (200);
x_msg_count NUMBER;
x_msg_data VARCHAR2 (200);
p_project_party_id NUMBER;
p_default_top_task_cust_flag VARCHAR2 (200);
p_en_top_task_cust_flag VARCHAR2 (200);
l_customer_bill_split NUMBER;
BEGIN
p_return_status := 'S';
l_customers_in := p_customers_in;
l_tasks_in := p_tasks_in;
l_count := l_tasks_in.COUNT;
i := l_count + 1;
BEGIN
SELECT ppa.project_type
INTO l_project_type
FROM pa_projects_all ppa, pa_project_types_all ppt
WHERE ppa.project_type = ppt.project_type
AND ppt.project_type_class_code = 'CONTRACT'
AND ppa.project_id = p_project_in.created_from_project_id;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
WHEN OTHERS
THEN
p_return_status := 'E';
raise_application_error (-20101,
'Obtaining Project type error: '
|| SQLERRM
);
END;
DBMS_OUTPUT.put_line ( 'Customer count in pkg '
|| p_customers_in.COUNT
|| p_project_in.created_from_project_id
);
IF l_project_type IS NOT NULL
THEN
BEGIN
SELECT std_bill_rate_schedule
INTO l_std_bill_rate_schedule
FROM pa_std_bill_rate_schedules_all
WHERE bill_rate_sch_id = p_project_in.non_lab_std_bill_rt_sch_id;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
-- raise_application_error (-20101,
-- 'Non Labour Schedule is Invalid: '
-- || SQLERRM
-- );
END;
END IF;
FOR cur_cur_task IN
l_template_task (p_project_in.created_from_project_id)
LOOP
DBMS_OUTPUT.put_line ('inside');
l_tasks_in (i).pm_task_reference := cur_cur_task.task_number;
l_tasks_in (i).task_name := cur_cur_task.task_name;
l_tasks_in (i).long_task_name := cur_cur_task.long_task_name;
l_tasks_in (i).pa_task_number := cur_cur_task.task_number;
l_tasks_in (i).task_description := cur_cur_task.description;
l_tasks_in (i).task_start_date := p_project_in.start_date;
l_tasks_in (i).task_completion_date := p_project_in.completion_date;
l_tasks_in (i).pm_parent_task_reference :=
cur_cur_task.parent_task_ref;
l_tasks_in (i).address_id := cur_cur_task.address_id;
l_tasks_in (i).carrying_out_organization_id :=
p_project_in.carrying_out_organization_id;
l_tasks_in (i).service_type_code := cur_cur_task.service_type_code;
l_tasks_in (i).task_manager_person_id :=
cur_cur_task.task_manager_person_id;
l_tasks_in (i).billable_flag := cur_cur_task.billable_flag;
l_tasks_in (i).chargeable_flag := cur_cur_task.chargeable_flag;
l_tasks_in (i).attribute_category := cur_cur_task.attribute_category;
l_tasks_in (i).attribute1 := cur_cur_task.attribute1;
l_tasks_in (i).attribute2 := cur_cur_task.attribute2;
l_tasks_in (i).attribute3 := cur_cur_task.attribute3;
l_tasks_in (i).attribute4 := cur_cur_task.attribute4;
l_tasks_in (i).attribute5 := cur_cur_task.attribute5;
l_tasks_in (i).attribute6 := cur_cur_task.attribute6;
l_tasks_in (i).attribute7 := cur_cur_task.attribute7;
l_tasks_in (i).attribute8 := cur_cur_task.attribute8;
l_tasks_in (i).attribute9 := cur_cur_task.attribute9;
l_tasks_in (i).attribute10 := cur_cur_task.attribute10;
l_tasks_in (i).receive_project_invoice_flag :=
cur_cur_task.receive_project_invoice_flag;
l_tasks_in (i).work_type_id := cur_cur_task.work_type_id;
l_tasks_in (i).retirement_cost_flag :=
cur_cur_task.retirement_cost_flag;
-- l_tasks_in (i).non_labor_sch_type := p_project_in.non_labor_sch_type;
-- l_tasks_in (i).non_labor_std_bill_rate_schdl :=
-- l_std_bill_rate_schedule;
-- l_tasks_in (i).non_labor_bill_rate_org_id :=
-- p_project_in.non_labor_bill_rate_org_id;
-- l_tasks_in (i).non_lab_std_bill_rt_sch_id :=
-- p_project_in.non_lab_std_bill_rt_sch_id;
DBMS_OUTPUT.put_line ( 'l_tasks_in (i).pa_task_number '
|| l_tasks_in (i).pa_task_number
|| ':'
|| l_tasks_in (i).pa_parent_task_id
);
i := i + 1;
END LOOP;
BEGIN
--mo_global.init ('PA');
DBMS_OUTPUT.put_line ('INSIDE ');
PA_PROJECT_PUB.create_project (p_api_version_number,
p_commit,
p_init_msg_list,
p_msg_count,
p_msg_data,
p_return_status,
p_workflow_started,
p_pm_product_code,
p_op_validate_flag,
p_project_in,
p_project_out,
p_customers_in,
p_key_members,
p_class_categories,
l_tasks_in,
p_tasks_out,
p_org_roles,
p_structure_in,
p_ext_attr_tbl_in,
p_deliverables_in,
p_deliverable_actions_in
);
DBMS_OUTPUT.put_line (' p_return_status' || p_return_status);
EXCEPTION
WHEN OTHERS
THEN
p_return_status := 'E';
raise_application_error (-20101,
'Error CREATE_PROJECT: ' || SQLERRM
);
END;
/*IF p_return_status = 'S'
THEN
DBMS_OUTPUT.put_line ( 'p_project_out.pa_project_id '
|| p_project_out.pa_project_id
);
IF l_project_type IS NOT NULL
THEN
BEGIN
UPDATE pa_projects_all
SET non_labor_sch_type = p_project_in.non_labor_sch_type,
non_labor_bill_rate_org_id =
p_project_in.non_labor_bill_rate_org_id,
non_labor_std_bill_rate_schdl = l_std_bill_rate_schedule,
non_lab_std_bill_rt_sch_id =
p_project_in.non_lab_std_bill_rt_sch_id
WHERE project_id = p_project_out.pa_project_id;
EXCEPTION
WHEN OTHERS
THEN
raise_application_error (-20101,
'Project update Error: ' || SQLERRM
);
END;
END IF;
END IF;*/
IF p_return_status = 'S'
THEN
p_validate_only := 'FND_API.G_TRUE';
p_validation_level := fnd_api.g_valid_level_full;
p_calling_module := 'SELF_SERVICE';
p_debug_mode := 'N';
p_max_msg_count := fnd_api.g_miss_num;
p_customer_name := 'FND_API.G_MISS_CHAR';
p_customer_number := 'FND_API.G_MISS_CHAR';
p_bill_to_customer_name := 'FND_API.G_MISS_CHAR';
p_bill_to_customer_number := 'FND_API.G_MISS_CHAR';
p_ship_to_customer_name := 'FND_API.G_MISS_CHAR';
p_ship_to_customer_number := 'FND_API.G_MISS_CHAR';
p_bill_site_name := 'FND_API.G_MISS_CHAR';
p_work_site_name := 'FND_API.G_MISS_CHAR';
p_inv_rate_type := 'FND_API.G_MISS_CHAR';
p_inv_rate_date := fnd_api.g_miss_date;
p_inv_exchange_rate := fnd_api.g_miss_num;
p_receiver_task_id := fnd_api.g_miss_num;
x_customer_id := NULL;
x_return_status := NULL;
x_msg_count := NULL;
x_msg_data := NULL;
p_project_party_id := NULL;
p_default_top_task_cust_flag := NULL;
--DBMS_OUTPUT.put_line ('Cust Block');
IF l_customers_in.COUNT > 0
THEN
FOR k IN l_customers_in.FIRST .. l_customers_in.LAST
LOOP
DBMS_OUTPUT.put_line ('Cust Block' || k);
x_return_status := 'S';
BEGIN
SELECT customer_id, customer_bill_split
INTO l_customer_id, l_customer_bill_split
FROM pa_project_customers
WHERE project_id = p_project_out.pa_project_id
AND customer_id = p_customers_in (k).customer_id;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
l_customer_id := NULL;
END;
IF l_customer_bill_split <= 100
THEN
UPDATE pa_project_customers
SET customer_bill_split =
p_customers_in (k).customer_bill_split,
project_relationship_code =
p_customers_in (k).project_relationship_code
WHERE project_id = p_project_out.pa_project_id
AND customer_id = p_customers_in (k).customer_id;
END IF;
-- DBMS_OUTPUT.put_line ( 'l_CUSTOMER_BILL_SPLIT '
-- || l_customer_bill_split
-- );
IF l_customer_id IS NULL
THEN
DBMS_OUTPUT.put_line ( 'Cust Block inner '
|| p_project_out.pa_project_id
|| ' '
|| p_customers_in (k).customer_id
);
BEGIN
apps.pa_customers_contacts_pub.create_project_customer
('1',
'T',
'F',
p_validate_only,
p_validation_level,
p_calling_module,
p_debug_mode,
p_max_msg_count,
p_project_out.pa_project_id,
p_customers_in (k).customer_id,
p_customer_name,
p_customer_number,
p_customers_in (k).project_relationship_code,
p_customers_in (k).customer_bill_split,
p_customers_in (k).customer_id,
p_customers_in (k).customer_id,
p_bill_to_customer_name,
p_bill_to_customer_number,
p_ship_to_customer_name,
p_ship_to_customer_number,
p_customers_in (k).bill_to_address_id,
p_customers_in (k).ship_to_address_id,
p_bill_site_name,
p_work_site_name,
p_customers_in (k).inv_currency_code,
p_customers_in (k).inv_rate_type,
p_customers_in (k).inv_rate_date,
p_customers_in (k).inv_exchange_rate,
p_customers_in (k).allow_inv_user_rate_type_flag,
p_customers_in (k).receiver_task_id,
x_customer_id,
x_return_status,
x_msg_count,
x_msg_data,
p_project_party_id,
p_default_top_task_cust_flag,
p_customers_in (k).enable_top_task_cust_flag
);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('EXCEPTION');
x_return_status := 'E';
x_msg_data :=
'Error in adding the customer ' || SQLERRM;
raise_application_error
(-20101,
'Project Customer Error: '
|| x_msg_data
);
END;
DBMS_OUTPUT.put_line ( 'x_return_status '
|| x_return_status
|| ' '
|| x_customer_id
);
DBMS_OUTPUT.put_line ('x_msg_data ' || x_msg_data || SQLERRM);
END IF;
p_return_status := x_return_status;
p_msg_data := x_msg_data || SQLERRM;
END LOOP;
END IF;
END IF;
END;
END xxal_pa_project_creation;
/
SHOW ERRORS;
EXIT;
/
SET DEFINE OFF;
CREATE OR REPLACE PACKAGE BODY apps.xxal_pa_project_update_pub
IS
PROCEDURE update_project (
p_api_version_number IN NUMBER
:= pa_interface_utils_pub.g_pa_miss_num,
p_commit IN VARCHAR2 := fnd_api.g_false,
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_msg_count OUT NOCOPY NUMBER,
p_msg_data OUT NOCOPY VARCHAR2,
p_return_status OUT NOCOPY VARCHAR2,
p_workflow_started OUT NOCOPY VARCHAR2,
p_pm_product_code IN VARCHAR2,
p_op_validate_flag IN VARCHAR2 := 'Y',
p_project_in IN pa_project_pub.project_in_rec_type,
p_project_out OUT NOCOPY pa_project_pub.project_out_rec_type,
p_customers_in IN pa_project_pub.customer_tbl_type
:= pa_project_pub.g_customers_in_tbl,
p_key_members IN pa_project_pub.project_role_tbl_type
:= pa_project_pub.g_key_members_in_tbl,
p_class_categories IN pa_project_pub.class_category_tbl_type
:= pa_project_pub.g_class_categories_in_tbl,
p_tasks_in IN pa_project_pub.task_in_tbl_type,
p_tasks_out OUT NOCOPY pa_project_pub.task_out_tbl_type,
p_org_roles IN pa_project_pub.project_role_tbl_type
:= pa_project_pub.g_org_roles_in_tbl,
p_structure_in IN pa_project_pub.structure_in_rec_type
:= pa_project_pub.g_structure_in_rec,
p_ext_attr_tbl_in IN pa_project_pub.pa_ext_attr_table_type
:= pa_project_pub.g_ext_attr_in_tbl,
p_pass_entire_structure IN VARCHAR2 := 'N',
p_deliverables_in IN pa_project_pub.deliverable_in_tbl_type
:= pa_project_pub.g_deliverables_in_tbl,
p_deliverable_actions_in IN pa_project_pub.action_in_tbl_type
:= pa_project_pub.g_deliverable_actions_in_tbl,
p_update_mode IN VARCHAR2
-- := 'PA_UPD_WBS_ATTR'
)
IS
l_error_details VARCHAR2 (2000);
p_data VARCHAR2 (2000);
p_msg_index_out VARCHAR2 (250);
l_project_in pa_project_pub.project_in_rec_type;
l_tasks_in pa_project_pub.task_in_tbl_type;
l_structure_in pa_project_pub.structure_in_rec_type;
l_project_type_class_code VARCHAR2 (250);
l_structure_version_id NUMBER;
cnt1 NUMBER;
cnt2 NUMBER;
l_task_id NUMBER;
CURSOR l_project_csr (l_pa_project_id NUMBER)
IS
SELECT *
FROM pa_projects_all p
WHERE p.project_id = l_pa_project_id;
CURSOR l_tasks_csr (l_pa_task_id NUMBER)
IS
SELECT *
FROM pa_tasks p
WHERE p.task_id = l_pa_task_id;
l_project_rec pa_projects%ROWTYPE;
l_tasks_rec pa_tasks%ROWTYPE;
BEGIN
p_return_status := 'S';
p_msg_count := 0;
p_msg_data := NULL;
l_project_in := p_project_in;
l_tasks_in := p_tasks_in;
l_structure_in := p_structure_in;
BEGIN
pa_interface_utils_pub.set_global_info
(p_api_version_number => 1.0,
p_responsibility_id => fnd_profile.VALUE
('RESP_ID'),
--replace RESP_ID with valid projects responsilbility
p_user_id => fnd_profile.VALUE
('USER_ID'),
--replace USER_ID with valid user_id having the above resp
p_msg_count => p_msg_count,
p_msg_data => p_msg_data,
p_return_status => p_return_status
);
mo_global.init ('PA');
END;
IF p_return_status = 'S'
THEN
OPEN l_project_csr (l_project_in.pa_project_id);
FETCH l_project_csr
INTO l_project_rec;
CLOSE l_project_csr;
l_project_in.created_from_project_id :=
l_project_rec.created_from_project_id;
l_project_in.distribution_rule :=
NVL (l_project_rec.distribution_rule,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.project_currency_code :=
NVL (l_project_rec.project_currency_code,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.work_type_id :=
NVL (l_project_rec.work_type_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.labor_sch_type :=
NVL (l_project_rec.labor_sch_type,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.non_labor_sch_type :=
NVL (l_project_rec.non_labor_sch_type,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.rev_ind_rate_sch_id :=
NVL (l_project_rec.rev_ind_rate_sch_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.inv_ind_rate_sch_id :=
NVL (l_project_rec.inv_ind_rate_sch_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.job_bill_rate_schedule_id :=
NVL (l_project_rec.job_bill_rate_schedule_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.emp_bill_rate_schedule_id :=
NVL (l_project_rec.emp_bill_rate_schedule_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.cost_plus_fixed_fee_flag :=
NVL (l_project_rec.cost_plus_fixed_fee_flag,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.output_tax_code :=
NVL (l_project_rec.output_tax_code,
pa_interface_utils_pub.g_pa_miss_char
);
l_project_in.project_rate_type :=
NVL (l_project_rec.project_rate_type,
pa_interface_utils_pub.g_pa_miss_char
);
-- l_project_in.carrying_out_organization_id :=
-- NVL (l_project_rec.carrying_out_organization_id,
-- pa_interface_utils_pub.g_pa_miss_num
-- );
l_project_in.non_lab_std_bill_rt_sch_id :=
NVL (l_project_rec.non_lab_std_bill_rt_sch_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_project_in.non_labor_bill_rate_org_id :=
NVL (l_project_rec.non_labor_bill_rate_org_id,
pa_interface_utils_pub.g_pa_miss_num
);
IF l_tasks_in.COUNT > 0
THEN
FOR i IN l_tasks_in.FIRST .. l_tasks_in.LAST
LOOP
IF l_project_in.completion_date <
l_tasks_in (i).task_completion_date
THEN
p_return_status := 'E';
p_msg_count := 1;
p_msg_data :=
'Task should be within the Project Completion Date '
|| SQLERRM;
raise_application_error (-20121, p_msg_data);
END IF;
BEGIN
SELECT pt.task_id
INTO l_task_id
FROM pa_projects_all prj,
hr_operating_units hr,
pa_tasks pt
WHERE hr.organization_id = prj.org_id
AND prj.enabled_flag = 'Y'
AND pt.project_id = prj.project_id
AND prj.project_id = l_project_in.pa_project_id
--AND pt.task_name = l_tasks_in (i).task_name
AND pt.task_number = l_tasks_in (i).pa_task_number;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
p_return_status := 'S';
l_task_id := NULL;
END;
l_tasks_in (i).pa_task_id := l_task_id;
OPEN l_tasks_csr (l_tasks_in (i).pa_task_id);
FETCH l_tasks_csr
INTO l_tasks_rec;
CLOSE l_tasks_csr;
l_tasks_in (i).labor_sch_type :=
NVL (l_tasks_rec.labor_sch_type,
pa_interface_utils_pub.g_pa_miss_char
);
l_tasks_in (i).non_labor_sch_type :=
NVL (l_tasks_rec.non_labor_sch_type,
pa_interface_utils_pub.g_pa_miss_char
);
l_tasks_in (i).rev_ind_rate_sch_id :=
NVL (l_tasks_rec.rev_ind_rate_sch_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_tasks_in (i).inv_ind_rate_sch_id :=
NVL (l_tasks_rec.inv_ind_rate_sch_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_tasks_in (i).job_bill_rate_schedule_id :=
NVL (l_tasks_rec.job_bill_rate_schedule_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_tasks_in (i).emp_bill_rate_schedule_id :=
NVL (l_tasks_rec.emp_bill_rate_schedule_id,
pa_interface_utils_pub.g_pa_miss_num
);
l_tasks_in (i).cost_plus_fixed_fee_flag :=
NVL (l_tasks_rec.cost_plus_fixed_fee_flag,
pa_interface_utils_pub.g_pa_miss_char
);
l_tasks_in (i).project_rate_type :=
NVL (l_tasks_rec.project_rate_type,
pa_interface_utils_pub.g_pa_miss_char
);
END LOOP;
END IF;
IF p_return_status = 'S'
THEN
BEGIN
apps.PA_PROJECT_PUB.update_project (p_api_version_number,
p_commit,
p_init_msg_list,
p_msg_count,
p_msg_data,
p_return_status,
p_workflow_started,
p_pm_product_code,
p_op_validate_flag,
l_project_in,
p_project_out,
p_customers_in,
p_key_members,
p_class_categories,
l_tasks_in,
p_tasks_out,
p_org_roles,
p_structure_in,
p_ext_attr_tbl_in,
p_pass_entire_structure,
p_deliverables_in,
p_deliverable_actions_in,
p_update_mode
);
DBMS_OUTPUT.put_line ('p_msg_data' || p_msg_data);
DBMS_OUTPUT.put_line ('p_return_status' || p_return_status);
IF p_msg_count > 0 AND p_return_status != 'S'
THEN
FOR k IN 1 .. p_msg_count
LOOP
apps.fnd_msg_pub.get (p_msg_index => k,
p_encoded => 'F',
p_data => p_data,
p_msg_index_out => p_msg_index_out
);
l_error_details :=
SUBSTR (l_error_details, 1, 256)
|| p_data
|| ':'
|| p_msg_index_out;
END LOOP;
END IF;
IF l_error_details IS NOT NULL
THEN
p_return_status := 'E';
p_msg_count := 1;
p_msg_data := SUBSTR (l_error_details, 1, 200);
raise_application_error (-20121, p_msg_data);
END IF;
END;
END IF;
END IF;
END update_project;
END xxal_pa_project_update_pub;
/
SHOW ERRORS;
EXIT;
Thanks for sharing this great information I am impressed by the information that you have on this blog. Same as your blog i found another one Oracle PPM Cloud . Actually I was looking for the same information on internet for Oracle Project Portfolio Management (PPM) Cloud Tutorial and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can learn more aboutOracle PPM Cloud . By attending Oracle PPM Cloud Training .
ReplyDelete