DECLARE
l_person_analysis_id PER_PERSON_ANALYSES.PERSON_ANALYSIS_ID%TYPE;
l_analysis_criteria_id PER_PERSON_ANALYSES.ANALYSIS_CRITERIA_ID%TYPE;
l_pea_object_version_number PER_PERSON_ANALYSES.OBJECT_VERSION_NUMBER%TYPE;
BEGIN
l_person_analysis_id := 405;
l_analysis_criteria_id := null; -- if value assigned no values will not be applied
select max(fa.object_version_number)
into l_pea_object_version_number
from per_all_assignments_f fa, per_people_f pf
where fa.person_id=l_person_analysis_id
and fa.person_id = pf.person_id;
hr_sit_api.update_sit(
p_person_analysis_id => l_person_analysis_id,
p_segment5 => '1',
p_segment6 => '1',
p_analysis_criteria_id => l_analysis_criteria_id,
p_pea_object_version_number => l_pea_object_version_number
);
END;
When I run this I get this error
Cause: The HR object which is attempted to be locked is inconsistent with the corresponding object in the HR Schema.
Action: Retry the action with the correct object version number.
ORA-06512: at "APPS.HR_SIT_API", line 1190
ORA-06512: at line 13
Any ideas?
I have tried with changing the version number but it does not work what ever I do.