Hr_Assignment_Api.update_emp_asg_criteria ERROR

Oracle Human Resource (Core HR), Payroll, Time & Labor, Self Service HR, Advance Benefit, Talent Management (Performance Management, Competency Management, Performance Appraisal, Goal Management), iRecruitment, Compensation Workbench
Post Reply
m_muzamil_khan
Posts: 41
Joined: Tue May 05, 2009 5:19 am
Location: Pakistan

Hr_Assignment_Api.update_emp_asg_criteria ERROR

Post by m_muzamil_khan »

Hi,

I am facing problem when updating the employee Assignment through following API:

Hr_Assignment_Api.update_emp_asg_criteria

Error description are as follow:

ORA-20001: The primary key specified is invalid

Cause: The primary key values specified are invalid and do not exist in the schema.

Action: Check the primary key values before attempting to carry out the operation again.


Following is the code I wrote:

Hr_Assignment_Api.update_emp_asg_criteria
( p_validate => FALSE
, p_effective_date => emp_asg_rec.effective_date
, p_datetrack_update_mode => 'CORRECTION'
, p_assignment_id => ln_assignment_id
, p_organization_id => ln_organization_id
, p_pay_basis_id => ln_pay_basis_id
, p_payroll_id => ln_payroll_id
, p_job_id => ln_job_id
, p_grade_id => ln_grade_id
, p_location_id => ln_location_id
, p_position_id => ln_position_id
, p_employment_category => emp_asg_rec.assignment_category
, p_people_group_id => ln_people_group_id
-- , p_supervisor_assignment_id => 1853--ln_supervisor_id
-- organization change
, p_object_version_number => ln_ovn
, p_soft_coding_keyflex_id => ln_soft_coding_keyflex_id
, p_special_ceiling_step_id => on_special_ceiling_step_id
-- people group change
-- very misleading always check datatype of variable
, p_concatenated_segments => ov_concatenated_segments
, p_group_name => lv_group_name
, p_effective_start_date => ld_effective_start_date
, p_effective_end_date => od_effective_end_date
, p_org_now_no_manager_warning => ob_org_now_no_manager_warning
, p_other_manager_warning => ob_other_manager_warning
, p_spp_delete_warning => ob_spp_delete_warning
, p_entries_changed_warning => ov_entries_changed_warning
, p_tax_district_changed_warning => ob_tax_dist_changed_warn
);


pls help me how to resolve this issue, I am using Oracle EBS 11i.

Regards,
Muzamil Khan
ERP_GURU
Posts: 19
Joined: Mon Aug 09, 2010 11:26 am
Location: India

Post by ERP_GURU »

Hi,

I would suggest to take a trace of the program after running. Sometimes, it may happen when object_version_number from all_assignments table is not getting passed to the API correctly.

Once you identify the assignment number, you can hardcode it prior to running of program.

But still cause may be different as well, so please take trace first before proceeding.

Thanks!!
m_muzamil_khan
Posts: 41
Joined: Tue May 05, 2009 5:19 am
Location: Pakistan

Post by m_muzamil_khan »

Thanks for your advise, I traced that program by using PYUPIP. Following log file created after running the procedure:

connected: monitoring pipe ORACLE
1
2
Entering: hr_assignment_api.update_emp_asg_criteria 5
Entering: hr_assignment_api.update_emp_asg_criteria 5
Entering: hr_assignment_api.update_emp_asg_criteria 30
hr_assignment_api.update_emp_asg_criteria 50
hr_assignment_api.update_emp_asg_criteria 60
Entering: HR_ASSIGNMENT_BK3.UPDATE_EMP_ASG_CRITERIA_B 10
Entering: per_asg_bus1.return_legislation_code 10
Leaving: hr_assignment_api.update_emp_asg_criteria 999

Oracle Error -1013: exiting



Pls. advise if you have any idea after reading above log file

Regards,
ERP_GURU
Posts: 19
Joined: Mon Aug 09, 2010 11:26 am
Location: India

Post by ERP_GURU »

Hi Muzamil,

I would suggest to check that you have the right object_version_number. You also need to check that your assignment is not linked to a person (and position if set) who's start and end dates do not completely include that of the assignment.

Best of luck!!
eng_ahmad_2007
Posts: 258
Joined: Sun Oct 12, 2008 1:50 pm
Location: Saudi Arabia
Contact:

Post by eng_ahmad_2007 »

Dear Muzamil,

The problem is due to object version number being passed incorrectly. As it is an in/out parameter, you have to select it at first before the API and then you have to clear it after the loop (API).

Also, please share us the solution if you have worked it out.

Regards,

Ahmad Ghanem
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests