Who's Online
0 registered (), 1 Guest and 6 Spiders online.
Key: Admin, Global Mod, Mod
Recent Posts
Abseces in oracle hrms, super user: how to do I:
by tovia123
Today at 01:18 PM
Update EIT in SSHR
by Sahir
Yesterday at 03:45 PM
End of Year Legislation Patch for 11i
by delboy
Yesterday at 01:35 PM
Interfacing iRec and external sites
by DanC
09/02/12 11:42 PM
Capturing, Storing, & Paying Banked Overtime
by Paul
09/02/12 08:51 PM
Time and Labour & Oracle Projects
by Paul
09/02/12 07:34 PM
Search Engine Optimizers
by delboy
09/02/12 01:30 PM
Function for getting retropay-maintained balances
by CT
08/02/12 12:21 PM
Grade End Date
by Chris
03/02/12 10:46 AM
OLM Mandatory Enrolments
by bcooper
01/02/12 12:23 PM
Top Posters (30 Days)
CT 26
delboy 24
bcooper 14
Sahir 5
Gus 5
tovia123 5
Tim Bailey 3
SBi 3
christm 3
Simon_Mc 3
(Views)Popular Topics
Family Pack K issues thread 18240
CREATE_GRADE api returns:PLS-00306: wrong number o 13772
Still trying to locate... 12214
Creating hr jobs ORA-20001: HR_289477_JOB_GROUP_ID 10658
Viewing Output of another user 9137
HR_PF.K RUP4 8851
Review of my Release 12 laptop 8500
Adding a taskflow button to a form 7861
Enhanced Retro & Release 12 7689
Family Pack K 7127
Page 1 of 2 1 2 >
Topic Options
Rate This Topic
#5099 - 01/02/10 08:31 AM Correcting PERSON_TYPE_ID in per_all_people_f
natkins Offline
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]
CT Offline
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
#5101 - 01/02/10 10:32 AM Re: Correcting PERSON_TYPE_ID in per_all_people_f [Re: CT]
natkins Offline
hanger-on

Registered: 15/03/05
Posts: 72
Loc: Lloyds Register
Hi Young Man .. Thanks for the feedback ..

We are : $Header: peperapi.pkb 115.38 2006/02/15 00:58:56 agolechh ship $ */

.. so not far behind - but same validation after user_hook and the :
per_per_upd.upd
(p_person_id => p_person_id
,p_effective_start_date => l_effective_start_date
,p_effective_end_date => l_effective_end_date
-- ,p_person_type_id => l_person_type_id1
,p_last_name => p_last_name


.. and I get no error messages ..

at no point is this updating the person type in the per_all_people_f and even the person_type_id in the call to the .upd is commented out!!

As usual if i update a value via the professional form - the person type in the per_all_people_f gets updated and "corrected"

.. not actually using DP here - just doing a few data fixes - so this could be a challange - unless there is a HR_UPDATE_THE PERSON_TYPE_API somewhere

Neill

Top
#5102 - 01/02/10 11:13 AM Re: Correcting PERSON_TYPE_ID in per_all_people_f [Re: natkins]
CT Offline
Guru
***

Registered: 11/03/05
Posts: 1080
Loc: Bath
Neill mate

I've had a look, and there doesn't seem to be a specific api for this. I think the only time this is going to change, is if there is a change of circumstances such as 'hire_applicant' or 'terminate_employee' etc. I would imagine that changes to the internal person_type_id on the person row would be inherent within those processes.

As an aside, what actually are you seeking to do?
_________________________
L&K
CT

Remember: A dog is for life, not just for Christmas... unless you're in Korea

Top
#5103 - 01/02/10 12:37 PM Re: Correcting PERSON_TYPE_ID in per_all_people_f [Re: CT]
natkins Offline
hanger-on

Registered: 15/03/05
Posts: 72
Loc: Lloyds Register
.. The person_type_id in the Per_all_people_f table is wrong ..

Someone in the past has changed the ptu and left about 7000 rows in per_all_people that relate to non system default person types ..

.. i am about to try using the per_per_upd.upd() as a test here .. (this is called by the main API (as above) the person_type_id commented out)
:-)
.. CORRECTIONS via the screen maintain it for us and provide the functionality i seek ..

N

Top
#5104 - 01/02/10 12:49 PM Re: Correcting PERSON_TYPE_ID in per_all_people_f [Re: natkins]
CT Offline
Guru
***

Registered: 11/03/05
Posts: 1080
Loc: Bath
eek

<dons tin hat, and sells shares in Lloyds Register>
_________________________
L&K
CT

Remember: A dog is for life, not just for Christmas... unless you're in Korea

Top
#5105 - 01/02/10 01:35 PM Re: Correcting PERSON_TYPE_ID in per_all_people_f [Re: CT]
natkins Offline
hanger-on

Registered: 15/03/05
Posts: 72
Loc: Lloyds Register
.. what shares !! Its a charity !!

Top
#5106 - 01/02/10 02:07 PM Re: Correcting PERSON_TYPE_ID in per_all_people_f [Re: natkins]
natkins Offline
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
#5107 - 01/02/10 02:20 PM Re: Correcting PERSON_TYPE_ID in per_all_people_f [Re: natkins]
CT Offline
Guru
***

Registered: 11/03/05
Posts: 1080
Loc: Bath
Originally Posted By: natkins
.. what shares !! Its a charity !!

Try telling that to Adam Faith!!!!! (dredging up an old story about 'Names' losing millions on dodgy Insurance companies of a vaguely Scottish persuasion etc)
_________________________
L&K
CT

Remember: A dog is for life, not just for Christmas... unless you're in Korea

Top
#5108 - 01/02/10 02:25 PM Re: Correcting PERSON_TYPE_ID in per_all_people_f [Re: CT]
CT Offline
Guru
***

Registered: 11/03/05
Posts: 1080
Loc: Bath
Well done that man...

Tell me, you didn't hear a bell ringing when the script finished, did you?

The Lutine Bell

grin


Edited by CT (01/02/10 02:27 PM)
_________________________
L&K
CT

Remember: A dog is for life, not just for Christmas... unless you're in Korea

Top
Page 1 of 2 1 2 >



Moderator:  bcooper, CT 
Forum Stats
756 Members
48 Forums
1517 Topics
7287 Posts

Max Online: 63 @ 24/11/10 07:21 AM
Today's Birthdays
No Birthdays
Recent vacancies
Tea boy available 4 basic chores & some! services
by Simon_Mc
19/01/12 03:59 PM
Top Posters
bcooper 1095
CT 1080
delboy 500
Geoff Dixon 369
SBi 344
vkumar 223
kp_rapolu 213
cbrookes 197
Gavin Harris 160
Gus 132
February
Su M Tu W Th F Sa
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