Who's Online
1 registered (CT), 10 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Recent Posts
Concurrent Request - running slow
by CT
Today at 11:16 AM
Element to recover value in balance on leaving
by jkavia
Today at 11:04 AM
P11d's
by jkavia
Today at 10:49 AM
Assignment EIT not displaying in Self Service
by CT
Today at 06:45 AM
Vehicle Mileage Setup
by Chris Abraham
Yesterday at 12:24 PM
In which table is external learning data stored
by DMC
Yesterday at 08:45 AM
Oracle Payroll and Cash Management
by Gus
20/05/12 11:27 AM
Pension Auto Enrolment
by CT
18/05/12 09:46 AM
11.5.10 "Extended Support" extended til..... when?
by Vigneswar Battu
17/05/12 10:59 AM
Hacking element definitions
by CT
15/05/12 08:42 AM
Top Posters (30 Days)
CT 38
delboy 36
Vigneswar Battu 15
pat.woodall 9
bcooper 4
Gus 4
DMC 3
Mani 3
7Giri 3
Ryan 3
(Views)Popular Topics
Family Pack K issues thread 20153
CREATE_GRADE api returns:PLS-00306: wrong number o 15194
Still trying to locate... 13844
Creating hr jobs ORA-20001: HR_289477_JOB_GROUP_ID 11889
Viewing Output of another user 10307
HR_PF.K RUP4 10271
Review of my Release 12 laptop 9733
Enhanced Retro & Release 12 9397
Adding a taskflow button to a form 9129
Family Pack K 7906
Topic Options
Rate This Topic
#3611 - 14/10/08 07:42 AM Nulling the people_group_id
cbrookes Offline
nothin' better to do

Registered: 14/03/05
Posts: 197
Loc: Detained at HM pleasure
Anyone ever written a call to the update_emp_asg_criteria api to make the people_group_id null?
I have knocked up the following which runs but doesn't do anything (and YES it does have a "commit" in it CT)....

declare
CURSOR c1 IS
SELECT *
FROM per_all_assignments_f paaf
WHERE assignment_id = 175
order by assignment_number asc,
effective_start_date asc;

l_datetrack_update_mode VARCHAR2(2000);
l_delete_warning BOOLEAN;
l_ovn NUMBER;
l_special_ceiling_step_id NUMBER;
l_people_group_id NUMBER;
l_soft_coding_keyflex_id NUMBER;
l_group_name VARCHAR2(2000);
l_effective_start_date DATE;
l_effective_end_date DATE;
l_probation_end_date DATE;
l_org_now_no_manager_warning BOOLEAN;
l_other_manager_warning BOOLEAN;
l_spp_delete_warning BOOLEAN;
l_entries_changed_warning VARCHAR2(2000);
l_tax_district_changed_warning BOOLEAN;
l_concatenated_segments VARCHAR2(2000);
l_gsp_post_process_warning VARCHAR2(2000);

BEGIN
for r1 in c1 loop
l_ovn := r1.object_version_number;
l_datetrack_update_mode := 'CORRECTION';
l_people_group_id := null;
l_group_name := null;

dbms_output.put_line('Assignment Number: '||r1.assignment_number);

hr_assignment_api.update_emp_asg_criteria
(p_effective_date => r1.effective_start_date
, p_datetrack_update_mode => l_datetrack_update_mode
, p_assignment_id => r1.assignment_id
, p_validate => FALSE
, p_called_from_mass_update => FALSE
, p_grade_id => r1.grade_id
, p_position_id => r1.position_id
, p_job_id => r1.job_id
, p_payroll_id => r1.payroll_id
, p_location_id => r1.location_id
, p_organization_id => r1.organization_id
, p_pay_basis_id => r1.pay_basis_id
, p_segment1 => null
, p_segment2 => null
, p_segment3 => null
, p_segment4 => null
, p_segment5 => null
, p_segment6 => null
, p_segment7 => null
, p_segment8 => null
, p_segment9 => null
, p_segment10 => null
, p_segment11 => null
, p_segment12 => null
, p_segment13 => null
, p_segment14 => null
, p_segment15 => null
, p_segment16 => null
, p_segment17 => null
, p_segment18 => null
, p_segment19 => null
, p_segment20 => null
, p_segment21 => null
, p_segment22 => null
, p_segment23 => null
, p_segment24 => null
, p_segment25 => null
, p_segment26 => null
, p_segment27 => null
, p_segment28 => null
, p_segment29 => null
, p_segment30 => null
, p_employment_category => r1.employment_category
, p_concat_segments => null
, p_contract_id => r1.contract_id
, p_establishment_id => r1.establishment_id
, p_scl_segment1 => null
, p_grade_ladder_pgm_id => null
, p_supervisor_assignment_id => r1.supervisor_id
, p_object_version_number => l_ovn
, p_special_ceiling_step_id => l_special_ceiling_step_id
, p_people_group_id => l_people_group_id
, p_soft_coding_keyflex_id => l_soft_coding_keyflex_id
, p_group_name => l_group_name
, p_effective_start_date => l_effective_start_date
, p_effective_end_date => l_effective_end_date
, p_org_now_no_manager_warning => l_org_now_no_manager_warning
, p_other_manager_warning => l_other_manager_warning
, p_spp_delete_warning => l_spp_delete_warning
, p_entries_changed_warning => l_entries_changed_warning
, p_tax_district_changed_warning => l_tax_district_changed_warning
, p_concatenated_segments => l_concatenated_segments
, p_gsp_post_process_warning => l_gsp_post_process_warning
);

COMMIT;

end loop;
EXCEPTION
WHEN others then
dbms_output.put_line('ex is: '||SQLERRM);
END;
/

Top
#3612 - 14/10/08 08:21 AM Re: Nulling the people_group_id [Re: cbrookes]
cbrookes Offline
nothin' better to do

Registered: 14/03/05
Posts: 197
Loc: Detained at HM pleasure
I've progressed it a bit (turned serveroutput on) and now getting....

SQL> @Clear_PG_Id.txt
Assignment Number: 201
Object Version Number: 10
Effective Start Date: 03-MAY-05
ex is: ORA-20001: The HR object is invalid

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.

PL/SQL procedure successfully completed.


Off to search metalink.......

Top
#3613 - 14/10/08 08:40 AM Re: Nulling the people_group_id [Re: cbrookes]
CT Online   content
Guru
***

Registered: 11/03/05
Posts: 1185
Loc: Bath
Hmm, weird...

The message is suggesting that the API doesn't like the value for p_object_version_number being passed in, yet you seem to be obtaining and setting the correct value prior to the API call.

What version of the app are you on?
_________________________
L&K
CT

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

Top
#3614 - 14/10/08 09:12 AM Re: Nulling the people_group_id [Re: CT]
CT Online   content
Guru
***

Registered: 11/03/05
Posts: 1185
Loc: Bath
I've just tried this on my R12 instance, and it sort of works - there's a first!

I added a put_line in it to show me the before and after values for the ovn, and it was rather intriguing! What I saw was this:

Say there were 4 historical records for a given assignment id. I expected that the ovns would look like this:

.... before....after
r1....2........3
r2....3........4
r3....4........5
r4....5........6

In fact, they ended up looking like this:

.... before....after
r1....2........6
r2....3........7
r3....4........8
r4....5........9

It seems to cache all the values first and then start advancing the ovn from the point of the last record! As I said, weird!

What history records do you have for this assignment id?

Top
#3786 - 10/12/08 01:47 PM Re: Nulling the people_group_id [Re: CT]
Gus Offline
nothin' better to do

Registered: 16/03/05
Posts: 146
Loc: Lapenne
I you try and null all the PPG segments, may you not get a row in PPG with all the values set to null?

ie. not sure you can have a null id just a row full of null values


Top



Moderator:  bcooper, CT 
Forum Stats
791 Members
48 Forums
1582 Topics
7651 Posts

Max Online: 67 @ 14/04/12 05:38 PM
Today's Birthdays
No Birthdays
Recent vacancies
Top Posters
CT 1185
bcooper 1112
delboy 594
Geoff Dixon 369
SBi 356
vkumar 223
kp_rapolu 213
cbrookes 197
Gavin Harris 163
Gus 146
May
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 30 31