--
declare
--
--Common Variables
l_type varchar2(10) := 'CWK';--'EMP'
l_person_id number := 123456;
--- DECLARE variables for hr_periods_of_placement_api.update_pdp_details
l_effective_date date := trunc(sysdate);
l_termination_reason per_periods_of_placement.leaving_reason%type := 'AGE_REACHED';
l_object_version_number per_periods_of_placement.object_version_number%type;
l_start_date per_periods_of_placement.date_start%type;
--
cursor cur_emp_res is
select rowid row_id --HR_GENERAL.DECODE_LOOKUP ('LEAV_REAS',a.leaving_REASON) ter_reason
,pos.*
from per_periods_of_service pos
where person_id = 123456;
--
begin
--
if l_type = 'CWK' then --Contingent Worker
-- HR_GENERAL.DECODE_LOOKUP ('HR_CWK_TERMINATION_REASONS',a.TERMINATION_REASON) termination_reason
select pos.object_version_number, date_start
into l_object_version_number, l_start_date
from per_periods_of_placement pos
where pos.person_id = l_person_id;
/*
* This API updates period of placement information for a contingent worker.
* Typically, this API is used to update the flexfields associated with periods
* of placement.
*/
hr_periods_of_placement_api.update_pdp_details(
p_validate => false
,p_effective_date => l_effective_date
,p_object_version_number => l_object_version_number
,p_person_id => l_person_id
,p_date_start => l_start_date
,p_termination_reason => l_termination_reason
--,p_attribute_category =>
--,p_attribute1 =>
--,p_attribute2 =>
--,p_attribute3 =>
);
else --Employee
for rec_per IN cur_emp_res loop
per_periods_of_service_pkg.update_row(
p_row_id => rec_per.row_id
,p_period_of_service_id => rec_per.period_of_service_id
,p_business_group_id => rec_per.business_group_id
,p_person_id => rec_per.person_id
,p_date_start => rec_per.date_start
,p_termination_accepted_per_id => rec_per.termination_accepted_person_id
,p_accepted_termination_date => rec_per.accepted_termination_date
,p_actual_termination_date => rec_per.actual_termination_date
,p_comments => rec_per.comments
,p_final_process_date => rec_per.final_process_date
,p_last_standard_process_date => rec_per.last_standard_process_date
,p_leaving_reason => l_termination_reason
,p_notified_termination_date => rec_per.notified_termination_date
,p_projected_termination_date => rec_per.projected_termination_date
,p_request_id => rec_per.request_id
,p_program_application_id => rec_per.program_application_id
,p_program_id => rec_per.program_id
,p_program_update_date => rec_per.program_update_date
,p_attribute_category => rec_per.attribute_category
,p_attribute1 => rec_per.attribute1
,p_attribute2 => rec_per.attribute2
,p_attribute3 => rec_per.attribute3
,p_attribute4 => rec_per.attribute4
,p_attribute5 => rec_per.attribute5
,p_attribute6 => rec_per.attribute6
,p_attribute7 => rec_per.attribute7
,p_attribute8 => rec_per.attribute8
,p_attribute9 => rec_per.attribute9
,p_attribute10 => rec_per.attribute10
,p_attribute11 => rec_per.attribute11
,p_attribute12 => rec_per.attribute12
,p_attribute13 => rec_per.attribute13
,p_attribute14 => rec_per.attribute14
,p_attribute15 => rec_per.attribute15
,p_attribute16 => rec_per.attribute16
,p_attribute17 => rec_per.attribute17
,p_attribute18 => rec_per.attribute18
,p_attribute19 => rec_per.attribute19
,p_attribute20 => rec_per.attribute20
,p_pds_information_category => rec_per.pds_information_category
,p_pds_information1 => rec_per.pds_information1
,p_pds_information2 => rec_per.pds_information2
,p_pds_information3 => rec_per.pds_information3
,p_pds_information4 => rec_per.pds_information4
,p_pds_information5 => rec_per.pds_information5
,p_pds_information6 => rec_per.pds_information6
,p_pds_information7 => rec_per.pds_information7
,p_pds_information8 => rec_per.pds_information8
,p_pds_information9 => rec_per.pds_information9
,p_pds_information10 => rec_per.pds_information10
,p_pds_information11 => rec_per.pds_information11
,p_pds_information12 => rec_per.pds_information12
,p_pds_information13 => rec_per.pds_information13
,p_pds_information14 => rec_per.pds_information14
,p_pds_information15 => rec_per.pds_information15
,p_pds_information16 => rec_per.pds_information16
,p_pds_information17 => rec_per.pds_information17
,p_pds_information18 => rec_per.pds_information18
,p_pds_information19 => rec_per.pds_information19
,p_pds_information20 => rec_per.pds_information20
,p_pds_information21 => rec_per.pds_information21
,p_pds_information22 => rec_per.pds_information22
,p_pds_information23 => rec_per.pds_information23
,p_pds_information24 => rec_per.pds_information24
,p_pds_information25 => rec_per.pds_information25
,p_pds_information26 => rec_per.pds_information26
,p_pds_information27 => rec_per.pds_information27
,p_pds_information28 => rec_per.pds_information28
,p_pds_information29 => rec_per.pds_information29
,p_pds_information30 => rec_per.pds_information30
,p_adjusted_svc_date => rec_per.adjusted_svc_date
);
end loop;
end if;
--
commit;
--
exception
when others then
dbms_output.put_line('Update Placement/Employement Details. Error OTHERS while validating: '||sqlerrm);
rollback;
end;
--
declare
--
--Common Variables
l_type varchar2(10) := 'CWK';--'EMP'
l_person_id number := 123456;
--- DECLARE variables for hr_periods_of_placement_api.update_pdp_details
l_effective_date date := trunc(sysdate);
l_termination_reason per_periods_of_placement.leaving_reason%type := 'AGE_REACHED';
l_object_version_number per_periods_of_placement.object_version_number%type;
l_start_date per_periods_of_placement.date_start%type;
--
cursor cur_emp_res is
select rowid row_id --HR_GENERAL.DECODE_LOOKUP ('LEAV_REAS',a.leaving_REASON) ter_reason
,pos.*
from per_periods_of_service pos
where person_id = 123456;
--
begin
--
if l_type = 'CWK' then --Contingent Worker
-- HR_GENERAL.DECODE_LOOKUP ('HR_CWK_TERMINATION_REASONS',a.TERMINATION_REASON) termination_reason
select pos.object_version_number, date_start
into l_object_version_number, l_start_date
from per_periods_of_placement pos
where pos.person_id = l_person_id;
/*
* This API updates period of placement information for a contingent worker.
* Typically, this API is used to update the flexfields associated with periods
* of placement.
*/
hr_periods_of_placement_api.update_pdp_details(
p_validate => false
,p_effective_date => l_effective_date
,p_object_version_number => l_object_version_number
,p_person_id => l_person_id
,p_date_start => l_start_date
,p_termination_reason => l_termination_reason
--,p_attribute_category =>
--,p_attribute1 =>
--,p_attribute2 =>
--,p_attribute3 =>
);
else --Employee
for rec_per IN cur_emp_res loop
per_periods_of_service_pkg.update_row(
p_row_id => rec_per.row_id
,p_period_of_service_id => rec_per.period_of_service_id
,p_business_group_id => rec_per.business_group_id
,p_person_id => rec_per.person_id
,p_date_start => rec_per.date_start
,p_termination_accepted_per_id => rec_per.termination_accepted_person_id
,p_accepted_termination_date => rec_per.accepted_termination_date
,p_actual_termination_date => rec_per.actual_termination_date
,p_comments => rec_per.comments
,p_final_process_date => rec_per.final_process_date
,p_last_standard_process_date => rec_per.last_standard_process_date
,p_leaving_reason => l_termination_reason
,p_notified_termination_date => rec_per.notified_termination_date
,p_projected_termination_date => rec_per.projected_termination_date
,p_request_id => rec_per.request_id
,p_program_application_id => rec_per.program_application_id
,p_program_id => rec_per.program_id
,p_program_update_date => rec_per.program_update_date
,p_attribute_category => rec_per.attribute_category
,p_attribute1 => rec_per.attribute1
,p_attribute2 => rec_per.attribute2
,p_attribute3 => rec_per.attribute3
,p_attribute4 => rec_per.attribute4
,p_attribute5 => rec_per.attribute5
,p_attribute6 => rec_per.attribute6
,p_attribute7 => rec_per.attribute7
,p_attribute8 => rec_per.attribute8
,p_attribute9 => rec_per.attribute9
,p_attribute10 => rec_per.attribute10
,p_attribute11 => rec_per.attribute11
,p_attribute12 => rec_per.attribute12
,p_attribute13 => rec_per.attribute13
,p_attribute14 => rec_per.attribute14
,p_attribute15 => rec_per.attribute15
,p_attribute16 => rec_per.attribute16
,p_attribute17 => rec_per.attribute17
,p_attribute18 => rec_per.attribute18
,p_attribute19 => rec_per.attribute19
,p_attribute20 => rec_per.attribute20
,p_pds_information_category => rec_per.pds_information_category
,p_pds_information1 => rec_per.pds_information1
,p_pds_information2 => rec_per.pds_information2
,p_pds_information3 => rec_per.pds_information3
,p_pds_information4 => rec_per.pds_information4
,p_pds_information5 => rec_per.pds_information5
,p_pds_information6 => rec_per.pds_information6
,p_pds_information7 => rec_per.pds_information7
,p_pds_information8 => rec_per.pds_information8
,p_pds_information9 => rec_per.pds_information9
,p_pds_information10 => rec_per.pds_information10
,p_pds_information11 => rec_per.pds_information11
,p_pds_information12 => rec_per.pds_information12
,p_pds_information13 => rec_per.pds_information13
,p_pds_information14 => rec_per.pds_information14
,p_pds_information15 => rec_per.pds_information15
,p_pds_information16 => rec_per.pds_information16
,p_pds_information17 => rec_per.pds_information17
,p_pds_information18 => rec_per.pds_information18
,p_pds_information19 => rec_per.pds_information19
,p_pds_information20 => rec_per.pds_information20
,p_pds_information21 => rec_per.pds_information21
,p_pds_information22 => rec_per.pds_information22
,p_pds_information23 => rec_per.pds_information23
,p_pds_information24 => rec_per.pds_information24
,p_pds_information25 => rec_per.pds_information25
,p_pds_information26 => rec_per.pds_information26
,p_pds_information27 => rec_per.pds_information27
,p_pds_information28 => rec_per.pds_information28
,p_pds_information29 => rec_per.pds_information29
,p_pds_information30 => rec_per.pds_information30
,p_adjusted_svc_date => rec_per.adjusted_svc_date
);
end loop;
end if;
--
commit;
--
exception
when others then
dbms_output.put_line('Update Placement/Employement Details. Error OTHERS while validating: '||sqlerrm);
rollback;
end;
--
Currently it looks like Drupal is the preferred blogging platform out there right
ReplyDeletenow. (from what I've read) Is that what you're using on your blog?
Feel free to visit my webpage: signs of low testosterone
I have heard about Drupal but haven't used it yet.
Delete