|
0 registered (),
1
Guest and
6
Spiders online. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
#5099 - 01/02/10 08:31 AM
Correcting PERSON_TYPE_ID in per_all_people_f
|
hanger-on
Registered: 15/03/05
Posts: 72
Loc: Lloyds Register
|
Hello ..
The data here is interesting .. It would seem the USAGES_F data is correct ..
However the PEOPLE_F.person_type_id (as i understand) should hold the PER_PERSON_TYPES.person_type_id for the associated default SYSTEM_PERSON_TYPE, maintaining the old 1=>1 relationship, but allowing ptu to have 1=>many ..
Here, People_f.person_type_id is NOT the (as i understand) correct value .. and i was trying to use :
HR_PERSON_API.update_person (p_validate => b_validate --in boolean default false ,p_effective_date => x.effective_start_date --in date ,p_datetrack_update_mode => l_datetrack_update_mode --in (CORRECTION) varchar2 ,p_person_id => x.person_id --in number ,p_object_version_number => x.object_version_number --in out nocopy number ,p_person_type_id => 238
etc to rectify the issue .. The api is taking no account of the new person type id, but leaving it at the original value ..
There is, of course UPDATE per_all_people_f ...
but the system is ONDELAY .. so i'd never manage - unless i buried it as HRDPP - eh Clive ?
.. anyway - does anyone have anymore tactical solutions to this little issue of mine ..
All the best
Neill Atkins
|
|
Top
|
|
|
|
#5100 - 01/02/10 09:15 AM
Re: Correcting PERSON_TYPE_ID in per_all_people_f
[Re: natkins]
|
Guru
 
Registered: 11/03/05
Posts: 1080
Loc: Bath
|
Neill, do you get any error messages?
I've been looking at our (11.5) version of the API here (file name peperapi.pkb, v 115.42 for reference), and from what I can see, it does the following in respect of person_type_id validation:
1. Try to find the person_type_id parameter value, in the PTU table for that person as at the effective date. If not found, then <old_pt_id> is set to null
2. Try to find the system_person_type for the person_type_id parameter value in PER_PERSON_TYPES (ie straightforward validation of the supplied value)
3. If the <old_pt_id> value from (1) above is null, then: 3.1 If the system_person_type is a composite, e.g. EMP_APL then raise an error PER_289965_COMP_PER_TYPE_INVLD 3.2 If the system_person_type from (2) is not found in the list of PTUs for the person, then raise an error PER_289603_CKW_INV_PERSON_TYPE 3.3 If we're still ok at this stage, maintain the PTU by calling hr_per_type_usage_internal.maintain_person_type_usage
So, does that help any?
Alternatively just do a Datapump Hack! Erm... apparently.
_________________________
L&K CT
Remember: A dog is for life, not just for Christmas... unless you're in Korea
|
|
Top
|
|
|
|
#5106 - 01/02/10 02:07 PM
Re: Correcting PERSON_TYPE_ID in per_all_people_f
[Re: natkins]
|
hanger-on
Registered: 15/03/05
Posts: 72
Loc: Lloyds Register
|
.. I have used HR_PERSON_API.update_person (p_validate => b_validate --in boolean default false ,p_effective_date => x.effective_start_date --in date ,p_datetrack_update_mode => l_datetrack_update_mode --in varchar2 ,p_person_id => x.person_id --in number ,p_object_version_number => x.object_version_number --in out nocopy number ,p_last_name => x.last_name --in varchar2 default hr_api.g_varchar2 ,p_employee_number => x.employee_number --in out nocopy varchar2 ,p_effective_start_date => l_effective_start_date -- out nocopy date ,p_effective_end_date => l_effective_end_date -- out nocopy date ,p_full_name => l_full_name -- out nocopy varchar2 ,p_comment_id => l_comment_id -- out nocopy number ,p_name_combination_warning => l_name_combination_warning -- out nocopy boolean ,p_assign_payroll_warning => l_assign_payroll_warning -- out nocopy boolean ,p_orig_hire_warning => l_orig_hire_warning -- out nocopy boolean ) ;
PER_PER_UPD.upd ( p_person_id => x.person_id -- in number, , p_effective_start_date => l_effective_start_date -- out nocopy date, , p_effective_end_date => l_effective_end_date -- out nocopy date, , p_person_type_id => 238 -- in number default hr_api.g_number, , p_applicant_number => x.applicant_number -- in out nocopy varchar2, , p_comment_id => l_comment_id -- out nocopy number, , p_current_applicant_flag => l_current_applicant_flag -- out nocopy varchar2, , p_current_emp_or_apl_flag => l_current_emp_or_apl_flag -- out nocopy varchar2, , p_current_employee_flag => l_current_employee_flag -- out nocopy varchar2, , p_employee_number => x.employee_number -- in out nocopy varchar2, , p_full_name => l_full_name -- out nocopy varchar2, , p_npw_number => x.npw_number -- in out nocopy varchar2, , p_object_version_number => x.object_version_number -- in out nocopy number, , p_effective_date => x.effective_start_date -- in date, , p_datetrack_mode => l_datetrack_update_mode -- in varchar2, , p_validate => b_validate -- in boolean default false, , p_name_combination_warning => l_name_combination_warning -- out nocopy boolean, , p_dob_null_warning => l_assign_payroll_warning -- out nocopy boolean, , p_orig_hire_warning => l_orig_hire_warning -- out nocopy boolean );
.. and all seems to work ok .. if anyone is interested in future ..
N
|
|
Top
|
|
|
|
|
756 Members
48 Forums
1517 Topics
7287 Posts
Max Online: 63 @ 24/11/10 07:21 AM
|
|
|
|
|
|
1
|
2
|
3
|
4
|
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
|
26
|
27
|
28
|
29
|
|
|
|
|
|