Monday 30 March 2020

Script to update pa deliverable action (pa_project_pub.update_deliverable_action)

DECLARE

l_api_version_number NUMBER := 1.0;
l_init_msg_list VARCHAR2 (1) := 'F';
l_commit VARCHAR2 (1) := 'F';
l_return_status VARCHAR2 (1);
l_action_out                pa_project_pub.action_out_tbl_type;
l_msg_count                 NUMBER := 0;
        l_msg_data                  VARCHAR2 (2000);
        l_msg_dummy                 VARCHAR2 (2000);

BEGIN

fnd_file.put_line (fnd_file.LOG,'nuan_deliverable_action_upd start');

pa_project_pub.update_deliverable_action (
  p_api_version => l_api_version_number
, p_init_msg_list => l_init_msg_list
, p_commit => l_commit
, x_return_status => l_return_status--l_return_status
, p_action_name => 'CTX Go Live'--action_rec.action_name  pa_dlvr_actions_v.element_name
, p_action_id => 4964902--action_rec.proj_element_id pa_dlvr_actions_v.proj_element_id
, p_pm_action_reference => 'PGL_CONVERSION'--action_rec.pm_source_reference--pa_deliverables_v.pm_source_reference
, p_action_owner_id => 19132--action_rec.manager_person_id pa_dlvr_actions_v.manager_person_id
, p_due_date => '26-MAR-2020'--l_due_date --pass due date
, p_completion_date => '26-MAR-2020' --pass completion_date
, p_deliverable_id => 4964900--action_rec.deliverable_id --pa_deliverables_v.proj_element_id
, p_project_id => 331512--action_rec.project_id --pa_dlvr_actions_v.project_id
, x_action_out => l_action_out--l_action_out
, p_pm_source_code => NULL--l_pm_product_code
, x_msg_count => l_msg_count--l_msg_count
, x_msg_data => l_msg_data--l_msg_data
);

COMMIT;

fnd_file.put_line (fnd_file.LOG,'pa_project_pub.update_deliverable_action return status:'||l_return_status);

IF l_return_status <> 'S'
THEN
--log_msg('deliverable_action api is in error');
FOR i IN 1 .. l_msg_count
LOOP
fnd_msg_pub.get (i,fnd_api.g_false,l_msg_data,l_msg_dummy );
--p_error_message :=v_msg_data;
   -- p_return_status :='E';
   -- log_msg(v_msg_data);
END LOOP;
fnd_file.put_line (fnd_file.LOG,'API Error for action :'||'Action_name :'||l_msg_data);
ELSE
fnd_file.put_line (fnd_file.LOG,'API is successfully updated for action :'||'CTX Go Live');
END IF;

fnd_file.put_line (fnd_file.LOG,'nuan_deliverable_action_upd start');

END;

No comments:

Post a Comment